|
||||||||||
| 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
public class 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, toString, 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 ClassLoaderResolver| Method Detail |
|---|
public void initialize(ClassLoaderResolver clr)
initialize in interface Tableclr - The ClassLoaderResolverpublic void postInitialize(ClassLoaderResolver clr)
postInitialize in interface TablepostInitialize in class ViewImplclr - the ClassLoaderResolverpublic JavaTypeMapping getIDMapping()
getIDMapping in interface DatastoreContainerObjectpublic DatastoreClass getBaseDatastoreClassWithField(AbstractPropertyMetaData fmd)
getBaseDatastoreClassWithField in interface DatastoreClassfmd - MetaData for the field
public JavaTypeMapping getDataStoreObjectIdMapping()
getDataStoreObjectIdMapping in interface DatastoreClasspublic AbstractPropertyMetaData getFieldMetaData(java.lang.String fieldName)
getFieldMetaData in interface DatastoreClassfieldName - Name of the field
public IdentityType getIdentityType()
getIdentityType in interface DatastoreClasspublic boolean isBaseDatastoreClass()
isBaseDatastoreClass in interface DatastoreClasspublic boolean isObjectIDDatastoreAttributed()
isObjectIDDatastoreAttributed in interface DatastoreClasspublic void delete(StateManager sm)
delete in interface DatastoreClasssm - StateManager of object
public void deleteDependent(StateManager sm,
AbstractPropertyMetaData[] fieldMetaData)
deleteDependent in interface DatastoreClasssm - StateManager for the objectfieldMetaData - MetaData for the fields
public void fetch(StateManager sm,
AbstractPropertyMetaData[] fieldMetaData)
fetch in interface DatastoreClasssm - StateManager of the objectfieldMetaData - MetaData for fields to fetchpublic void insert(StateManager sm)
insert in interface DatastoreClasssm - StateManager for object.public void locate(StateManager sm)
locate in interface DatastoreClasssm - StateManager for object
public void update(StateManager sm,
AbstractPropertyMetaData[] fieldMetaData)
update in interface DatastoreClasssm - StateManager of owner objectfieldMetaData - MetaData of fields to updatepublic void provideDatastoreIdMappings(MappingConsumer consumer)
DatastoreClass
provideDatastoreIdMappings in interface DatastoreClassconsumer - Consumer for the mappingspublic void provideDiscriminatorMappings(MappingConsumer consumer)
DatastoreClass
provideDiscriminatorMappings in interface DatastoreClassconsumer - Consumer for the mappings
public void provideMappingsForFields(MappingConsumer consumer,
AbstractPropertyMetaData[] fieldNumbers,
boolean includeSecondaryTables)
DatastoreClass
provideMappingsForFields in interface DatastoreClassconsumer - 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 DatastoreClassconsumer - Consumer for the mappingspublic void providePrimaryKeyMappings(MappingConsumer consumer)
DatastoreClass
providePrimaryKeyMappings in interface DatastoreClassconsumer - Consumer for the mappingspublic void provideVersionMappings(MappingConsumer consumer)
DatastoreClass
provideVersionMappings in interface DatastoreClassconsumer - Consumer for the version mappingspublic void provideExternalFkMappings(MappingConsumer consumer)
DatastoreClass
provideExternalFkMappings in interface DatastoreClassconsumer - Consumer for the mappingspublic void provideExternalOrderMappings(MappingConsumer consumer)
DatastoreClass
provideExternalOrderMappings in interface DatastoreClassconsumer - Consumer for the mappings
public final java.lang.Object newOID(PersistenceManager pm,
javax.jdo.spi.PersistenceCapable pc)
newOID in interface DatastoreClasspm - The PersistenceManagerpc - The persistence capable object
public java.lang.String getType()
getType in interface DatastoreClasspublic JavaTypeMapping getFieldMapping(AbstractPropertyMetaData fmd)
getFieldMapping in interface DatastoreClassgetFieldMapping in interface DatastoreContainerObjectfmd - the AbstractPropertyMetaData
public JavaTypeMapping getFieldMapping(java.lang.String fieldName)
getFieldMapping in interface DatastoreClassfieldName - Name of the field
protected java.util.List getSQLCreateStatements(java.util.Properties props)
getSQLCreateStatements in class AbstractTableprops - Properties for controlling the creation of views
public final DiscriminatorMetaData getDiscriminatorMetaData()
getDiscriminatorMetaData in interface DatastoreContainerObjectgetDiscriminatorMetaData in class AbstractTablepublic JavaTypeMapping getDiscriminatorMapping()
getDiscriminatorMapping in interface DatastoreContainerObjectgetDiscriminatorMapping in class AbstractTablepublic final VersionMetaData getVersionMetaData()
getVersionMetaData in interface DatastoreContainerObjectgetVersionMetaData in class AbstractTablepublic JavaTypeMapping getVersionMapping()
getVersionMapping in interface DatastoreContainerObjectgetVersionMapping in class AbstractTablepublic JavaTypeMapping getExternalOrderMapping(AbstractPropertyMetaData fmd)
DatastoreClass
getExternalOrderMapping in interface DatastoreClassfmd - The metadata for the List field.
public JavaTypeMapping getExternalFkDiscriminatorMapping(AbstractPropertyMetaData fmd)
DatastoreClass
getExternalFkDiscriminatorMapping in interface DatastoreClassfmd - The metadata for the field.
public JavaTypeMapping getExternalFkMapping(AbstractPropertyMetaData fmd)
DatastoreClass
getExternalFkMapping in interface DatastoreClassfmd - The metadata for the field.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||