public class ClassView extends ViewImpl implements DatastoreClass
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 |
---|
ClassView(DatastoreIdentifier tableName,
RDBMSStoreManager storeMgr,
org.datanucleus.metadata.ClassMetaData cmd)
Constructor for class view.
|
Modifier and Type | Method and Description |
---|---|
DatastoreClass |
getBaseDatastoreClass()
Accessor for the base datastore class.
|
DatastoreClass |
getBaseDatastoreClassWithMember(org.datanucleus.metadata.AbstractMemberMetaData mmd)
Accessor for the base datastore class (table) managing the given field.
|
org.datanucleus.metadata.DiscriminatorMetaData |
getDiscriminatorMetaData()
Accessor for Discriminator MetaData
|
JavaTypeMapping |
getExternalMapping(org.datanucleus.metadata.AbstractMemberMetaData mmd,
MappingType mappingType)
Accessor for the external mapping for the specified member of the specified mapping type.
|
org.datanucleus.metadata.AbstractMemberMetaData |
getFieldMetaData(String fieldName)
Accessor for the MetaData for the named field
|
org.datanucleus.metadata.IdentityType |
getIdentityType()
Accessor for the identity type in use.
|
JavaTypeMapping |
getIdMapping()
Accessor for a mapping for the ID.
|
String[] |
getManagedClasses()
Accessor for the names of all classes managed by this table.
|
JavaTypeMapping |
getMemberMapping(org.datanucleus.metadata.AbstractMemberMetaData mmd)
Accessor for the mapping for the specified field/property.
|
JavaTypeMapping |
getMemberMapping(String fieldName)
Accessor for the field mapping for the specified field name.
|
JavaTypeMapping |
getMemberMappingInDatastoreClass(org.datanucleus.metadata.AbstractMemberMetaData mmd)
Accessor for the mapping for the specified field only in this datastore class.
|
org.datanucleus.metadata.AbstractMemberMetaData |
getMetaDataForExternalMapping(JavaTypeMapping mapping,
MappingType mappingType)
Accessor for the owner field metadata for the specified external mapping of the specified type
|
Collection |
getSecondaryDatastoreClasses()
Accessor for any secondary tables for this table.
|
protected List<String> |
getSQLCreateStatements(Properties props)
Method to return the necessary SQL create statements for this table.
|
DatastoreClass |
getSuperDatastoreClass()
Accessor for the supertable for this table.
|
Column |
getSurrogateColumn(org.datanucleus.store.schema.table.SurrogateColumnType colType) |
String |
getType()
Accessor for the type of the class being represented by this view.
|
org.datanucleus.metadata.VersionMetaData |
getVersionMetaData()
Accessor for Version MetaData
|
void |
initialize(org.datanucleus.ClassLoaderResolver clr)
Method to initialise the view.
|
boolean |
isBaseDatastoreClass()
Accessor for whether this is a base datastore class (root in a hierarchy).
|
boolean |
isObjectIdDatastoreAttributed()
Accessor for whether the object ID is attributed in the datastore.
|
boolean |
isSuperDatastoreClass(DatastoreClass table)
Accessor whether the supplied DatastoreClass is a supertable of this table.
|
boolean |
managesClass(String className)
Accessor for whether this table manages the specified class
|
boolean |
managesMapping(JavaTypeMapping mapping)
Convenience method to return if this table manages the columns for the supplied mapping.
|
void |
postInitialize(org.datanucleus.ClassLoaderResolver clr)
Post initilize.
|
void |
provideExternalMappings(MappingConsumer consumer,
MappingType mappingType)
Instruction to provide all external mappings to the passed consumer.
|
void |
provideMappingsForMembers(MappingConsumer consumer,
org.datanucleus.metadata.AbstractMemberMetaData[] fieldNumbers,
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.
|
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)
Provide the mapping for the specified surrogate column (if present).
|
void |
provideUnmappedColumns(MappingConsumer consumer)
Method to provide all unmapped datastore fields (columns) to the consumer.
|
addColumnInternal, getSQLDropStatements, preInitialize, validate
addColumn, allowDDLOutput, assertIsInitialized, assertIsInitializedModified, assertIsPKInitialized, assertIsPKUninitialized, assertIsUninitialized, assertIsValidated, create, drop, equals, executeDdlStatement, executeDdlStatementList, exists, getCatalogName, getClassMetaData, getColumn, getColumnForName, getColumnForPosition, getColumns, getDatastoreIdentifierFullyQualified, getIdentifier, getMemberColumnMappingForEmbeddedMember, getMemberColumnMappingForMember, getMemberColumnMappings, getName, getNumberOfColumns, getSchemaName, getStoreManager, getSurrogateMapping, hasColumn, hasColumnName, hashCode, isInitialized, isInitializedModified, isPKInitialized, isValidated, tableExistsInDatastore, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
toString
addColumn, create, drop, exists, getColumn, getIdentifier, getStoreManager, getSurrogateMapping, hasColumn, isInitialized, isInitializedModified, isValidated, preInitialize, validate
getCatalogName, getClassMetaData, getColumnForName, getColumnForPosition, getColumns, getMemberColumnMappingForEmbeddedMember, getMemberColumnMappingForMember, getMemberColumnMappings, getName, getNumberOfColumns, getSchemaName
public ClassView(DatastoreIdentifier tableName, RDBMSStoreManager storeMgr, org.datanucleus.metadata.ClassMetaData cmd)
tableName
- The name of the view.storeMgr
- The RDBMS manager managing this viewcmd
- The metadata for the class represented by this view.public void initialize(org.datanucleus.ClassLoaderResolver clr)
clr
- The ClassLoaderResolverpublic void postInitialize(org.datanucleus.ClassLoaderResolver clr)
postInitialize
in class ViewImpl
clr
- the ClassLoaderResolverpublic JavaTypeMapping getIdMapping()
public DatastoreClass getBaseDatastoreClassWithMember(org.datanucleus.metadata.AbstractMemberMetaData mmd)
getBaseDatastoreClassWithMember
in interface DatastoreClass
mmd
- MetaData for the fieldpublic DatastoreClass getSuperDatastoreClass()
getSuperDatastoreClass
in interface DatastoreClass
public boolean isSuperDatastoreClass(DatastoreClass table)
isSuperDatastoreClass
in interface DatastoreClass
table
- The DatastoreClass to checkpublic Collection getSecondaryDatastoreClasses()
getSecondaryDatastoreClasses
in interface DatastoreClass
public boolean managesClass(String className)
managesClass
in interface DatastoreClass
className
- Name of the classpublic String[] getManagedClasses()
DatastoreClass
getManagedClasses
in interface DatastoreClass
public boolean managesMapping(JavaTypeMapping mapping)
managesMapping
in interface DatastoreClass
mapping
- The mappingpublic org.datanucleus.metadata.AbstractMemberMetaData getFieldMetaData(String fieldName)
fieldName
- Name of the fieldpublic org.datanucleus.metadata.IdentityType getIdentityType()
getIdentityType
in interface DatastoreClass
public boolean isBaseDatastoreClass()
isBaseDatastoreClass
in interface DatastoreClass
public DatastoreClass getBaseDatastoreClass()
DatastoreClass
getBaseDatastoreClass
in interface DatastoreClass
public boolean isObjectIdDatastoreAttributed()
isObjectIdDatastoreAttributed
in interface DatastoreClass
public void provideSurrogateMapping(org.datanucleus.store.schema.table.SurrogateColumnType colType, MappingConsumer consumer)
DatastoreClass
provideSurrogateMapping
in interface DatastoreClass
colType
- Type of surrogate columnconsumer
- The consumer for the mappingpublic void provideMappingsForMembers(MappingConsumer consumer, org.datanucleus.metadata.AbstractMemberMetaData[] fieldNumbers, boolean includeSecondaryTables)
DatastoreClass
provideMappingsForMembers
in interface DatastoreClass
consumer
- Consumer for the mappingsfieldNumbers
- MetaData of the fields/properties to provide mappings forincludeSecondaryTables
- Whether to supply fields in secondary tablespublic void providePrimaryKeyMappings(MappingConsumer consumer)
DatastoreClass
providePrimaryKeyMappings
in interface DatastoreClass
consumer
- Consumer for the mappingspublic void provideNonPrimaryKeyMappings(MappingConsumer consumer)
DatastoreClass
provideNonPrimaryKeyMappings
in interface DatastoreClass
consumer
- Consumer for the mappingspublic void provideExternalMappings(MappingConsumer consumer, MappingType mappingType)
DatastoreClass
provideExternalMappings
in interface DatastoreClass
consumer
- The consumer for the mappingsmappingType
- Type of external mapping to providepublic void provideUnmappedColumns(MappingConsumer consumer)
provideUnmappedColumns
in interface DatastoreClass
consumer
- Consumer of informationpublic String getType()
getType
in interface DatastoreClass
public JavaTypeMapping getMemberMapping(org.datanucleus.metadata.AbstractMemberMetaData mmd)
getMemberMapping
in interface DatastoreClass
mmd
- Metadata for the field/propertypublic JavaTypeMapping getMemberMappingInDatastoreClass(org.datanucleus.metadata.AbstractMemberMetaData mmd)
getMemberMappingInDatastoreClass
in interface DatastoreClass
mmd
- Metadata of the field/propertypublic JavaTypeMapping getMemberMapping(String fieldName)
getMemberMapping
in interface DatastoreClass
fieldName
- Name of the fieldprotected List<String> getSQLCreateStatements(Properties props)
getSQLCreateStatements
in class AbstractTable
props
- Properties for controlling the creation of viewspublic Column getSurrogateColumn(org.datanucleus.store.schema.table.SurrogateColumnType colType)
getSurrogateColumn
in interface org.datanucleus.store.schema.table.Table
getSurrogateColumn
in class AbstractTable
public final org.datanucleus.metadata.DiscriminatorMetaData getDiscriminatorMetaData()
getDiscriminatorMetaData
in class AbstractTable
public final org.datanucleus.metadata.VersionMetaData getVersionMetaData()
getVersionMetaData
in class AbstractTable
public JavaTypeMapping getExternalMapping(org.datanucleus.metadata.AbstractMemberMetaData mmd, MappingType mappingType)
DatastoreClass
getExternalMapping
in interface DatastoreClass
mmd
- MetaData for the (external) field/propertymappingType
- The type of mappingpublic org.datanucleus.metadata.AbstractMemberMetaData getMetaDataForExternalMapping(JavaTypeMapping mapping, MappingType mappingType)
DatastoreClass
getMetaDataForExternalMapping
in interface DatastoreClass
mapping
- The external mappingmappingType
- The type of mappingCopyright © 2019. All rights reserved.