EclipseLink 2.4.2, build 'v20130514-5956486' API Reference

org.eclipse.persistence.annotations
Annotation Type TenantTableDiscriminator


@Target(value=TYPE)
@Retention(value=RUNTIME)
public @interface TenantTableDiscriminator

A tenant table discriminator is used with a TABLE_PER_TENANT multitenant strategy. The tenant table discriminator describes the type of table discriminator to use. The user may choose their own tenant identifier property or use the default property: org.eclipse.persistence.config.PersistenceUnitProperties.MULTITENANT_PROPERTY_DEFAULT = "eclipselink.tenant-id"

Tenant table discriminator can be specified at the Entity or MappedSuperclass level and must always be accompanied with a Multitenant(TABLE_PER_TENANT) specification. It is not sufficient to specify only a tenant table discriminator.

See Also:
TenantTableDiscriminator, Multitenant, MultitenantType
Author:
Guy Pelletier
Since:
EclipseLink 2.4

Optional Element Summary
 java.lang.String contextProperty
          (Optional) The name of the context property to apply to as tenant table discriminator.
 TenantTableDiscriminatorType type
          (Optional) The type of tenant table discriminator to use with the tables of the persistence unit.
 

contextProperty

public abstract java.lang.String contextProperty
(Optional) The name of the context property to apply to as tenant table discriminator. Default is "eclipselink-tenant.id"

Default:
"eclipselink.tenant-id"

type

public abstract TenantTableDiscriminatorType type
(Optional) The type of tenant table discriminator to use with the tables of the persistence unit. Defaults to TenantTableDiscriminatorType.SUFFIX.

Default:
org.eclipse.persistence.annotations.TenantTableDiscriminatorType.SUFFIX

EclipseLink 2.4.2, build 'v20130514-5956486' API Reference