|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.store.rdbms.table.AbstractTable
org.datanucleus.store.rdbms.table.TableImpl
org.datanucleus.store.rdbms.table.JoinTable
org.datanucleus.store.rdbms.table.ElementContainerTable
public abstract class ElementContainerTable
Representation of a join table for a container of elements. Can be used for collections, lists, sets and arrays. There can be multiple JoinTable objects referring to the same underlying datastore object. If the JoinTable is shared by multiple fields for example then there will be one for each relation.
| Field Summary | |
|---|---|
protected org.datanucleus.store.mapped.mapping.JavaTypeMapping |
elementMapping
Mapping of an element. |
protected org.datanucleus.store.mapped.mapping.JavaTypeMapping |
orderMapping
Order mapping, to provide part of the primary key. |
protected org.datanucleus.store.mapped.mapping.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. |
| Fields inherited from class org.datanucleus.store.rdbms.table.JoinTable |
|---|
mmd, ownerMapping, ownerType |
| Fields inherited from class org.datanucleus.store.rdbms.table.AbstractTable |
|---|
columns, columnsByName, dba, existsInDatastore, identifier, LOCALISER, state, storeMgr, TABLE_STATE_INITIALIZED, TABLE_STATE_INITIALIZED_MODIFIED, TABLE_STATE_NEW, TABLE_STATE_PK_INITIALIZED, TABLE_STATE_VALIDATED |
| Constructor Summary | |
|---|---|
ElementContainerTable(org.datanucleus.store.mapped.DatastoreIdentifier tableName,
org.datanucleus.metadata.AbstractMemberMetaData mmd,
RDBMSStoreManager storeMgr)
Constructor. |
|
| Method Summary | |
|---|---|
protected void |
applyUserPrimaryKeySpecification(org.datanucleus.metadata.PrimaryKeyMetaData pkmd)
Convenience method to apply the user specification of |
org.datanucleus.store.mapped.mapping.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(org.datanucleus.store.mapped.DatastoreClass elementTable,
boolean autoMode,
org.datanucleus.store.mapped.mapping.JavaTypeMapping m)
Convenience method to generate a ForeignKey from this join table to an element table using the specified mapping. |
protected ForeignKey |
getForeignKeyToOwner(org.datanucleus.store.mapped.DatastoreClass ownerTable,
boolean autoMode)
Convenience method to generate a ForeignKey from this join table to an owner table. |
org.datanucleus.store.mapped.mapping.JavaTypeMapping |
getMemberMapping(org.datanucleus.metadata.AbstractMemberMetaData mmd)
Accessor not used by this table. |
org.datanucleus.store.mapped.mapping.JavaTypeMapping |
getOrderMapping()
Accessor for the order mapping. |
org.datanucleus.store.mapped.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. |
| Methods inherited from class org.datanucleus.store.rdbms.table.JoinTable |
|---|
debugMapping, getIdMapping, getOwnerMapping, getOwnerMemberMetaData, getPrimaryKey, requiresPrimaryKey |
| Methods inherited from class org.datanucleus.store.rdbms.table.TableImpl |
|---|
createConstraints, dropConstraints, getSQLAddCandidateKeyStatements, getSQLAddFKStatements, getSQLCreateIndexStatements, getSQLCreateStatements, getSQLDropStatements, initializeColumnInfoForPrimaryKeyColumns, initializeColumnInfoFromDatastore, postInitialize, preInitialize, validate, validateColumns, validateConstraints, validatePrimaryKey |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.datanucleus.store.mapped.DatastoreContainerObject |
|---|
addDatastoreField, getDatastoreField, getDatastoreFields, getDiscriminatorMapping, getDiscriminatorMetaData, getIdentifier, getMultitenancyMapping, getStoreManager, getVersionMapping, getVersionMetaData, hasDatastoreField |
| Field Detail |
|---|
protected org.datanucleus.store.mapped.mapping.JavaTypeMapping elementMapping
protected org.datanucleus.store.mapped.mapping.JavaTypeMapping orderMapping
protected org.datanucleus.store.mapped.mapping.JavaTypeMapping relationDiscriminatorMapping
protected String relationDiscriminatorValue
| Constructor Detail |
|---|
public ElementContainerTable(org.datanucleus.store.mapped.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.| Method Detail |
|---|
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 org.datanucleus.store.mapped.mapping.JavaTypeMapping getMemberMapping(org.datanucleus.metadata.AbstractMemberMetaData mmd)
mmd - MetaData for the field whose mapping we want
public org.datanucleus.store.mapped.mapping.JavaTypeMapping getElementMapping()
public org.datanucleus.store.mapped.mapping.JavaTypeMapping getOrderMapping()
public org.datanucleus.store.mapped.mapping.JavaTypeMapping getRelationDiscriminatorMapping()
public String getRelationDiscriminatorValue()
protected ForeignKey getForeignKeyToOwner(org.datanucleus.store.mapped.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(org.datanucleus.store.mapped.DatastoreClass elementTable,
boolean autoMode,
org.datanucleus.store.mapped.mapping.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 table
public List getExpectedForeignKeys(org.datanucleus.ClassLoaderResolver clr)
getExpectedForeignKeys in class TableImplclr - The ClassLoaderResolver
protected Set getExpectedIndices(org.datanucleus.ClassLoaderResolver clr)
getExpectedIndices in class TableImplclr - The ClassLoaderResolver
protected List getExpectedCandidateKeys()
getExpectedCandidateKeys in class TableImpl
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||