| Modifier and Type | Field and Description |
|---|---|
| protected String | |
| protected String | |
| protected ClassDescriptor | |
| protected Map | |
| protected TenantTableDiscriminatorType |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addFieldsToRow(AbstractRecord row, AbstractSession session)
Implements org. |
| public void | addToTableDefinition(TableDefinition tableDefinition)
Implements org. |
| public MultitenantPolicy | clone(ClassDescriptor descriptor)
Implements org. |
| public String | |
| public DatabaseTable | |
| public DatabaseTable | |
| protected String | |
| public boolean | |
| public void | initialize(AbstractSession session)
Implements org. |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public void | postInitialize(AbstractSession session)
Implements org. |
| public void | preInitialize(AbstractSession session)
Implements org. |
| public void | setContextProperty(String contextProperty)
PUBLIC: Set the context property used to define the table per tenant. |
| public void | |
| protected void | setTablePerTenant()
INTERNAL: This method is used to update the table per tenant descriptor with a table per tenant prefix or suffix on its associated tables. |
| protected void | setTableSchemaPerTenant()
INTERNAL: This method is used to update the table per tenant descriptor with a table per tenant schema. |
| public void | setTenantTableDiscriminatorType(TenantTableDiscriminatorType type)
PUBLIC: Set the tenant table discriminator type. |
| public boolean | shouldInitialize(AbstractSession session)
INTERNAL: This method is called during regular descriptor initialization. |
| protected DatabaseTable | updateTable(DatabaseTable table)
INTERNAL: This method will update the table by cloning it and setting a new name on it. |
| public boolean | usesContextProperty(String property)
INTERNAL: Return true if this policy accepts the given property. |
| contextProperty | back to summary |
|---|---|
| protected String contextProperty | |
| contextTenant | back to summary |
|---|---|
| protected String contextTenant | |
| descriptor | back to summary |
|---|---|
| protected ClassDescriptor descriptor | |
| tablePerTenantTables | back to summary |
|---|---|
| protected Map<DatabaseTable, DatabaseTable> tablePerTenantTables | |
| type | back to summary |
|---|---|
| protected TenantTableDiscriminatorType type | |
| TablePerMultitenantPolicy | back to summary |
|---|---|
| pack-priv TablePerMultitenantPolicy() | |
| TablePerMultitenantPolicy | back to summary |
|---|---|
| public TablePerMultitenantPolicy(ClassDescriptor desc) | |
| addFieldsToRow | back to summary |
|---|---|
| public void addFieldsToRow(AbstractRecord row, AbstractSession session) Implements org. INTERNAL:
| |
| addToTableDefinition | back to summary |
|---|---|
| public void addToTableDefinition(TableDefinition tableDefinition) Implements org. INTERNAL:
| |
| clone | back to summary |
|---|---|
| public MultitenantPolicy clone(ClassDescriptor descriptor) Implements org. INTERNAL: Multitenant policies are cloned per inheritance subclass.
| |
| getContextProperty | back to summary |
|---|---|
| public String getContextProperty() INTERNAL: Return the context property for this table per tenant policy. | |
| getTable | back to summary |
|---|---|
| public DatabaseTable getTable(String tableName) INTERNAL: Return the new database table associated with this tenant. | |
| getTable | back to summary |
|---|---|
| public DatabaseTable getTable(DatabaseTable table) INTERNAL: Return the new database table associated with this tenant. | |
| getTableName | back to summary |
|---|---|
| protected String getTableName(DatabaseTable table, String tenant) INTERNAL: Return the tenant table name. | |
| hasContextTenant | back to summary |
|---|---|
| public boolean hasContextTenant() INTERNAL: Return true if the tenant has been set for this policy. | |
| initialize | back to summary |
|---|---|
| public void initialize(AbstractSession session) throws DescriptorException Implements org. INTERNAL:
| |
| isPrefixPerTable | back to summary |
|---|---|
| public boolean isPrefixPerTable() PUBLIC: Return true if this descriptor requires a prefix to the table per tenant. | |
| isSchemaPerMultitenantPolicy | back to summary |
|---|---|
| public boolean isSchemaPerMultitenantPolicy() Implements org. INTERNAL:
| |
| isSchemaPerTable | back to summary |
|---|---|
| public boolean isSchemaPerTable() PUBLIC: Return true if this descriptor requires a table schema per tenant. | |
| isSingleTableMultitenantPolicy | back to summary |
|---|---|
| public boolean isSingleTableMultitenantPolicy() Implements org. INTERNAL:
| |
| isSuffixPerTable | back to summary |
|---|---|
| public boolean isSuffixPerTable() PUBLIC: Return true if this descriptor requires a suffix to the table per tenant. | |
| isTablePerMultitenantPolicy | back to summary |
|---|---|
| public boolean isTablePerMultitenantPolicy() Implements org. INTERNAL:
| |
| postInitialize | back to summary |
|---|---|
| public void postInitialize(AbstractSession session) Implements org. INTERNAL:
| |
| preInitialize | back to summary |
|---|---|
| public void preInitialize(AbstractSession session) throws DescriptorException Implements org. INTERNAL:
| |
| setContextProperty | back to summary |
|---|---|
| public void setContextProperty(String contextProperty) PUBLIC: Set the context property used to define the table per tenant. If it is not set by the user, the policy defaults it to the multitenant property default of "eclipselink.tenant-id" | |
| setContextTenant | back to summary |
|---|---|
| public void setContextTenant(String contextTenant) INTERNAL: | |
| setTablePerTenant | back to summary |
|---|---|
| protected void setTablePerTenant() INTERNAL: This method is used to update the table per tenant descriptor with a table per tenant prefix or suffix on its associated tables. This includes any relation tables from mappings. If the given session is a client session than we must clone the tables. Outside of a client session, assume global usage and no cloning is needed. This method should only be called at the start of a client session lifecycle and should only be called once. | |
| setTableSchemaPerTenant | back to summary |
|---|---|
| protected void setTableSchemaPerTenant() INTERNAL: This method is used to update the table per tenant descriptor with a table per tenant schema. This includes any relation tables from mappings. This will be done through the setting of a table qualifier on the tables. This method should only be called at the start of a client session lifecycle and should only be called once. | |
| setTenantTableDiscriminatorType | back to summary |
|---|---|
| public void setTenantTableDiscriminatorType(TenantTableDiscriminatorType type) PUBLIC: Set the tenant table discriminator type. | |
| shouldInitialize | back to summary |
|---|---|
| public boolean shouldInitialize(AbstractSession session) INTERNAL: This method is called during regular descriptor initialization. When initializing at that level no cloning should be done on when setting the context tenant. | |
| updateTable | back to summary |
|---|---|
| protected DatabaseTable updateTable(DatabaseTable table) INTERNAL: This method will update the table by cloning it and setting a new name on it. The table association will be stored here as well for ease of future look up. | |
| usesContextProperty | back to summary |
|---|---|
| public boolean usesContextProperty(String property) INTERNAL: Return true if this policy accepts the given property. | |