Class SchemaPerMultitenantPolicy
- java.lang.Object
-
- org.eclipse.persistence.descriptors.TablePerMultitenantPolicy
-
- org.eclipse.persistence.descriptors.SchemaPerMultitenantPolicy
-
- All Implemented Interfaces:
Serializable,Cloneable,MultitenantPolicy
public class SchemaPerMultitenantPolicy extends TablePerMultitenantPolicy
A schema per tenant multitenant policy. This is a special case of TablePerMultitenantPolicy which can be applied on the project. Can be useful in cases when tenant schema change happens outside of EclipseLink, typically if Proxy DataSource is used. Use of this policy is limited to projects where following applies- @Multitenant entities are not used
- EMF is shared across tenants
- EMF shared cache is disabled
- no @Entity defines schema to be used
- Since:
- EclipseLink 2.6
- Author:
- Lukas Jungmann
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SchemaPerMultitenantPolicy()SchemaPerMultitenantPolicy(ClassDescriptor desc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MultitenantPolicyclone(ClassDescriptor descriptor)INTERNAL: Multitenant policies are cloned per inheritance subclass.org.eclipse.persistence.internal.helper.DatabaseTablegetTable(String tableName)INTERNAL: Return the new database table associated with this tenant.org.eclipse.persistence.internal.helper.DatabaseTablegetTable(org.eclipse.persistence.internal.helper.DatabaseTable table)INTERNAL: Return the new database table associated with this tenant.voidinitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL:booleanisSchemaPerMultitenantPolicy()INTERNAL:booleanisTablePerMultitenantPolicy()INTERNAL:voidsetShouldUseSharedCache(boolean shouldUseSharedCache)voidsetShouldUseSharedEMF(boolean shouldUseSharedEMF)booleanshouldUseSharedCache()booleanshouldUseSharedEMF()-
Methods inherited from class org.eclipse.persistence.descriptors.TablePerMultitenantPolicy
addFieldsToRow, addToTableDefinition, getContextProperty, hasContextTenant, isPrefixPerTable, isSchemaPerTable, isSingleTableMultitenantPolicy, isSuffixPerTable, postInitialize, preInitialize, setContextProperty, setContextTenant, setTenantTableDiscriminatorType, shouldInitialize, usesContextProperty
-
-
-
-
Constructor Detail
-
SchemaPerMultitenantPolicy
public SchemaPerMultitenantPolicy()
-
SchemaPerMultitenantPolicy
public SchemaPerMultitenantPolicy(ClassDescriptor desc)
-
-
Method Detail
-
initialize
public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorExceptionINTERNAL:- Specified by:
initializein interfaceMultitenantPolicy- Overrides:
initializein classTablePerMultitenantPolicy- Throws:
DescriptorException
-
clone
public MultitenantPolicy clone(ClassDescriptor descriptor)
Description copied from class:TablePerMultitenantPolicyINTERNAL: Multitenant policies are cloned per inheritance subclass.- Specified by:
clonein interfaceMultitenantPolicy- Overrides:
clonein classTablePerMultitenantPolicy
-
isSchemaPerMultitenantPolicy
public boolean isSchemaPerMultitenantPolicy()
Description copied from class:TablePerMultitenantPolicyINTERNAL:- Specified by:
isSchemaPerMultitenantPolicyin interfaceMultitenantPolicy- Overrides:
isSchemaPerMultitenantPolicyin classTablePerMultitenantPolicy
-
isTablePerMultitenantPolicy
public boolean isTablePerMultitenantPolicy()
Description copied from class:TablePerMultitenantPolicyINTERNAL:- Specified by:
isTablePerMultitenantPolicyin interfaceMultitenantPolicy- Overrides:
isTablePerMultitenantPolicyin classTablePerMultitenantPolicy
-
getTable
public org.eclipse.persistence.internal.helper.DatabaseTable getTable(org.eclipse.persistence.internal.helper.DatabaseTable table)
Description copied from class:TablePerMultitenantPolicyINTERNAL: Return the new database table associated with this tenant.- Overrides:
getTablein classTablePerMultitenantPolicy
-
getTable
public org.eclipse.persistence.internal.helper.DatabaseTable getTable(String tableName)
Description copied from class:TablePerMultitenantPolicyINTERNAL: Return the new database table associated with this tenant.- Overrides:
getTablein classTablePerMultitenantPolicy
-
shouldUseSharedEMF
public boolean shouldUseSharedEMF()
-
setShouldUseSharedEMF
public void setShouldUseSharedEMF(boolean shouldUseSharedEMF)
-
shouldUseSharedCache
public boolean shouldUseSharedCache()
-
setShouldUseSharedCache
public void setShouldUseSharedCache(boolean shouldUseSharedCache)
-
-