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.
|
JavaTypeMapping |
getDatastoreIdMapping()
Accessor for the datastore identity id mapping.
|
JavaTypeMapping |
getDiscriminatorMapping(boolean allowSuperclasses)
Accessor for the discriminator mapping specified .
|
org.datanucleus.metadata.DiscriminatorMetaData |
getDiscriminatorMetaData()
Accessor for Discriminator MetaData
|
JavaTypeMapping |
getExternalMapping(org.datanucleus.metadata.AbstractMemberMetaData fmd,
int mappingType)
Accessor for the external mapping for the specified field of the specified 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,
int 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 |
getSQLCreateStatements(Properties props)
Method to return the necessary SQL create statements for this table.
|
DatastoreClass |
getSuperDatastoreClass()
Accessor for the supertable for this table.
|
String |
getType()
Accessor for the type of the class being represented by this view.
|
JavaTypeMapping |
getVersionMapping(boolean allowSuperclasses)
Accessor for the version mapping specified .
|
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 |
provideDatastoreIdMappings(MappingConsumer consumer)
Accessor for a mapping for the datastore ID (OID) for this table.
|
void |
provideDiscriminatorMappings(MappingConsumer consumer)
Provide the mappings to discriminator mappings
|
void |
provideExternalMappings(MappingConsumer consumer,
int 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 |
provideMultitenancyMapping(MappingConsumer consumer)
Provide the mapping for multitenancy discriminator (if any).
|
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 |
provideUnmappedColumns(MappingConsumer consumer)
Method to provide all unmapped datastore fields (columns) to the consumer.
|
void |
provideVersionMappings(MappingConsumer consumer)
Provide the mappings to version mappings
|
addColumnInternal, getSQLDropStatements, preInitialize, validateaddColumn, allowDDLOutput, assertIsInitialized, assertIsInitializedModified, assertIsPKInitialized, assertIsPKUninitialized, assertIsUninitialized, assertIsValidated, create, drop, equals, executeDdlStatement, executeDdlStatementList, exists, getCatalogName, getClassMetaData, getColumn, getColumnForName, getColumnForPosition, getColumns, getDatastoreIdColumn, getDatastoreIdentifierFullyQualified, getDiscriminatorColumn, getIdentifier, getMemberColumnMappingForEmbeddedMember, getMemberColumnMappingForMember, getMemberColumnMappings, getMultitenancyColumn, getMultitenancyMapping, getName, getNumberOfColumns, getSchemaName, getStoreManager, getVersionColumn, hasColumn, hasColumnName, hashCode, isInitialized, isInitializedModified, isPKInitialized, isValidated, tableExistsInDatastore, toStringclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waittoStringaddColumn, create, drop, exists, getColumn, getIdentifier, getMultitenancyMapping, getStoreManager, hasColumn, isInitialized, isInitializedModified, isValidated, preInitialize, validategetCatalogName, getClassMetaData, getColumnForName, getColumnForPosition, getColumns, getDatastoreIdColumn, getDiscriminatorColumn, getMemberColumnMappingForEmbeddedMember, getMemberColumnMappingForMember, getMemberColumnMappings, getMultitenancyColumn, getName, getNumberOfColumns, getSchemaName, getVersionColumnpublic 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 ViewImplclr - the ClassLoaderResolverpublic JavaTypeMapping getIdMapping()
public DatastoreClass getBaseDatastoreClassWithMember(org.datanucleus.metadata.AbstractMemberMetaData mmd)
getBaseDatastoreClassWithMember in interface DatastoreClassmmd - MetaData for the fieldpublic DatastoreClass getSuperDatastoreClass()
getSuperDatastoreClass in interface DatastoreClasspublic boolean isSuperDatastoreClass(DatastoreClass table)
isSuperDatastoreClass in interface DatastoreClasstable - The DatastoreClass to checkpublic Collection getSecondaryDatastoreClasses()
getSecondaryDatastoreClasses in interface DatastoreClasspublic JavaTypeMapping getDatastoreIdMapping()
getDatastoreIdMapping in interface DatastoreClasspublic boolean managesClass(String className)
managesClass in interface DatastoreClassclassName - Name of the classpublic String[] getManagedClasses()
DatastoreClassgetManagedClasses in interface DatastoreClasspublic boolean managesMapping(JavaTypeMapping mapping)
managesMapping in interface DatastoreClassmapping - The mappingpublic org.datanucleus.metadata.AbstractMemberMetaData getFieldMetaData(String fieldName)
fieldName - Name of the fieldpublic org.datanucleus.metadata.IdentityType getIdentityType()
getIdentityType in interface DatastoreClasspublic boolean isBaseDatastoreClass()
isBaseDatastoreClass in interface DatastoreClasspublic DatastoreClass getBaseDatastoreClass()
DatastoreClassgetBaseDatastoreClass in interface DatastoreClasspublic boolean isObjectIdDatastoreAttributed()
isObjectIdDatastoreAttributed in interface DatastoreClasspublic void provideDatastoreIdMappings(MappingConsumer consumer)
DatastoreClassprovideDatastoreIdMappings in interface DatastoreClassconsumer - Consumer for the mappingspublic void provideDiscriminatorMappings(MappingConsumer consumer)
DatastoreClassprovideDiscriminatorMappings in interface DatastoreClassconsumer - Consumer for the mappingspublic void provideMultitenancyMapping(MappingConsumer consumer)
DatastoreClassprovideMultitenancyMapping in interface DatastoreClassconsumer - Consumer for the mappingpublic void provideMappingsForMembers(MappingConsumer consumer, org.datanucleus.metadata.AbstractMemberMetaData[] fieldNumbers, boolean includeSecondaryTables)
DatastoreClassprovideMappingsForMembers in interface DatastoreClassconsumer - Consumer for the mappingsfieldNumbers - MetaData of the fields/properties to provide mappings forincludeSecondaryTables - Whether to supply fields in secondary tablespublic void provideNonPrimaryKeyMappings(MappingConsumer consumer)
DatastoreClassprovideNonPrimaryKeyMappings in interface DatastoreClassconsumer - Consumer for the mappingspublic void providePrimaryKeyMappings(MappingConsumer consumer)
DatastoreClassprovidePrimaryKeyMappings in interface DatastoreClassconsumer - Consumer for the mappingspublic void provideVersionMappings(MappingConsumer consumer)
DatastoreClassprovideVersionMappings in interface DatastoreClassconsumer - Consumer for the version mappingspublic void provideExternalMappings(MappingConsumer consumer, int mappingType)
DatastoreClassprovideExternalMappings in interface DatastoreClassconsumer - The consumer for the mappingsmappingType - Type of external mapping to providepublic void provideUnmappedColumns(MappingConsumer consumer)
provideUnmappedColumns in interface DatastoreClassconsumer - Consumer of informationpublic String getType()
getType in interface DatastoreClasspublic JavaTypeMapping getMemberMapping(org.datanucleus.metadata.AbstractMemberMetaData mmd)
getMemberMapping in interface DatastoreClassmmd - Metadata for the field/propertypublic JavaTypeMapping getMemberMappingInDatastoreClass(org.datanucleus.metadata.AbstractMemberMetaData mmd)
getMemberMappingInDatastoreClass in interface DatastoreClassmmd - Metadata of the field/propertypublic JavaTypeMapping getMemberMapping(String fieldName)
getMemberMapping in interface DatastoreClassfieldName - Name of the fieldprotected List getSQLCreateStatements(Properties props)
getSQLCreateStatements in class AbstractTableprops - Properties for controlling the creation of viewspublic final org.datanucleus.metadata.DiscriminatorMetaData getDiscriminatorMetaData()
getDiscriminatorMetaData in class AbstractTablepublic JavaTypeMapping getDiscriminatorMapping(boolean allowSuperclasses)
getDiscriminatorMapping in class AbstractTableallowSuperclasses - Whether we should return just the mapping from this table
or whether we should return it when this table has none and the supertable haspublic final org.datanucleus.metadata.VersionMetaData getVersionMetaData()
getVersionMetaData in class AbstractTablepublic JavaTypeMapping getVersionMapping(boolean allowSuperclasses)
getVersionMapping in class AbstractTableallowSuperclasses - Whether we should return just the mapping from this table
or whether we should return it when this table has none and the supertable haspublic JavaTypeMapping getExternalMapping(org.datanucleus.metadata.AbstractMemberMetaData fmd, int mappingType)
DatastoreClassgetExternalMapping in interface DatastoreClassfmd - MetaData for the (external) field/propertymappingType - The type of mappingpublic org.datanucleus.metadata.AbstractMemberMetaData getMetaDataForExternalMapping(JavaTypeMapping mapping, int mappingType)
DatastoreClassgetMetaDataForExternalMapping in interface DatastoreClassmapping - The external mappingmappingType - The type of mappingCopyright © 2017. All rights reserved.