public abstract class AbstractClassTable extends TableImpl
Modifier and Type | Field and Description |
---|---|
protected JavaTypeMapping |
datastoreIdMapping
Mapping for any datastore identity.
|
protected JavaTypeMapping |
discriminatorMapping
Mapping for any discriminator column.
|
protected org.datanucleus.metadata.DiscriminatorMetaData |
discriminatorMetaData
MetaData for discriminator for objects stored in this table.
|
protected int |
highestMemberNumber
Highest absolute field/property number managed by this table
|
protected JavaTypeMapping |
idMapping
Mapping for the overall "identity" of the table.
|
protected Map<org.datanucleus.metadata.AbstractMemberMetaData,JavaTypeMapping> |
memberMappingsMap
Mappings for members mapped to this table, keyed by the metadata for the member.
|
protected JavaTypeMapping |
multitenancyMapping
Mapping for any multi-tenancy column.
|
protected JavaTypeMapping[] |
pkMappings
Mappings for application identity (optional).
|
protected JavaTypeMapping |
softDeleteMapping
Mapping for any soft-delete column.
|
protected JavaTypeMapping |
versionMapping
Mapping for any version/timestamp column.
|
protected org.datanucleus.metadata.VersionMetaData |
versionMetaData
MetaData for versioning of objects stored in this table.
|
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 |
---|
AbstractClassTable(DatastoreIdentifier tableName,
RDBMSStoreManager storeMgr)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addMemberMapping(JavaTypeMapping fieldMapping)
Utility to add the mapping for a field/property to the managed list.
|
abstract org.datanucleus.metadata.IdentityType |
getIdentityType()
Accessor for the identity-type.
|
protected JavaTypeMapping |
getMappingForMemberName(String memberName)
Accessor for the JavaTypeMapping that is handling the member of the specified name.
|
Table |
getPrimaryTable()
Convenience method to return the primary table.
|
Column |
getSurrogateColumn(org.datanucleus.store.schema.table.SurrogateColumnType colType) |
JavaTypeMapping |
getSurrogateMapping(org.datanucleus.store.schema.table.SurrogateColumnType colType,
boolean allowSuperclasses)
Accessor for the mapping for the specified surrogate type.
|
protected abstract void |
initializePK(org.datanucleus.ClassLoaderResolver clr)
Method to initialise the table primary key field(s).
|
abstract boolean |
isObjectIdDatastoreAttributed()
Accessor for whether the table has its identity attributed
by the datastore (e.g using autoincrement)
|
boolean |
managesMapping(JavaTypeMapping mapping)
Convenience method to return if this table manages the columns for the supplied mapping.
|
boolean |
managesMember(String memberName)
Convenience method for whether the (fully-specified) member is managed by this table
|
void |
provideMappingsForMembers(MappingConsumer consumer,
org.datanucleus.metadata.AbstractMemberMetaData[] mmds,
boolean includeSecondaryTables)
Provide the mappings to the consumer for all specified members.
|
void |
provideNonPrimaryKeyMappings(MappingConsumer consumer)
Provide the mappings to the consumer for all non primary-key fields
mapped to this table.
|
abstract void |
providePrimaryKeyMappings(MappingConsumer consumer)
Provide the mappings to the consumer for all primary-key fields mapped to
this table (for application identity).
|
void |
provideSurrogateMapping(org.datanucleus.store.schema.table.SurrogateColumnType colType,
MappingConsumer consumer)
Accessor for a mapping for a surrogate column (if present).
|
createConstraints, dropConstraints, getExpectedCandidateKeys, getExpectedForeignKeys, getExpectedIndices, getPrimaryKey, 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, getDatastoreIdentifierFullyQualified, getDiscriminatorMetaData, getIdentifier, getMemberColumnMappingForEmbeddedMember, getMemberColumnMappingForMember, getMemberColumnMappings, getName, getNumberOfColumns, getSchemaName, getStoreManager, getVersionMetaData, hasColumn, hasColumnName, hashCode, isInitialized, isInitializedModified, isPKInitialized, isValidated, tableExistsInDatastore, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getIdMapping, getMemberMapping, initialize
protected Map<org.datanucleus.metadata.AbstractMemberMetaData,JavaTypeMapping> memberMappingsMap
protected JavaTypeMapping[] pkMappings
protected JavaTypeMapping idMapping
protected JavaTypeMapping datastoreIdMapping
protected JavaTypeMapping versionMapping
protected JavaTypeMapping discriminatorMapping
protected JavaTypeMapping multitenancyMapping
protected JavaTypeMapping softDeleteMapping
protected org.datanucleus.metadata.VersionMetaData versionMetaData
protected org.datanucleus.metadata.DiscriminatorMetaData discriminatorMetaData
protected int highestMemberNumber
public AbstractClassTable(DatastoreIdentifier tableName, RDBMSStoreManager storeMgr)
tableName
- Name of the tablestoreMgr
- Store Manager that is managing this instancepublic Table getPrimaryTable()
protected abstract void initializePK(org.datanucleus.ClassLoaderResolver clr)
clr
- The ClassLoaderResolverpublic boolean managesMember(String memberName)
memberName
- Fully qualified name of the field/propertyprotected JavaTypeMapping getMappingForMemberName(String memberName)
memberName
- Name of the field/propertypublic boolean managesMapping(JavaTypeMapping mapping)
mapping
- The mappingprotected void addMemberMapping(JavaTypeMapping fieldMapping)
fieldMapping
- The mapping for the field/propertypublic abstract org.datanucleus.metadata.IdentityType getIdentityType()
public abstract boolean isObjectIdDatastoreAttributed()
public Column getSurrogateColumn(org.datanucleus.store.schema.table.SurrogateColumnType colType)
getSurrogateColumn
in interface org.datanucleus.store.schema.table.Table
getSurrogateColumn
in class AbstractTable
public JavaTypeMapping getSurrogateMapping(org.datanucleus.store.schema.table.SurrogateColumnType colType, boolean allowSuperclasses)
Table
getSurrogateMapping
in class AbstractTable
colType
- Column type for the surrogateallowSuperclasses
- Whether to allow searching superclasses when not specified in this table.public abstract void providePrimaryKeyMappings(MappingConsumer consumer)
consumer
- Consumer for the mappingspublic final void provideNonPrimaryKeyMappings(MappingConsumer consumer)
consumer
- Consumer for the mappingspublic void provideMappingsForMembers(MappingConsumer consumer, org.datanucleus.metadata.AbstractMemberMetaData[] mmds, boolean includeSecondaryTables)
consumer
- Consumer for the mappingsmmds
- MetaData for the members to provide mappings forincludeSecondaryTables
- Whether to provide members in secondary tablespublic final void provideSurrogateMapping(org.datanucleus.store.schema.table.SurrogateColumnType colType, MappingConsumer consumer)
colType
- The type of the surrogate columnconsumer
- Consumer for the mappingsCopyright © 2019. All rights reserved.