Enum MultitenantType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<MultitenantType>

    public enum MultitenantType
    extends java.lang.Enum<MultitenantType>
    An enum that is used within the Multitenant annotation.
    See Also:
    Multitenant
    Author:
    Guy Pelletier
    Since:
    EclipseLink 2.3
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      SINGLE_TABLE
      Specifies that table(s) the entity maps to includes rows for multiple tenants.
      TABLE_PER_TENANT
      Specifies that different tables are used for each tenant and used in conjunction with the tenant table discriminator which describes how the tables are uniquely identified, that is, using a suffix/prefix or a separate schema.
      VPD
      Specifies that the DB will handle the tenant filtering on all SELECT, UPDATE and DELETE queries.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static MultitenantType valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static MultitenantType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • SINGLE_TABLE

        public static final MultitenantType SINGLE_TABLE
        Specifies that table(s) the entity maps to includes rows for multiple tenants. The tenant discriminator column(s) are used with application context values to limit what a persistence context can access.
      • VPD

        public static final MultitenantType VPD
        Specifies that the DB will handle the tenant filtering on all SELECT, UPDATE and DELETE queries. Using this type assumes that the platform used with your persistence unit does indeed support VPD.
        Since:
        2.3.1
      • TABLE_PER_TENANT

        public static final MultitenantType TABLE_PER_TENANT
        Specifies that different tables are used for each tenant and used in conjunction with the tenant table discriminator which describes how the tables are uniquely identified, that is, using a suffix/prefix or a separate schema.
        Since:
        2.4
    • Method Detail

      • values

        public static MultitenantType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (MultitenantType c : MultitenantType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static MultitenantType valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null