SolarMetric Kodo JDO 3.3.5 generated on August 31 2005

kodo.jdbc.meta
Class AbstractClassMapping

java.lang.Object
  |
  +--kodo.meta.DelegatingExtensions
        |
        +--kodo.meta.DelegatingClassMetaData
              |
              +--kodo.jdbc.meta.AbstractClassMapping
All Implemented Interfaces:
ClassMapping, ClassMetaData, Commentable, Comparable, Extensions, Mapping, SourceTracker
Direct Known Subclasses:
BaseClassMapping, FlatClassMapping, HorizontalClassMapping, NoneClassMapping, VerticalClassMapping

public abstract class AbstractClassMapping
extends DelegatingClassMetaData
implements ClassMapping, Mapping

Mapping from a class to a relational schema.

In addition to the bean methods for simple metadata attributes, the following methods are available before resolve() has been called: getDeclaredFieldMapping(int), getDeclaredFieldMapping(String), getDeclaredFieldMappings(). If the superclass mapping has been set or if this is a base class, then getPrimaryKeyFieldMappings() and ClassMapping.getPrimaryKeyColumns() are also available before resolve.


Fields inherited from interface kodo.jdbc.meta.ClassMapping
AUTO_INCREMENT, CLASS_IND, CLASS_INDEXED, CLASS_INDICATOR_VALUE, CLASS_MAP, EXTENSION_KEYS, REF_DELETE_ACTION, SEQUENCE_FACTORY, SEQUENCE_NAME, VERSION_IND, VERSION_INDEXED
 
Fields inherited from interface kodo.meta.ClassMetaData
DATA_CACHE, DATA_CACHE_TIMEOUT, DETACH_FALSE, DETACH_OID_FIELD, DETACH_SERIALIZE, DETACH_STATE_FIELD, DETACH_TRUE, DETACHABLE, ID_APPLICATION, ID_DATASTORE, ID_NONDURABLE, LOCK_GROUPS, SUBCLASS_FETCH_MODE, VALIDATE_ALL, VALIDATE_NONE, VALIDATE_NORESOLVE, VALIDATE_RUNTIME, VALIDATE_UNENHANCED
 
Constructor Summary
AbstractClassMapping(ClassMetaData meta)
          Constructor.
 
Method Summary
 void addDeclaredField(FieldMetaData field)
          Add a persistent or transactional field to this class.
 void addExtensionKeys(Collection exts)
          Add all the known extension keys to the specified collection; any implementation that utilized new extensions should override this method to include both the known extensions of its superclass as well as its own extension keys.
 void addMappingInfoAttributes(Collection attrs)
          Add all mapping attributes names used by this mapping to the given collection.
protected  void assertResolved()
          Throw an exception if this mapping has not been resolved.
protected  FieldMapping createDefaultFieldMapping(FieldMetaData fmd)
          Create a default FieldMapping instance for this mapping type.
 void delete(KodoStateManager sm, JDBCStoreManager store)
          Override this method to customize flushing this mapping.
 void fromMappingInfo(MappingInfo info, boolean adapt)
          The default implementation will raise warnings for any mapping attributes that are declared but not in the list of the valid attributes for this mapping.
 int getClassIndicatorIndexed()
          The value of the class indicator indexed extension.
 String getClassIndicatorName()
          The value of the class indicator name extension.
 String getClassMappingName()
          The value of the class mapping name extension.
 Object getDataStoreValue(Object obj, Column[] cols)
          Return the given column value(s) for the given object.
 DBDictionary getDBDictionary()
          Return the dictionary that this mapping uses.
 FieldMetaData getDeclaredField(int index)
          Return the metadata for the persistent or transactional field with the given relative index.
 FieldMetaData getDeclaredField(String name)
          Return the metadata for the persistent or transactional field with the given name, without including superclass fields.
 FieldMapping getDeclaredFieldMapping(int index)
          Convenience method to make casting from getDeclaredField(int) unnecessary.
 FieldMapping getDeclaredFieldMapping(String name)
          Convenience method to make casting from getDeclaredField(int) unnecessary.
 FieldMapping[] getDeclaredFieldMappings()
          Convenience method to make casting from getDeclaredFields() unnecessary.
 FieldMetaData[] getDeclaredFields()
          Return only the fields for this class, without superclass fields.
 FieldMapping[] getDefaultFetchGroupFieldMappings()
          Convenience method to make casting from getDefaultFetchGroupFields() unnecessary.
 FieldMetaData[] getDefaultFetchGroupFields()
          Return the list of fields in the default fetch group, including superclass fields, or an empty array if none.
 FieldMapping getEmbeddingMapping()
          If this is an embedded mapping, return the owning field.
 FieldMetaData getField(int index)
          Return the metadata for the persistent or transactional field with the given absolute index.
 FieldMetaData getField(String name)
          Return the metadata for the persistent or transactional field with the given name.
 FieldMapping getFieldMapping(FieldMetaData fmd)
          Return the field mapping for the given metadata.
 FieldMapping getFieldMapping(int index)
          Convenience method to make casting from getField(int) unnecessary.
 FieldMapping getFieldMapping(String name)
          Convenience method to make casting from getField(int) unnecessary.
 FieldMapping[] getFieldMappings()
          Convenience method to make casting from getFields() unnecessary.
 FieldMetaData[] getFields()
          Return all field metadatas, including superclass fields.
 JoinableMapping getJoinableMapping(Column col)
          Return the joinable mapping for the given column.
 FieldMapping[] getMappedFieldMappings()
          Returns an array of all the field mappings mapped by this class.
 ClassMappingInfo getMappingInfo()
          Return the mapping info that was used to create this mapping, if any.
 MappingRepository getMappingRepository()
          Return the mapping repository for this mapping.
 ClassMetaData getMetaData()
          Return the underlying class metadata.
 ClassMapping[] getNonVirtualMappings()
          Returns the closest-derived list of non-virtual mappings for this mapping.
 ClassMapping getNonVirtualPCSuperclassMapping()
          Return the nearest superclass mapping whose ClassMapping.isVirtualMapping() method returns true will be skipped.
 Object getObjectId(JDBCStoreManager store, Result res, ForeignKey fk, Joins joins)
          Return the oid value stored in the result.
 ClassMapping[] getPCSubclassMappings()
          Return all the known subclass mappings for this mapping.
 ClassMetaData[] getPCSubclassMetaDatas()
          Return the metadata for the known persistence capable subclasses of the described type, or empty array if none.
 ClassMapping getPCSuperclassMapping()
          Convenience method to make casting from getPCSuperclassMetaData() unnecessary.
 ClassMetaData getPCSuperclassMetaData()
          Return the metadata for the persistence capable superclass of the described type, or null if the metadata did not specify one.
 FieldMapping[] getPrimaryKeyFieldMappings()
          Convenience method to make casting from getPrimaryKeyFields() unnecessary.
 FieldMetaData[] getPrimaryKeyFields()
          Return primary key fields, or empty array if none.
 int getRefDeleteAction()
          The reference foreign key action.
 JDOMetaDataRepository getRepository()
          Return the owning repository.
 String getSequenceFactory()
          The value of the sequence factory extension.
 SequenceFactory getSequenceFactoryInstance()
          Return the sequence factory for this type, based on its sequence factory metadata extensions.
 int getVersionIndicatorIndexed()
          The value of the version indicator indexed extension.
 String getVersionIndicatorName()
          The value of the version indicator name extension.
 void insert(KodoStateManager sm, JDBCStoreManager store)
          Override this method to customize flushing this mapping.
 void invalidateResolve()
          For implementation use.
 boolean isAutoIncrement()
          True if this class uses an auto-increment datastore primary key.
 Boolean isCustomDelete(KodoStateManager sm)
          Return Boolean.FALSE if this mapping does not customize the delete process, Boolean.TRUE if it does, or null if it does customize the delete, but also relies on the standard delete method being called.
 Boolean isCustomInsert(KodoStateManager sm)
          Return Boolean.FALSE if this mapping does not customize the insert process, Boolean.TRUE if it does, or null if it does customize the insert, but also relies on the standard insert method being called.
 Boolean isCustomUpdate(KodoStateManager sm)
          Return Boolean.FALSE if this mapping does not customize the update process, Boolean.TRUE if it does, or null if it does customize the update, but also relies on the standard update method being called.
 boolean isRefDeleteActionDeferred()
          The reference foreign key action.
 boolean isResolved()
          For implementation use.
 ResultObjectProvider load(JDBCStoreManager store, boolean subclasses, JDBCFetchConfiguration fetch, long startIdx, long endIdx)
          Override this method to customize obtaining a result containing all instances of this class.
 boolean load(KodoStateManager sm, JDBCStoreManager store, JDBCFetchConfiguration fetch, Result result)
          Override this method to customize loading a Result into an instance.
 boolean load(KodoStateManager sm, JDBCStoreManager store, JDOState state, JDBCFetchConfiguration fetch)
          Override this method to load the state of a given object, returning true if this method handles the load.
 boolean removeDeclaredField(FieldMetaData field)
          Remove the given field from management.
 void resolve()
          For implementation use.
 void reverseMap(SchemaGroup schema, ReverseMappingTool tool)
          Create mappings from the schema, using the given tool.
 void setAutoIncrement(boolean autoInc)
          True if this class uses an auto-increment datastore primary key.
 void setAutoIncrementValue(KodoStateManager sm, JDBCStoreManager store, Column col, Connection conn)
          Set the next auto increment value for the given column into the given instance.
 void setClassIndicatorIndexed(int idx)
          The value of the class indicator indexed extension.
 void setClassIndicatorName(String ind)
          The value of the class indicator name extension.
 void setClassMappingName(String map)
          The value of the class mapping name extension.
 void setMappingInfo(ClassMappingInfo info)
          Set the mapping info that was used to create this class.
 void setPCSuperclassMapping(ClassMapping superMapping)
          Set the superclass mapping.
 void setPCSuperclassMetaData(ClassMetaData meta)
          Set the metadata for this class' superclass.
 void setRefDeleteAction(int action, boolean deferred)
          The reference foreign key action.
 void setRepository(JDOMetaDataRepository repos)
          The supplied repository must be a MappingRepository.
 void setSequenceFactory(String plugin)
          The value of the sequence factory extension.
 void setVersionIndicatorIndexed(int idx)
          The value of the version indicator indexed extension.
 void setVersionIndicatorName(String ind)
          The value of the version indicator name extension.
 boolean supportsEagerSelect(Select sel, KodoStateManager sm, ClassMapping base, JDBCStoreManager store, JDBCFetchConfiguration fetch)
          Return true if this mapping can perform the given select from the given base mapping.
 void update(KodoStateManager sm, JDBCStoreManager store)
          Override this method to customize flushing this mapping.
 
Methods inherited from class kodo.meta.DelegatingClassMetaData
compareTo, equals, getComments, getDataCache, getDataCacheName, getDataCacheTimeout, getDeclaredUnmanagedFields, getDelegate, getDescribedType, getDetachable, getDetachObjectId, getDetachObjectIdField, getDetachState, getDetachStateField, getFieldsInListingOrder, getIdentityType, getInnermostDelegate, getLeastDerivedMetaData, getObjectIdClass, getPCSubclasses, getPCSuperclass, getPMClassLoader, getRequiresExtent, getSourceFile, getSubclassFetchMode, getTrackedResourceName, getValidate, hashCode, isEnhanced, isInstanceCallbacks, isMemberField, isSingleFieldIdentity, setDataCacheName, setDataCacheTimeout, setDescribedType, setDetachable, setDetachObjectId, setDetachState, setIdentityType, setObjectIdClass, setPCSuperclass, setPMClassLoader, setRequiresExtent, setSingleFieldIdentity, setSourceFile, setSubclassFetchMode, setValidate, toString
 
Methods inherited from class kodo.meta.DelegatingExtensions
addExtension, addExtension, getBooleanExtension, getBooleanExtension, getDoubleExtension, getDoubleExtension, getEmbeddedExtensions, getEmbeddedExtensions, getExtensionComments, getExtensionKeys, getExtensionKeys, getExtensionVendors, getIntExtension, getIntExtension, getObjectExtension, getObjectExtension, getStringExtension, getStringExtension, hasExtension, hasExtension, isEmpty, removeEmbeddedExtensions, removeEmbeddedExtensions, removeExtension, removeExtension
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface kodo.jdbc.meta.ClassMapping
getClassIndicator, getPrimaryKeyColumns, getVersionIndicator, isPrimaryKeyObjectId, isVirtualMapping, joinSuperclass, setClassIndicator, setVersionIndicator
 
Methods inherited from interface kodo.meta.ClassMetaData
getDataCache, getDataCacheName, getDataCacheTimeout, getDeclaredUnmanagedFields, getDescribedType, getDetachable, getDetachObjectId, getDetachObjectIdField, getDetachState, getDetachStateField, getFieldsInListingOrder, getIdentityType, getLeastDerivedMetaData, getObjectIdClass, getPCSubclasses, getPCSuperclass, getPMClassLoader, getRequiresExtent, getSourceFile, getSubclassFetchMode, getValidate, isEnhanced, isInstanceCallbacks, isMemberField, isSingleFieldIdentity, setDataCacheName, setDataCacheTimeout, setDescribedType, setDetachable, setDetachObjectId, setDetachState, setIdentityType, setObjectIdClass, setPCSuperclass, setPMClassLoader, setRequiresExtent, setSingleFieldIdentity, setSourceFile, setSubclassFetchMode, setValidate
 
Methods inherited from interface kodo.meta.Extensions
addExtension, addExtension, getBooleanExtension, getBooleanExtension, getDoubleExtension, getDoubleExtension, getEmbeddedExtensions, getEmbeddedExtensions, getExtensionComments, getExtensionKeys, getExtensionKeys, getExtensionVendors, getIntExtension, getIntExtension, getObjectExtension, getObjectExtension, getStringExtension, getStringExtension, hasExtension, hasExtension, isEmpty, removeEmbeddedExtensions, removeEmbeddedExtensions, removeExtension, removeExtension
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface com.solarmetric.meta.SourceTracker
getTrackedResourceName
 
Methods inherited from interface kodo.meta.Commentable
getComments
 
Methods inherited from interface kodo.jdbc.meta.Mapping
delete, getMappingType, getTable, insert, map, refSchemaComponents, toMappingInfo, update
 

Constructor Detail

AbstractClassMapping

public AbstractClassMapping(ClassMetaData meta)
Constructor. Supply underlying metadata.
Method Detail

fromMappingInfo

public void fromMappingInfo(MappingInfo info,
                            boolean adapt)
The default implementation will raise warnings for any mapping attributes that are declared but not in the list of the valid attributes for this mapping.
Specified by:
fromMappingInfo in interface Mapping
See Also:
addMappingInfoAttributes(java.util.Collection)

addExtensionKeys

public void addExtensionKeys(Collection exts)
Description copied from interface: Extensions
Add all the known extension keys to the specified collection; any implementation that utilized new extensions should override this method to include both the known extensions of its superclass as well as its own extension keys.
Specified by:
addExtensionKeys in interface Extensions
Overrides:
addExtensionKeys in class DelegatingExtensions

addMappingInfoAttributes

public void addMappingInfoAttributes(Collection attrs)
Description copied from interface: Mapping
Add all mapping attributes names used by this mapping to the given collection. For foreign key attributes, add the prefix.
Specified by:
addMappingInfoAttributes in interface Mapping

getMappingRepository

public MappingRepository getMappingRepository()
Description copied from interface: ClassMapping
Return the mapping repository for this mapping.
Specified by:
getMappingRepository in interface ClassMapping

getMappingInfo

public ClassMappingInfo getMappingInfo()
Description copied from interface: ClassMapping
Return the mapping info that was used to create this mapping, if any.
Specified by:
getMappingInfo in interface ClassMapping

setMappingInfo

public void setMappingInfo(ClassMappingInfo info)
Description copied from interface: ClassMapping
Set the mapping info that was used to create this class.
Specified by:
setMappingInfo in interface ClassMapping

getNonVirtualMappings

public ClassMapping[] getNonVirtualMappings()
Description copied from interface: ClassMapping
Returns the closest-derived list of non-virtual mappings for this mapping. When ClassMapping.isVirtualMapping() returns false, this method will simply return the current mapping.
Specified by:
getNonVirtualMappings in interface ClassMapping

getEmbeddingMapping

public FieldMapping getEmbeddingMapping()
Description copied from interface: ClassMapping
If this is an embedded mapping, return the owning field. Returns null by default.
Specified by:
getEmbeddingMapping in interface ClassMapping

getJoinableMapping

public JoinableMapping getJoinableMapping(Column col)
Description copied from interface: ClassMapping
Return the joinable mapping for the given column. Any column that another mapping joins to must be controlled by a joinable mapping, unless it is a datastore identity column. This base class takes care of caching joinable mappings for all fields, and detecting requests for the datastore identity column. Class mappings that must link to their superclass table will usually have additional joinable mappings for the columns used for linking.
Specified by:
getJoinableMapping in interface ClassMapping

getObjectId

public Object getObjectId(JDBCStoreManager store,
                          Result res,
                          ForeignKey fk,
                          Joins joins)
                   throws SQLException
Description copied from interface: ClassMapping
Return the oid value stored in the result. This implementation will recurse until it finds an ancestor class who uses oid values for its primary key.
Specified by:
getObjectId in interface ClassMapping
Following copied from interface: kodo.jdbc.meta.ClassMapping
Parameters:
fk - if non-null, use the local columns of the given foreign key in place of this class' primary key columns
See Also:
ClassMapping.isPrimaryKeyObjectId(boolean)

setAutoIncrementValue

public void setAutoIncrementValue(KodoStateManager sm,
                                  JDBCStoreManager store,
                                  Column col,
                                  Connection conn)
                           throws SQLException
Description copied from interface: ClassMapping
Set the next auto increment value for the given column into the given instance.
Specified by:
setAutoIncrementValue in interface ClassMapping

reverseMap

public void reverseMap(SchemaGroup schema,
                       ReverseMappingTool tool)
Description copied from interface: Mapping
Create mappings from the schema, using the given tool. Implement this method if you want the class mapping to be a candidate when reverse-mapping a schema to java classes. Note that this method will be invoked on a template instance, so you cannot rely on the metadata or owning repository being set.
Specified by:
reverseMap in interface Mapping

getDataStoreValue

public Object getDataStoreValue(Object obj,
                                Column[] cols)
Description copied from interface: ClassMapping
Return the given column value(s) for the given object. The given columns will be primary key columns of this mapping, but may be in any order. If there is only one column, return its value. If there are multiple columns, return an object array of their values, in the same order the columns are given.
Specified by:
getDataStoreValue in interface ClassMapping

isCustomInsert

public Boolean isCustomInsert(KodoStateManager sm)
Description copied from interface: Mapping
Return Boolean.FALSE if this mapping does not customize the insert process, Boolean.TRUE if it does, or null if it does customize the insert, but also relies on the standard insert method being called. Implement the Mapping.insert(KodoStateManager,JDBCStoreManager) method to implement the custom insertion behavior.
Specified by:
isCustomInsert in interface Mapping

isCustomUpdate

public Boolean isCustomUpdate(KodoStateManager sm)
Description copied from interface: Mapping
Return Boolean.FALSE if this mapping does not customize the update process, Boolean.TRUE if it does, or null if it does customize the update, but also relies on the standard update method being called. Implement the Mapping.update(KodoStateManager,JDBCStoreManager) method to override the default update behavior.
Specified by:
isCustomUpdate in interface Mapping

isCustomDelete

public Boolean isCustomDelete(KodoStateManager sm)
Description copied from interface: Mapping
Return Boolean.FALSE if this mapping does not customize the delete process, Boolean.TRUE if it does, or null if it does customize the delete, but also relies on the standard delete method being called. Implement the Mapping.delete(KodoStateManager,JDBCStoreManager) method to override the default deletion behavior.
Specified by:
isCustomDelete in interface Mapping

insert

public void insert(KodoStateManager sm,
                   JDBCStoreManager store)
            throws SQLException
Description copied from interface: Mapping
Override this method to customize flushing this mapping. For classes, this method must also flush all fields. For fields, this method is called after the owning object is inserted, so if this field is in a row with other fields, that row will already exist.
Specified by:
insert in interface Mapping

update

public void update(KodoStateManager sm,
                   JDBCStoreManager store)
            throws SQLException
Description copied from interface: Mapping
Override this method to customize flushing this mapping. For classes, this method must also flush all fields.
Specified by:
update in interface Mapping

delete

public void delete(KodoStateManager sm,
                   JDBCStoreManager store)
            throws SQLException
Description copied from interface: Mapping
Override this method to customize flushing this mapping. For classes, this method must also flush all fields. For fields, this method will be called after the owning object is deleted.
Specified by:
delete in interface Mapping

supportsEagerSelect

public boolean supportsEagerSelect(Select sel,
                                   KodoStateManager sm,
                                   ClassMapping base,
                                   JDBCStoreManager store,
                                   JDBCFetchConfiguration fetch)
Description copied from interface: ClassMapping
Return true if this mapping can perform the given select from the given base mapping. The given state manager may be null if selecting multiple instances. By default, returns true.
Specified by:
supportsEagerSelect in interface ClassMapping

load

public ResultObjectProvider load(JDBCStoreManager store,
                                 boolean subclasses,
                                 JDBCFetchConfiguration fetch,
                                 long startIdx,
                                 long endIdx)
                          throws SQLException
Description copied from interface: ClassMapping
Override this method to customize obtaining a result containing all instances of this class. Returns null by default.
Specified by:
load in interface ClassMapping

load

public boolean load(KodoStateManager sm,
                    JDBCStoreManager store,
                    JDOState state,
                    JDBCFetchConfiguration fetch)
             throws SQLException,
                    ClassNotFoundException
Description copied from interface: ClassMapping

Override this method to load the state of a given object, returning true if this method handles the load. If the object does not exist in the data store, simply take no action on it (but still return true). Returns false by default.

This method is invoked when Kodo has not performed any query against the database yet. This means that you must go to the database to fetch the needed data for this call. Contrast with ClassMapping.load(KodoStateManager,JDBCStoreManager,JDBCFetchConfiguration,Result).

Specified by:
load in interface ClassMapping
Following copied from interface: kodo.jdbc.meta.ClassMapping
Parameters:
state - if non-null, then you must initialize the state and persistent object of the given state manager (after determining the actual class of the object from the database, if there are possible persistent subclasses); initialization looks like this: sm.initialize (ImplHelper.getJDOHelper ().newInstance (pcClass, sm, sm.getObjectId ()), state); , where the ImplHelper class is in the kodo.util package

load

public boolean load(KodoStateManager sm,
                    JDBCStoreManager store,
                    JDBCFetchConfiguration fetch,
                    Result result)
             throws SQLException
Description copied from interface: ClassMapping

Override this method to customize loading a Result into an instance. Return true if this mapping handles the load; false if normal loading should procede after calling this method. Returns false by default.

This method is invoked when Kodo needs to load a record and has already performed a query (via JDOQL, direct SQL, or via some other mechanism by which Kodo can perform bulk loads). You should attempt to load fields from result before performing any additional selects against the database.

Specified by:
load in interface ClassMapping

getDBDictionary

public DBDictionary getDBDictionary()
Description copied from interface: ClassMapping
Return the dictionary that this mapping uses.
Specified by:
getDBDictionary in interface ClassMapping

getClassMappingName

public String getClassMappingName()
Description copied from interface: ClassMapping
The value of the class mapping name extension.
Specified by:
getClassMappingName in interface ClassMapping

setClassMappingName

public void setClassMappingName(String map)
Description copied from interface: ClassMapping
The value of the class mapping name extension.
Specified by:
setClassMappingName in interface ClassMapping

getVersionIndicatorName

public String getVersionIndicatorName()
Description copied from interface: ClassMapping
The value of the version indicator name extension.
Specified by:
getVersionIndicatorName in interface ClassMapping

setVersionIndicatorName

public void setVersionIndicatorName(String ind)
Description copied from interface: ClassMapping
The value of the version indicator name extension.
Specified by:
setVersionIndicatorName in interface ClassMapping

getClassIndicatorName

public String getClassIndicatorName()
Description copied from interface: ClassMapping
The value of the class indicator name extension.
Specified by:
getClassIndicatorName in interface ClassMapping

setClassIndicatorName

public void setClassIndicatorName(String ind)
Description copied from interface: ClassMapping
The value of the class indicator name extension.
Specified by:
setClassIndicatorName in interface ClassMapping

getVersionIndicatorIndexed

public int getVersionIndicatorIndexed()
Description copied from interface: ClassMapping
The value of the version indicator indexed extension.
Specified by:
getVersionIndicatorIndexed in interface ClassMapping

setVersionIndicatorIndexed

public void setVersionIndicatorIndexed(int idx)
Description copied from interface: ClassMapping
The value of the version indicator indexed extension.
Specified by:
setVersionIndicatorIndexed in interface ClassMapping

getClassIndicatorIndexed

public int getClassIndicatorIndexed()
Description copied from interface: ClassMapping
The value of the class indicator indexed extension.
Specified by:
getClassIndicatorIndexed in interface ClassMapping

setClassIndicatorIndexed

public void setClassIndicatorIndexed(int idx)
Description copied from interface: ClassMapping
The value of the class indicator indexed extension.
Specified by:
setClassIndicatorIndexed in interface ClassMapping

getRefDeleteAction

public int getRefDeleteAction()
Description copied from interface: ClassMapping
The reference foreign key action.
Specified by:
getRefDeleteAction in interface ClassMapping

isRefDeleteActionDeferred

public boolean isRefDeleteActionDeferred()
Description copied from interface: ClassMapping
The reference foreign key action.
Specified by:
isRefDeleteActionDeferred in interface ClassMapping

setRefDeleteAction

public void setRefDeleteAction(int action,
                               boolean deferred)
Description copied from interface: ClassMapping
The reference foreign key action.
Specified by:
setRefDeleteAction in interface ClassMapping

getSequenceFactory

public String getSequenceFactory()
Description copied from interface: ClassMapping
The value of the sequence factory extension.
Specified by:
getSequenceFactory in interface ClassMapping

setSequenceFactory

public void setSequenceFactory(String plugin)
Description copied from interface: ClassMapping
The value of the sequence factory extension.
Specified by:
setSequenceFactory in interface ClassMapping

getSequenceFactoryInstance

public SequenceFactory getSequenceFactoryInstance()
Description copied from interface: ClassMapping
Return the sequence factory for this type, based on its sequence factory metadata extensions. If no extensions are present in this type's least-derived persistent superclass, then the default sequence factory in the global configuration will be returned.
Specified by:
getSequenceFactoryInstance in interface ClassMapping

isAutoIncrement

public boolean isAutoIncrement()
Description copied from interface: ClassMapping
True if this class uses an auto-increment datastore primary key.
Specified by:
isAutoIncrement in interface ClassMapping

setAutoIncrement

public void setAutoIncrement(boolean autoInc)
Description copied from interface: ClassMapping
True if this class uses an auto-increment datastore primary key.
Specified by:
setAutoIncrement in interface ClassMapping

getRepository

public JDOMetaDataRepository getRepository()
Description copied from interface: ClassMetaData
Return the owning repository.
Specified by:
getRepository in interface ClassMetaData
Overrides:
getRepository in class DelegatingClassMetaData

getMetaData

public ClassMetaData getMetaData()
Description copied from interface: ClassMapping
Return the underlying class metadata.
Specified by:
getMetaData in interface ClassMapping

setRepository

public void setRepository(JDOMetaDataRepository repos)
Description copied from interface: ClassMapping
The supplied repository must be a MappingRepository.
Specified by:
setRepository in interface ClassMapping
Overrides:
setRepository in class DelegatingClassMetaData

getPCSuperclassMetaData

public ClassMetaData getPCSuperclassMetaData()
Description copied from interface: ClassMetaData
Return the metadata for the persistence capable superclass of the described type, or null if the metadata did not specify one.
Specified by:
getPCSuperclassMetaData in interface ClassMetaData
Overrides:
getPCSuperclassMetaData in class DelegatingClassMetaData

getPCSuperclassMapping

public ClassMapping getPCSuperclassMapping()
Description copied from interface: ClassMapping
Convenience method to make casting from ClassMetaData.getPCSuperclassMetaData() unnecessary.
Specified by:
getPCSuperclassMapping in interface ClassMapping

getNonVirtualPCSuperclassMapping

public ClassMapping getNonVirtualPCSuperclassMapping()
Description copied from interface: ClassMapping
Return the nearest superclass mapping whose ClassMapping.isVirtualMapping() method returns true will be skipped.
Specified by:
getNonVirtualPCSuperclassMapping in interface ClassMapping

setPCSuperclassMetaData

public void setPCSuperclassMetaData(ClassMetaData meta)
Description copied from interface: ClassMetaData
Set the metadata for this class' superclass.
Specified by:
setPCSuperclassMetaData in interface ClassMetaData
Overrides:
setPCSuperclassMetaData in class DelegatingClassMetaData

setPCSuperclassMapping

public void setPCSuperclassMapping(ClassMapping superMapping)
Description copied from interface: ClassMapping
Set the superclass mapping. This is used before reading mappings from ClassMappingInfos.
Specified by:
setPCSuperclassMapping in interface ClassMapping

getPCSubclassMetaDatas

public ClassMetaData[] getPCSubclassMetaDatas()
Description copied from interface: ClassMetaData
Return the metadata for the known persistence capable subclasses of the described type, or empty array if none.
Specified by:
getPCSubclassMetaDatas in interface ClassMetaData
Overrides:
getPCSubclassMetaDatas in class DelegatingClassMetaData

getPCSubclassMappings

public ClassMapping[] getPCSubclassMappings()
Description copied from interface: ClassMapping
Return all the known subclass mappings for this mapping.
Specified by:
getPCSubclassMappings in interface ClassMapping

getFields

public FieldMetaData[] getFields()
Description copied from interface: ClassMetaData
Return all field metadatas, including superclass fields.
Specified by:
getFields in interface ClassMetaData
Overrides:
getFields in class DelegatingClassMetaData

getFieldMappings

public FieldMapping[] getFieldMappings()
Description copied from interface: ClassMapping
Convenience method to make casting from ClassMetaData.getFields() unnecessary.
Specified by:
getFieldMappings in interface ClassMapping

getDeclaredFields

public FieldMetaData[] getDeclaredFields()
Description copied from interface: ClassMetaData
Return only the fields for this class, without superclass fields.
Specified by:
getDeclaredFields in interface ClassMetaData
Overrides:
getDeclaredFields in class DelegatingClassMetaData

getDeclaredFieldMappings

public FieldMapping[] getDeclaredFieldMappings()
Description copied from interface: ClassMapping
Convenience method to make casting from ClassMetaData.getDeclaredFields() unnecessary.
Specified by:
getDeclaredFieldMappings in interface ClassMapping

getPrimaryKeyFields

public FieldMetaData[] getPrimaryKeyFields()
Description copied from interface: ClassMetaData
Return primary key fields, or empty array if none.
Specified by:
getPrimaryKeyFields in interface ClassMetaData
Overrides:
getPrimaryKeyFields in class DelegatingClassMetaData

getPrimaryKeyFieldMappings

public FieldMapping[] getPrimaryKeyFieldMappings()
Description copied from interface: ClassMapping
Convenience method to make casting from ClassMetaData.getPrimaryKeyFields() unnecessary.
Specified by:
getPrimaryKeyFieldMappings in interface ClassMapping

getDefaultFetchGroupFields

public FieldMetaData[] getDefaultFetchGroupFields()
Description copied from interface: ClassMetaData
Return the list of fields in the default fetch group, including superclass fields, or an empty array if none.
Specified by:
getDefaultFetchGroupFields in interface ClassMetaData
Overrides:
getDefaultFetchGroupFields in class DelegatingClassMetaData

getDefaultFetchGroupFieldMappings

public FieldMapping[] getDefaultFetchGroupFieldMappings()
Description copied from interface: ClassMapping
Convenience method to make casting from ClassMetaData.getDefaultFetchGroupFields() unnecessary.
Specified by:
getDefaultFetchGroupFieldMappings in interface ClassMapping

getMappedFieldMappings

public FieldMapping[] getMappedFieldMappings()
Description copied from interface: ClassMapping
Returns an array of all the field mappings mapped by this class. This includes non-virtual declared field mappings and any concrete mapping of virtual superclass fields performed by this class.
Specified by:
getMappedFieldMappings in interface ClassMapping

getField

public FieldMetaData getField(int index)
Description copied from interface: ClassMetaData
Return the metadata for the persistent or transactional field with the given absolute index.
Specified by:
getField in interface ClassMetaData
Overrides:
getField in class DelegatingClassMetaData
Following copied from interface: kodo.meta.ClassMetaData
Returns:
the field's metadata, or null if not found

getFieldMapping

public FieldMapping getFieldMapping(int index)
Description copied from interface: ClassMapping
Convenience method to make casting from ClassMetaData.getField(int) unnecessary.
Specified by:
getFieldMapping in interface ClassMapping

getDeclaredField

public FieldMetaData getDeclaredField(int index)
Description copied from interface: ClassMetaData
Return the metadata for the persistent or transactional field with the given relative index.
Specified by:
getDeclaredField in interface ClassMetaData
Overrides:
getDeclaredField in class DelegatingClassMetaData
Following copied from interface: kodo.meta.ClassMetaData
Returns:
the field's metadata, or null if not found

getDeclaredFieldMapping

public FieldMapping getDeclaredFieldMapping(int index)
Description copied from interface: ClassMapping
Convenience method to make casting from ClassMetaData.getDeclaredField(int) unnecessary.
Specified by:
getDeclaredFieldMapping in interface ClassMapping

getField

public FieldMetaData getField(String name)
Description copied from interface: ClassMetaData
Return the metadata for the persistent or transactional field with the given name. This method can only be used at runtime.
Specified by:
getField in interface ClassMetaData
Overrides:
getField in class DelegatingClassMetaData
Following copied from interface: kodo.meta.ClassMetaData
Returns:
the field's metadata, or null if not found

getFieldMapping

public FieldMapping getFieldMapping(String name)
Description copied from interface: ClassMapping
Convenience method to make casting from ClassMetaData.getField(int) unnecessary.
Specified by:
getFieldMapping in interface ClassMapping

getDeclaredField

public FieldMetaData getDeclaredField(String name)
Description copied from interface: ClassMetaData
Return the metadata for the persistent or transactional field with the given name, without including superclass fields.
Specified by:
getDeclaredField in interface ClassMetaData
Overrides:
getDeclaredField in class DelegatingClassMetaData
Following copied from interface: kodo.meta.ClassMetaData
Returns:
the field's metadata, or null if not found

getDeclaredFieldMapping

public FieldMapping getDeclaredFieldMapping(String name)
Description copied from interface: ClassMapping
Convenience method to make casting from ClassMetaData.getDeclaredField(int) unnecessary.
Specified by:
getDeclaredFieldMapping in interface ClassMapping

addDeclaredField

public void addDeclaredField(FieldMetaData field)
Description copied from interface: ClassMetaData
Add a persistent or transactional field to this class.
Specified by:
addDeclaredField in interface ClassMetaData
Overrides:
addDeclaredField in class DelegatingClassMetaData

removeDeclaredField

public boolean removeDeclaredField(FieldMetaData field)
Description copied from interface: ClassMetaData
Remove the given field from management.
Specified by:
removeDeclaredField in interface ClassMetaData
Overrides:
removeDeclaredField in class DelegatingClassMetaData
Following copied from interface: kodo.meta.ClassMetaData
Returns:
true if the field was removed, false otherwise

isResolved

public boolean isResolved()
Description copied from interface: ClassMetaData
For implementation use. Return whether this metadata has been resolved.
Specified by:
isResolved in interface ClassMetaData
Overrides:
isResolved in class DelegatingClassMetaData

invalidateResolve

public void invalidateResolve()
Description copied from interface: ClassMetaData
For implementation use. Invalidate resolved data.
Specified by:
invalidateResolve in interface ClassMetaData
Overrides:
invalidateResolve in class DelegatingClassMetaData

resolve

public void resolve()
Description copied from interface: ClassMetaData
For implementation use. This method resolves superclass information, caches fields, and resolves fields that might be other first class objects. It requires access to a respository. It can access other class metadata through the repository, but cannot access field metadata for those classes. It can, however, access superclass field metadata.
Specified by:
resolve in interface ClassMetaData
Overrides:
resolve in class DelegatingClassMetaData

assertResolved

protected void assertResolved()
Throw an exception if this mapping has not been resolved.

getFieldMapping

public FieldMapping getFieldMapping(FieldMetaData fmd)
Return the field mapping for the given metadata. If the mapping is cached, the cached version will be returned. Otherwise, if the field is persistent, we'll attempt to map it via the repository. It is important not to have to resolve all field mappings to get a single one, because during the mapping installation process related fields have to access each other without causing infinite loops.
Specified by:
getFieldMapping in interface ClassMapping

createDefaultFieldMapping

protected FieldMapping createDefaultFieldMapping(FieldMetaData fmd)
Create a default FieldMapping instance for this mapping type. This will override any mapping the repository claims for the class mapping.

SolarMetric Kodo JDO 3.3.5 generated on August 31 2005

Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.