Package org.openxava.web
Class Schemas
- java.lang.Object
-
- org.openxava.web.Schemas
-
public final class Schemas extends java.lang.ObjectUtility methods related to JPA schema resolution in web requests.Centralizes the logic to set the default JPA schema for the current request/session, to keep code DRY across servlets.
- Since:
- 7.6
- Author:
- Javier Paniza
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidsetDefaultSchema(javax.servlet.http.HttpServletRequest request)Sets the default JPA schema intoXPersistencebased on organization or default schema information available in the current request/session context.
-
-
-
Method Detail
-
setDefaultSchema
public static void setDefaultSchema(javax.servlet.http.HttpServletRequest request)
Sets the default JPA schema intoXPersistencebased on organization or default schema information available in the current request/session context.- If session attribute
naviox.organizationis present and not empty, it uses it as default schema. - Otherwise, it tries with context attribute
xava_defaultSchema.
- If session attribute
-
-