|
|||||||||||
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.ViewImpl
org.jpox.store.rdbms.table.ClassView
Representation of an SQL View for a Class. Requires that the class use "nondurable" identity. Since a view is read-only, many methods throw exceptions that the operation is not supported.
Field Summary |
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 | |
ClassView(DatastoreIdentifier tableName,
ClassMetaData cmd,
RDBMSManager storeMgr,
ClassLoaderResolver clr)
Constructor for class view. |
Method Summary | |
void |
delete(StateManager sm)
Method to delete an object from the view. |
void |
deleteDependent(StateManager sm,
AbstractPropertyMetaData[] fieldMetaData)
Method to delete the dependent objects. |
void |
fetch(StateManager sm,
AbstractPropertyMetaData[] fieldMetaData)
Method to fetch the fields of an object from the View. |
DatastoreClass |
getBaseDatastoreClassWithField(AbstractPropertyMetaData fmd)
Accessor for the base datastore class (table) managing the given field. |
JavaTypeMapping |
getDataStoreObjectIdMapping()
Accessor for the datastore identity id mapping. |
JavaTypeMapping |
getDiscriminatorMapping()
Accessor for the discriminator mapping specified . |
DiscriminatorMetaData |
getDiscriminatorMetaData()
Accessor for Discriminator MetaData |
JavaTypeMapping |
getExternalFkDiscriminatorMapping(AbstractPropertyMetaData fmd)
Accessor for the external FK discriminator mapping for an owner field. |
JavaTypeMapping |
getExternalFkMapping(AbstractPropertyMetaData fmd)
Accessor for the external FK mapping for an owner field. |
JavaTypeMapping |
getExternalOrderMapping(AbstractPropertyMetaData fmd)
Accessor for the external order mapping specified by the field. |
JavaTypeMapping |
getFieldMapping(AbstractPropertyMetaData fmd)
Accessor for the mapping for the specified AbstractPropertyMetaData. |
JavaTypeMapping |
getFieldMapping(java.lang.String fieldName)
Accessor for the field mapping for the specified field name. |
AbstractPropertyMetaData |
getFieldMetaData(java.lang.String fieldName)
Accessor for the MetaData for the named field |
IdentityType |
getIdentityType()
Accessor for the identity type in use. |
JavaTypeMapping |
getIDMapping()
Accessor for a mapping for the ID. |
protected java.util.List |
getSQLCreateStatements(java.util.Properties props)
Method to return the necessary SQL create statements for this table. |
java.lang.String |
getType()
Accessor for the type of the class being represented by this view. |
JavaTypeMapping |
getVersionMapping()
Accessor for the version mapping specified . |
VersionMetaData |
getVersionMetaData()
Accessor for Version MetaData |
void |
initialize(ClassLoaderResolver clr)
Method to initialise the view. |
void |
insert(StateManager sm)
Method to insert and object into 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. |
void |
locate(StateManager sm)
Method to locate an object in the view. |
java.lang.Object |
newOID(PersistenceManager pm,
javax.jdo.spi.PersistenceCapable pc)
Create a newOID for a class. |
void |
postInitialize(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 |
provideExternalFkMappings(MappingConsumer consumer)
Provide the mappings to external FK mappings |
void |
provideExternalOrderMappings(MappingConsumer consumer)
Provide the mappings to external order mappings |
void |
provideMappingsForFields(MappingConsumer consumer,
AbstractPropertyMetaData[] fieldNumbers,
boolean includeSecondaryTables)
Provide the mappings to the consumer for all absolute field Numbers in this table that are container in the fieldNumbers parameter. |
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 |
provideVersionMappings(MappingConsumer consumer)
Provide the mappings to version mappings |
void |
update(StateManager sm,
AbstractPropertyMetaData[] fieldMetaData)
Method to update a view row. |
Methods inherited from class org.jpox.store.rdbms.table.ViewImpl |
addColumnInternal, getSQLDropStatements, preInitialize, validate |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.jpox.store.DatastoreClass |
toString |
Methods inherited from interface org.jpox.store.DatastoreContainerObject |
addDatastoreField, hasDatastoreField |
Methods inherited from interface org.jpox.store.DatastoreObject |
getIdentifier, getStoreManager |
Constructor Detail |
public ClassView(DatastoreIdentifier tableName, ClassMetaData cmd, RDBMSManager storeMgr, ClassLoaderResolver clr)
tableName
- The name of the view.cmd
- The metadata for the class represented by this view.storeMgr
- The RDBMS manager managing this viewclr
- The ClassLoaderResolverMethod Detail |
public void initialize(ClassLoaderResolver clr)
initialize
in interface Table
clr
- The ClassLoaderResolverpublic void postInitialize(ClassLoaderResolver clr)
postInitialize
in interface Table
postInitialize
in class ViewImpl
clr
- the ClassLoaderResolverpublic JavaTypeMapping getIDMapping()
getIDMapping
in interface DatastoreContainerObject
public DatastoreClass getBaseDatastoreClassWithField(AbstractPropertyMetaData fmd)
getBaseDatastoreClassWithField
in interface DatastoreClass
fmd
- MetaData for the field
public JavaTypeMapping getDataStoreObjectIdMapping()
getDataStoreObjectIdMapping
in interface DatastoreClass
public AbstractPropertyMetaData getFieldMetaData(java.lang.String fieldName)
getFieldMetaData
in interface DatastoreClass
fieldName
- Name of the field
public IdentityType getIdentityType()
getIdentityType
in interface DatastoreClass
public boolean isBaseDatastoreClass()
isBaseDatastoreClass
in interface DatastoreClass
public boolean isObjectIDDatastoreAttributed()
isObjectIDDatastoreAttributed
in interface DatastoreClass
public void delete(StateManager sm)
delete
in interface DatastoreClass
sm
- StateManager of objectpublic void deleteDependent(StateManager sm, AbstractPropertyMetaData[] fieldMetaData)
deleteDependent
in interface DatastoreClass
sm
- StateManager for the objectfieldMetaData
- MetaData for the fieldspublic void fetch(StateManager sm, AbstractPropertyMetaData[] fieldMetaData)
fetch
in interface DatastoreClass
sm
- StateManager of the objectfieldMetaData
- MetaData for fields to fetchpublic void insert(StateManager sm)
insert
in interface DatastoreClass
sm
- StateManager for object.public void locate(StateManager sm)
locate
in interface DatastoreClass
sm
- StateManager for objectpublic void update(StateManager sm, AbstractPropertyMetaData[] fieldMetaData)
update
in interface DatastoreClass
sm
- StateManager of owner objectfieldMetaData
- MetaData of fields to updatepublic void provideDatastoreIdMappings(MappingConsumer consumer)
DatastoreClass
provideDatastoreIdMappings
in interface DatastoreClass
consumer
- Consumer for the mappingspublic void provideDiscriminatorMappings(MappingConsumer consumer)
DatastoreClass
provideDiscriminatorMappings
in interface DatastoreClass
consumer
- Consumer for the mappingspublic void provideMappingsForFields(MappingConsumer consumer, AbstractPropertyMetaData[] fieldNumbers, boolean includeSecondaryTables)
DatastoreClass
provideMappingsForFields
in interface DatastoreClass
consumer
- Consumer for the mappingsfieldNumbers
- MetaData of the fields to provide mappings forincludeSecondaryTables
- Whether to supply fields in secondary tablespublic void provideNonPrimaryKeyMappings(MappingConsumer consumer)
DatastoreClass
provideNonPrimaryKeyMappings
in interface DatastoreClass
consumer
- Consumer for the mappingspublic void providePrimaryKeyMappings(MappingConsumer consumer)
DatastoreClass
providePrimaryKeyMappings
in interface DatastoreClass
consumer
- Consumer for the mappingspublic void provideVersionMappings(MappingConsumer consumer)
DatastoreClass
provideVersionMappings
in interface DatastoreClass
consumer
- Consumer for the version mappingspublic void provideExternalFkMappings(MappingConsumer consumer)
DatastoreClass
provideExternalFkMappings
in interface DatastoreClass
consumer
- Consumer for the mappingspublic void provideExternalOrderMappings(MappingConsumer consumer)
DatastoreClass
provideExternalOrderMappings
in interface DatastoreClass
consumer
- Consumer for the mappingspublic final java.lang.Object newOID(PersistenceManager pm, javax.jdo.spi.PersistenceCapable pc)
newOID
in interface DatastoreClass
pm
- The PersistenceManagerpc
- The persistence capable object
public java.lang.String getType()
getType
in interface DatastoreClass
public JavaTypeMapping getFieldMapping(AbstractPropertyMetaData fmd)
getFieldMapping
in interface DatastoreClass
fmd
- the AbstractPropertyMetaData
public JavaTypeMapping getFieldMapping(java.lang.String fieldName)
getFieldMapping
in interface DatastoreClass
fieldName
- Name of the field
protected java.util.List getSQLCreateStatements(java.util.Properties props)
getSQLCreateStatements
in class AbstractTable
props
- Properties for controlling the creation of views
public final DiscriminatorMetaData getDiscriminatorMetaData()
getDiscriminatorMetaData
in interface DatastoreContainerObject
getDiscriminatorMetaData
in class AbstractTable
public JavaTypeMapping getDiscriminatorMapping()
getDiscriminatorMapping
in interface DatastoreContainerObject
getDiscriminatorMapping
in class AbstractTable
public final VersionMetaData getVersionMetaData()
getVersionMetaData
in interface DatastoreContainerObject
getVersionMetaData
in class AbstractTable
public JavaTypeMapping getVersionMapping()
getVersionMapping
in interface DatastoreContainerObject
getVersionMapping
in class AbstractTable
public JavaTypeMapping getExternalOrderMapping(AbstractPropertyMetaData fmd)
DatastoreClass
getExternalOrderMapping
in interface DatastoreClass
fmd
- The metadata for the List field.
public JavaTypeMapping getExternalFkDiscriminatorMapping(AbstractPropertyMetaData fmd)
DatastoreClass
getExternalFkDiscriminatorMapping
in interface DatastoreClass
fmd
- The metadata for the field.
public JavaTypeMapping getExternalFkMapping(AbstractPropertyMetaData fmd)
DatastoreClass
getExternalFkMapping
in interface DatastoreClass
fmd
- The metadata for the field.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |