public class TablePerMultitenantPolicy extends java.lang.Object implements MultitenantPolicy, java.lang.Cloneable
| Constructor and Description |
|---|
TablePerMultitenantPolicy(ClassDescriptor desc) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFieldsToRow(org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
|
void |
addToTableDefinition(TableDefinition tableDefinition)
INTERNAL:
|
MultitenantPolicy |
clone(ClassDescriptor descriptor)
INTERNAL: Multitenant policies are cloned per inheritance subclass.
|
java.lang.String |
getContextProperty()
INTERNAL: Return the context property for this table per tenant policy.
|
org.eclipse.persistence.internal.helper.DatabaseTable |
getTable(org.eclipse.persistence.internal.helper.DatabaseTable table)
INTERNAL: Return the new database table associated with this tenant.
|
org.eclipse.persistence.internal.helper.DatabaseTable |
getTable(java.lang.String tableName)
INTERNAL: Return the new database table associated with this tenant.
|
boolean |
hasContextTenant()
INTERNAL: Return true if the tenant has been set for this policy.
|
void |
initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
|
boolean |
isPrefixPerTable()
PUBLIC: Return true if this descriptor requires a prefix to the table per tenant.
|
boolean |
isSchemaPerTable()
PUBLIC: Return true if this descriptor requires a table schema per tenant.
|
boolean |
isSingleTableMultitenantPolicy()
INTERNAL:
|
boolean |
isSuffixPerTable()
PUBLIC: Return true if this descriptor requires a suffix to the table per tenant.
|
boolean |
isTablePerMultitenantPolicy()
INTERNAL:
|
void |
postInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
|
void |
preInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
|
void |
setContextProperty(java.lang.String contextProperty)
PUBLIC: Set the context property used to define the table per tenant.
|
void |
setContextTenant(java.lang.String contextTenant)
INTERNAL:
|
void |
setTenantTableDiscriminatorType(TenantTableDiscriminatorType type)
PUBLIC: Set the tenant table discriminator type.
|
boolean |
shouldInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: This method is called during regular descriptor initialization.
|
boolean |
usesContextProperty(java.lang.String property)
INTERNAL: Return true if this policy accepts the given property.
|
public TablePerMultitenantPolicy(ClassDescriptor desc)
public void addFieldsToRow(org.eclipse.persistence.internal.sessions.AbstractRecord row,
org.eclipse.persistence.internal.sessions.AbstractSession session)
addFieldsToRow in interface MultitenantPolicypublic void addToTableDefinition(TableDefinition tableDefinition)
addToTableDefinition in interface MultitenantPolicypublic MultitenantPolicy clone(ClassDescriptor descriptor)
clone in interface MultitenantPolicypublic java.lang.String getContextProperty()
public org.eclipse.persistence.internal.helper.DatabaseTable getTable(java.lang.String tableName)
public org.eclipse.persistence.internal.helper.DatabaseTable getTable(org.eclipse.persistence.internal.helper.DatabaseTable table)
public boolean hasContextTenant()
public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
throws DescriptorException
initialize in interface MultitenantPolicyDescriptorExceptionpublic boolean isPrefixPerTable()
public boolean isSchemaPerTable()
public boolean isSingleTableMultitenantPolicy()
isSingleTableMultitenantPolicy in interface MultitenantPolicypublic boolean isSuffixPerTable()
public boolean isTablePerMultitenantPolicy()
isTablePerMultitenantPolicy in interface MultitenantPolicypublic void postInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
postInitialize in interface MultitenantPolicy
public void preInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
throws DescriptorException
preInitialize in interface MultitenantPolicyDescriptorExceptionpublic void setTenantTableDiscriminatorType(TenantTableDiscriminatorType type)
public void setContextProperty(java.lang.String contextProperty)
public void setContextTenant(java.lang.String contextTenant)
public boolean shouldInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
public boolean usesContextProperty(java.lang.String property)