public abstract class ElementContainerTable extends JoinTable
Modifier and Type | Field and Description |
---|---|
protected JavaTypeMapping |
elementMapping
Mapping of an element.
|
protected JavaTypeMapping |
orderMapping
Order mapping, to provide part of the primary key.
|
protected JavaTypeMapping |
relationDiscriminatorMapping
Optional mapping for a column used to discriminate between elements of one collection from another.
|
protected String |
relationDiscriminatorValue
Value to use with any relation discriminator column for objects of this field placed in the join table.
|
mmd, ownerMapping, ownerType
columns, columnsByIdentifier, dba, existsInDatastore, identifier, state, storeMgr, TABLE_STATE_INITIALIZED, TABLE_STATE_INITIALIZED_MODIFIED, TABLE_STATE_NEW, TABLE_STATE_PK_INITIALIZED, TABLE_STATE_VALIDATED
Constructor and Description |
---|
ElementContainerTable(DatastoreIdentifier tableName,
org.datanucleus.metadata.AbstractMemberMetaData mmd,
RDBMSStoreManager storeMgr)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
applyUserPrimaryKeySpecification(org.datanucleus.metadata.PrimaryKeyMetaData pkmd)
Convenience method to apply the user specification of <primary-key> columns
|
JavaTypeMapping |
getElementMapping()
Accessor for the "element" mapping end of the relationship.
|
abstract String |
getElementType()
Access the element type class name
|
protected List |
getExpectedCandidateKeys()
Accessor for the candidate keys for this table.
|
List |
getExpectedForeignKeys(org.datanucleus.ClassLoaderResolver clr)
Accessor for the expected foreign keys for this table.
|
protected Set |
getExpectedIndices(org.datanucleus.ClassLoaderResolver clr)
Accessor for the indices for this table.
|
protected ForeignKey |
getForeignKeyToElement(DatastoreClass elementTable,
boolean autoMode,
JavaTypeMapping m)
Convenience method to generate a ForeignKey from this join table to an element table
using the specified mapping.
|
protected ForeignKey |
getForeignKeyToOwner(DatastoreClass ownerTable,
boolean autoMode)
Convenience method to generate a ForeignKey from this join table to an owner table.
|
JavaTypeMapping |
getMemberMapping(org.datanucleus.metadata.AbstractMemberMetaData mmd)
Accessor not used by this table.
|
JavaTypeMapping |
getOrderMapping()
Accessor for the order mapping.
|
JavaTypeMapping |
getRelationDiscriminatorMapping()
Accessor for the element discriminator mapping.
|
String |
getRelationDiscriminatorValue()
Accessor for the element discriminator value.
|
void |
initialize(org.datanucleus.ClassLoaderResolver clr)
Method to initialise the table definition.
|
getIdMapping, getOwnerMapping, getOwnerMemberMetaData, getPrimaryKey, requiresPrimaryKey
createConstraints, dropConstraints, getSQLAddCandidateKeyStatements, getSQLAddFKStatements, getSQLCreateIndexStatements, getSQLCreateStatements, getSQLDropStatements, initializeColumnInfoForPrimaryKeyColumns, initializeColumnInfoFromDatastore, logMapping, postInitialize, preInitialize, validate, validateColumns, validateConstraints, validatePrimaryKey
addColumn, addColumnInternal, allowDDLOutput, assertIsInitialized, assertIsInitializedModified, assertIsPKInitialized, assertIsPKUninitialized, assertIsUninitialized, assertIsValidated, create, drop, equals, executeDdlStatement, executeDdlStatementList, exists, getCatalogName, getClassMetaData, getColumn, getColumnForName, getColumnForPosition, getColumns, getDatastoreIdColumn, getDatastoreIdentifierFullyQualified, getDiscriminatorColumn, getDiscriminatorMapping, getDiscriminatorMetaData, getIdentifier, getMemberColumnMappingForEmbeddedMember, getMemberColumnMappingForMember, getMemberColumnMappings, getMultitenancyColumn, getMultitenancyMapping, getName, getNumberOfColumns, getSchemaName, getStoreManager, getVersionColumn, getVersionMapping, getVersionMetaData, hasColumn, hasColumnName, hashCode, isInitialized, isInitializedModified, isPKInitialized, isValidated, tableExistsInDatastore, toString
protected JavaTypeMapping elementMapping
protected JavaTypeMapping orderMapping
protected JavaTypeMapping relationDiscriminatorMapping
protected String relationDiscriminatorValue
public ElementContainerTable(DatastoreIdentifier tableName, org.datanucleus.metadata.AbstractMemberMetaData mmd, RDBMSStoreManager storeMgr)
tableName
- Identifier name of the tablemmd
- MetaData for the field/property owning this join tablestoreMgr
- The Store Manager managing these tables.public void initialize(org.datanucleus.ClassLoaderResolver clr)
clr
- The ClassLoaderResolverpublic abstract String getElementType()
protected void applyUserPrimaryKeySpecification(org.datanucleus.metadata.PrimaryKeyMetaData pkmd)
pkmd
- MetaData for the primary keypublic JavaTypeMapping getMemberMapping(org.datanucleus.metadata.AbstractMemberMetaData mmd)
mmd
- MetaData for the field whose mapping we wantpublic JavaTypeMapping getElementMapping()
public JavaTypeMapping getOrderMapping()
public JavaTypeMapping getRelationDiscriminatorMapping()
public String getRelationDiscriminatorValue()
protected ForeignKey getForeignKeyToOwner(DatastoreClass ownerTable, boolean autoMode)
ownerTable
- The owner tableautoMode
- Whether we are in auto mode (where we generate the keys regardless of what the metadata says)protected ForeignKey getForeignKeyToElement(DatastoreClass elementTable, boolean autoMode, JavaTypeMapping m)
elementTable
- The element tableautoMode
- Whether we are in auto mode (where we generate the keys regardless of what the metadata says)m
- The mapping to the element tablepublic List getExpectedForeignKeys(org.datanucleus.ClassLoaderResolver clr)
getExpectedForeignKeys
in class TableImpl
clr
- The ClassLoaderResolverprotected Set getExpectedIndices(org.datanucleus.ClassLoaderResolver clr)
getExpectedIndices
in class TableImpl
clr
- The ClassLoaderResolverprotected List getExpectedCandidateKeys()
getExpectedCandidateKeys
in class TableImpl
Copyright © 2017. All rights reserved.