|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jpox.store.rdbms.table.AbstractTable
org.jpox.store.rdbms.table.TableImpl
org.jpox.store.rdbms.table.JoinTable
org.jpox.store.rdbms.table.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 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 java.lang.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.jpox.store.rdbms.table.JoinTable |
fmd, ownerMapping, ownerType |
Fields inherited from class org.jpox.store.rdbms.table.AbstractTable |
columns, columnsByName, dba, ddlDumpWriter, identifier, LOCALISER, state, storeMgr |
Fields inherited from interface org.jpox.store.rdbms.table.Table |
TABLE_STATE_INITIALIZED, TABLE_STATE_INITIALIZED_MODIFIED, TABLE_STATE_NEW, TABLE_STATE_PK_INITIALIZED, TABLE_STATE_VALIDATED, TABLE_TYPE_MISSING, TABLE_TYPE_TABLE, TABLE_TYPE_UNKNOWN, TABLE_TYPE_VIEW |
Constructor Summary | |
ElementContainerTable(DatastoreIdentifier tableName,
AbstractPropertyMetaData fmd,
RDBMSManager storeMgr)
Constructor. |
Method Summary | |
protected void |
applyUserPrimaryKeySpecification(PrimaryKeyMetaData pkmd)
Convenience method to apply the user specification of |
JavaTypeMapping |
getElementMapping()
Accessor for the "element" mapping end of the relationship. |
abstract java.lang.String |
getElementType()
Access the element type class name |
protected java.util.List |
getExpectedCandidateKeys()
Accessor for the candidate keys for this table. |
protected java.util.List |
getExpectedForeignKeys(ClassLoaderResolver clr)
Accessor for the expected foreign keys for this table. |
protected java.util.Set |
getExpectedIndices(ClassLoaderResolver clr)
Accessor for the indices for this table. |
JavaTypeMapping |
getFieldMapping(AbstractPropertyMetaData fmd)
Accessor not used by 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 |
getOrderMapping()
Accessor for the order mapping. |
JavaTypeMapping |
getRelationDiscriminatorMapping()
Accessor for the element discriminator mapping. |
java.lang.String |
getRelationDiscriminatorValue()
Accessor for the element discriminator value. |
void |
initialize(ClassLoaderResolver clr)
Method to initialise the table definition. |
Methods inherited from class org.jpox.store.rdbms.table.JoinTable |
getIDMapping, getOwnerFieldMetaData, getOwnerMapping, getPrimaryKey, requiresPrimaryKey |
Methods inherited from class org.jpox.store.rdbms.table.TableImpl |
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.jpox.store.rdbms.table.SCOTable |
getOwnerMapping |
Methods inherited from interface org.jpox.store.rdbms.table.Table |
create, drop, exists, getCatalogName, getSchemaName, isInitialized, isInitializedModified, isValidated, postInitialize, preInitialize, validate |
Methods inherited from interface org.jpox.store.DatastoreContainerObject |
addDatastoreField, getDiscriminatorMapping, getDiscriminatorMetaData, getIDMapping, getVersionMapping, getVersionMetaData, hasDatastoreField |
Methods inherited from interface org.jpox.store.DatastoreObject |
getIdentifier, getStoreManager |
Field Detail |
protected JavaTypeMapping elementMapping
protected JavaTypeMapping orderMapping
protected JavaTypeMapping relationDiscriminatorMapping
protected java.lang.String relationDiscriminatorValue
Constructor Detail |
public ElementContainerTable(DatastoreIdentifier tableName, AbstractPropertyMetaData fmd, RDBMSManager storeMgr)
tableName
- Identifier name of the tablefmd
- MetaData for the field of the ownerstoreMgr
- The Store Manager managing these tables.Method Detail |
public void initialize(ClassLoaderResolver clr)
initialize
in interface Table
clr
- The ClassLoaderResolverpublic abstract java.lang.String getElementType()
protected void applyUserPrimaryKeySpecification(PrimaryKeyMetaData pkmd)
pkmd
- MetaData for the primary keypublic JavaTypeMapping getFieldMapping(AbstractPropertyMetaData fmd)
getFieldMapping
in interface DatastoreContainerObject
fmd
- MetaData for the field whose mapping we want
public JavaTypeMapping getElementMapping()
public JavaTypeMapping getOrderMapping()
public JavaTypeMapping getRelationDiscriminatorMapping()
public java.lang.String getRelationDiscriminatorValue()
protected ForeignKey getForeignKeyToOwner(DatastoreClass ownerTable, boolean autoMode)
ownerTable
- The owner tableautoMode
- Whether we are in auto mode (where JPOX generates 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 JPOX generates the keys regardless of what
the metadata says)m
- The mapping to the element table
protected java.util.List getExpectedForeignKeys(ClassLoaderResolver clr)
getExpectedForeignKeys
in class TableImpl
clr
- The ClassLoaderResolver
protected java.util.Set getExpectedIndices(ClassLoaderResolver clr)
getExpectedIndices
in class TableImpl
clr
- The ClassLoaderResolver
protected java.util.List getExpectedCandidateKeys()
getExpectedCandidateKeys
in class TableImpl
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |