Class Schemas


  • public final class Schemas
    extends java.lang.Object
    Utility 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 void setDefaultSchema​(javax.servlet.http.HttpServletRequest request)
      Sets the default JPA schema into XPersistence based on organization or default schema information available in the current request/session context.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • setDefaultSchema

        public static void setDefaultSchema​(javax.servlet.http.HttpServletRequest request)
        Sets the default JPA schema into XPersistence based on organization or default schema information available in the current request/session context.
        • If session attribute naviox.organization is present and not empty, it uses it as default schema.
        • Otherwise, it tries with context attribute xava_defaultSchema.