EclipseLink 2.3.2, build 'v20111125-r10461' API Reference

org.eclipse.persistence.annotations
Enum MultitenantType

java.lang.Object
  extended by java.lang.Enum<MultitenantType>
      extended by org.eclipse.persistence.annotations.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:
org.eclipse.persistence.annotations.Multitenant.
Author:
Guy Pelletier
Since:
EclipseLink 2.3

Enum Constant Summary
SINGLE_TABLE
          Specifies that table(s) the entity maps to includes rows for multiple tenants.
TABLE_PER_TENANT
          NOTE: The TABLE_PER_TENANT type is currently not supported and specifying it on your model classes will result in an exception being thrown.
VPD
          Specifies that the DB will handle the tenant filtering on all SELECT, UPDATE and DELETE queries.
 
Method Summary
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.


TABLE_PER_TENANT

public static final MultitenantType TABLE_PER_TENANT
NOTE: The TABLE_PER_TENANT type is currently not supported and specifying it on your model classes will result in an exception being thrown. This type will be supported in a later release (post 2.3). When supported, this type specifies that different tables are used for each tenant. The table scan be uniquely identified by name, schema/tablespace.


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
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

EclipseLink 2.3.2, build 'v20111125-r10461' API Reference