Enum MultitenantType

java.lang.Object
java.lang.Enum<MultitenantType>
org.eclipse.persistence.annotations.MultitenantType
All Implemented Interfaces:
Serializable, Comparable<MultitenantType>

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

    Enum Constants
    Enum Constant
    Description
    Specifies that table(s) the entity maps to includes rows for multiple tenants.
    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.
    Specifies that the DB will handle the tenant filtering on all SELECT, UPDATE and DELETE queries.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this type with the specified name.
    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 Details

    • 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.
    • 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.
  • Method Details

    • values

      public static MultitenantType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static MultitenantType valueOf(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:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null