SolarMetric Kodo JDO 3.4.1 generated on May 30 2006

kodo.jdbc.meta
Class SQLDataOneToOneFieldMapping.SQLEmbeddedClassMapping

java.lang.Object
  |
  +--kodo.meta.DelegatingExtensions
        |
        +--kodo.meta.DelegatingClassMetaData
              |
              +--kodo.jdbc.meta.AbstractClassMapping
                    |
                    +--kodo.jdbc.meta.EmbeddedClassMapping
                          |
                          +--kodo.jdbc.meta.SQLDataOneToOneFieldMapping.SQLEmbeddedClassMapping
All Implemented Interfaces:
ClassMapping, ClassMetaData, Commentable, Comparable, Extensions, Mapping, SourceTracker
Enclosing class:
SQLDataOneToOneFieldMapping

public static class SQLDataOneToOneFieldMapping.SQLEmbeddedClassMapping
extends kodo.jdbc.meta.EmbeddedClassMapping


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
SQLDataOneToOneFieldMapping.SQLEmbeddedClassMapping(ClassMetaData meta, FieldMapping owner)
           
 
Method Summary
 void addExtensionKeys(Collection attrs)
          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.
 boolean canDelegateEmbeddedInfo()
          Returns true if this embedded mapping can delegate mapping to the types mapping information.
 void delete(KodoStateManager sm, RowManager rm)
          Set the where values appropriately to delete the proper instance, and set all relations on non-secondary tables as updates.
 void deleteEmbedded(KodoStateManager sm, JDBCStoreManager store)
           
 void deleteEmbedded(KodoStateManager sm, RowManager rm)
           
 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.
 ClassIndicator getClassIndicator()
          Return the class indicator for this class.
 FieldMapping getEmbeddingMapping()
          If this is an embedded mapping, return the owning field.
 int getIdentityType()
          Return the type of JDO identity being used.
 JoinableMapping getJoinableMapping(Column col)
          Return the joinable mapping for the given column.
 String getMappingType()
          Return the abbreviated name of this mapping, or the full class name if it is a custom mapping.
 Class getObjectIdClass()
          Return the metadata-specified class to use for the object ID, or null if not specified.
 Column[] getPrimaryKeyColumns()
          Return the columns this mapping uses to uniquely identify an object.
 FieldMapping[] getPrimaryKeyFieldMappings()
          Convenience method to make casting from EmbeddedClassMapping.getPrimaryKeyFields() unnecessary.
 FieldMetaData[] getPrimaryKeyFields()
          Return primary key fields, or empty array if none.
 Table getTable()
          Return the mapping's primary data table.
 VersionIndicator getVersionIndicator()
          Return the version indicator for this class.
 void insert(KodoStateManager sm, JDBCStoreManager store)
          Override this method to customize flushing this mapping.
 void insert(KodoStateManager sm, RowManager rm)
          Set values for the mapping into the proper rows.
 Boolean isCustomDeleteEmbedded(KodoStateManager sm)
           
 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 isCustomNullEmbedded(KodoStateManager sm)
           
 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 isPrimaryKeyObjectId(boolean hasAll)
          Return true if the this class' primary key columns correspond to the base class' primary key columns used to construct oid values.
 boolean isVirtualMapping()
          Returns false if this mapping represents a table in the database.
 Joins joinSuperclass(Joins joins, boolean toThis)
          Join the mapping and its superclass.
 void loadEmbeddedFields(KodoStateManager sm, JDBCStoreManager store, JDBCFetchConfiguration fetch, Result res)
           
 boolean map()
          Map a new instance of this mapping type.
 void nullEmbedded(KodoStateManager sm, JDBCStoreManager store)
           
 void nullEmbedded(KodoStateManager sm, RowManager rm)
           
 void refSchemaComponents()
          Increment the reference count of all used schema components.
 void resolve()
          For implementation use.
 void setClassIndicator(ClassIndicator cls)
          Set the class indicator for this class.
 void setRepository(JDOMetaDataRepository repos)
          The supplied repository must be a MappingRepository.
 void setVersionIndicator(VersionIndicator version)
          Set the version indicator for this class.
 void toMappingInfo(MappingInfo info)
          Serialize this mapping to a simple MappingInfo instance for transfer to XML or some other format.
 void update(KodoStateManager sm, JDBCStoreManager store)
          Override this method to customize flushing this mapping.
 void update(KodoStateManager sm, RowManager rm)
          Set values for the mapping into the proper rows.
 
Methods inherited from class kodo.jdbc.meta.AbstractClassMapping
addDeclaredField, assertResolved, createDefaultFieldMapping, delete, getClassIndicatorIndexed, getClassIndicatorName, getClassMappingName, getDataStoreValue, getDBDictionary, getDeclaredField, getDeclaredField, getDeclaredFieldMapping, getDeclaredFieldMapping, getDeclaredFieldMappings, getDeclaredFields, getDefaultFetchGroupFieldMappings, getDefaultFetchGroupFields, getField, getField, getFieldMapping, getFieldMapping, getFieldMapping, getFieldMappings, getFields, getMappedFieldMappings, getMappingInfo, getMappingRepository, getMetaData, getNonVirtualMappings, getNonVirtualPCSuperclassMapping, getObjectId, getPCSubclassMappings, getPCSubclassMetaDatas, getPCSuperclassMapping, getPCSuperclassMetaData, getRefDeleteAction, getRepository, getSequenceFactory, getSequenceFactoryInstance, getVersionIndicatorIndexed, getVersionIndicatorName, invalidateResolve, isAutoIncrement, isCustomDelete, isRefDeleteActionDeferred, isResolved, load, load, load, removeDeclaredField, reverseMap, setAutoIncrement, setAutoIncrementValue, setClassIndicatorIndexed, setClassIndicatorName, setClassMappingName, setMappingInfo, setPCSuperclassMapping, setPCSuperclassMetaData, setRefDeleteAction, setSequenceFactory, setVersionIndicatorIndexed, setVersionIndicatorName, supportsEagerSelect
 
Methods inherited from class kodo.meta.DelegatingClassMetaData
compareTo, equals, getComments, getDataCache, getDataCacheName, getDataCacheTimeout, getDeclaredUnmanagedFields, getDelegate, getDescribedType, getDetachable, getDetachObjectId, getDetachObjectIdField, getDetachState, getDetachStateField, getFieldsInListingOrder, getInnermostDelegate, getLeastDerivedMetaData, 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.meta.ClassMetaData
getDataCache, getDataCacheName, getDataCacheTimeout, getDeclaredUnmanagedFields, getDescribedType, getDetachable, getDetachObjectId, getDetachObjectIdField, getDetachState, getDetachStateField, getFieldsInListingOrder, getLeastDerivedMetaData, 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
 

Constructor Detail

SQLDataOneToOneFieldMapping.SQLEmbeddedClassMapping

public SQLDataOneToOneFieldMapping.SQLEmbeddedClassMapping(ClassMetaData meta,
                                                           FieldMapping owner)
Method Detail

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.
Overrides:
addMappingInfoAttributes in class kodo.jdbc.meta.EmbeddedClassMapping

addExtensionKeys

public void addExtensionKeys(Collection attrs)
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.
Overrides:
addExtensionKeys in class kodo.jdbc.meta.EmbeddedClassMapping

canDelegateEmbeddedInfo

public boolean canDelegateEmbeddedInfo()
Description copied from interface: ClassMapping
Returns true if this embedded mapping can delegate mapping to the types mapping information.
Overrides:
canDelegateEmbeddedInfo in class AbstractClassMapping

getMappingType

public String getMappingType()
Description copied from interface: Mapping
Return the abbreviated name of this mapping, or the full class name if it is a custom mapping.

setRepository

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

getTable

public Table getTable()
Description copied from interface: Mapping
Return the mapping's primary data table.

isVirtualMapping

public boolean isVirtualMapping()
Description copied from interface: ClassMapping
Returns false if this mapping represents a table in the database.

getPrimaryKeyColumns

public Column[] getPrimaryKeyColumns()
Description copied from interface: ClassMapping
Return the columns this mapping uses to uniquely identify an object. These will typically be the primary key columns or the columns this class uses to link to its superclass table. This method must be available before resolve.

isPrimaryKeyObjectId

public boolean isPrimaryKeyObjectId(boolean hasAll)
Description copied from interface: ClassMapping
Return true if the this class' primary key columns correspond to the base class' primary key columns used to construct oid values. Base classes always return true. Classes that join to the base class table, though, may not always join using the same columns the base class uses for oid values, or may not use all the columns. When performing a select, we will join down to the most-derived class that is identified by oid values. We cannot use non-primary key field values for joining during selects, because the field values to join on might be the ones we're trying to select! Similarly, we can only reconstruct oid values for selected object using classes whose primary keys store oid values.
Following copied from interface: kodo.jdbc.meta.ClassMapping
Parameters:
hasAll - if true, there must be a primary key column for every base class primary key column; if false the primary key must only match a subset of the base class primary key columns

getIdentityType

public int getIdentityType()
Description copied from interface: ClassMetaData
Return the type of JDO identity being used. This will be one of: If unspecified, defaults to ClassMetaData.ID_DATASTORE.
Overrides:
getIdentityType in class DelegatingClassMetaData

getObjectIdClass

public Class getObjectIdClass()
Description copied from interface: ClassMetaData
Return the metadata-specified class to use for the object ID, or null if not specified.
Overrides:
getObjectIdClass in class DelegatingClassMetaData

getPrimaryKeyFields

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

getPrimaryKeyFieldMappings

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

getVersionIndicator

public VersionIndicator getVersionIndicator()
Description copied from interface: ClassMapping
Return the version indicator for this class. Subclass mappings should delegate this method to their superclass.

setVersionIndicator

public void setVersionIndicator(VersionIndicator version)
Description copied from interface: ClassMapping
Set the version indicator for this class. Subclass mappings should delegate this method to their superclass.

getClassIndicator

public ClassIndicator getClassIndicator()
Description copied from interface: ClassMapping
Return the class indicator for this class. Subclass mappings should delegate this method to their superclass.

setClassIndicator

public void setClassIndicator(ClassIndicator cls)
Description copied from interface: ClassMapping
Set the class indicator for this class. Subclass mappings should delegate this method to their superclass.

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.
Overrides:
getJoinableMapping in class AbstractClassMapping

getEmbeddingMapping

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

toMappingInfo

public void toMappingInfo(MappingInfo info)
Description copied from interface: Mapping
Serialize this mapping to a simple MappingInfo instance for transfer to XML or some other format.

fromMappingInfo

public void fromMappingInfo(MappingInfo info,
                            boolean adapt)
Description copied from class: AbstractClassMapping
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.
Overrides:
fromMappingInfo in class AbstractClassMapping
Following copied from class: kodo.jdbc.meta.AbstractClassMapping
See Also:
AbstractClassMapping.addMappingInfoAttributes(java.util.Collection)

map

public boolean map()
Description copied from interface: Mapping
Map a new instance of this mapping type. If the underlying metadata cannot be mapped using this type, return false.

refSchemaComponents

public void refSchemaComponents()
Description copied from interface: Mapping
Increment the reference count of all used schema components.

joinSuperclass

public Joins joinSuperclass(Joins joins,
                            boolean toThis)
Description copied from interface: ClassMapping
Join the mapping and its superclass.
Following copied from interface: kodo.jdbc.meta.ClassMapping
Parameters:
toThis - if false, inner join to the superclass table; if true, outer join from the superclass table to this table

loadEmbeddedFields

public void loadEmbeddedFields(KodoStateManager sm,
                               JDBCStoreManager store,
                               JDBCFetchConfiguration fetch,
                               Result res)
                        throws SQLException

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.
Overrides:
isCustomInsert in class AbstractClassMapping

insert

public void insert(KodoStateManager sm,
                   RowManager rm)
            throws SQLException
Description copied from interface: Mapping
Set values for the mapping into the proper rows. For class mappings, this method will be called only after the corresponding method has been called for all fields of this 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.
Overrides:
insert in class AbstractClassMapping

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.
Overrides:
isCustomUpdate in class AbstractClassMapping

update

public void update(KodoStateManager sm,
                   RowManager rm)
            throws SQLException
Description copied from interface: Mapping
Set values for the mapping into the proper rows.
Following copied from interface: kodo.jdbc.meta.Mapping
See Also:
Mapping.insert(kodo.runtime.KodoStateManager, kodo.jdbc.sql.RowManager)

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.
Overrides:
update in class AbstractClassMapping

delete

public void delete(KodoStateManager sm,
                   RowManager rm)
Description copied from interface: Mapping
Set the where values appropriately to delete the proper instance, and set all relations on non-secondary tables as updates. This allows foreign key analysis.
Following copied from interface: kodo.jdbc.meta.Mapping
See Also:
Mapping.insert(kodo.runtime.KodoStateManager, kodo.jdbc.sql.RowManager)

isCustomNullEmbedded

public Boolean isCustomNullEmbedded(KodoStateManager sm)

nullEmbedded

public void nullEmbedded(KodoStateManager sm,
                         RowManager rm)
                  throws SQLException

nullEmbedded

public void nullEmbedded(KodoStateManager sm,
                         JDBCStoreManager store)
                  throws SQLException

isCustomDeleteEmbedded

public Boolean isCustomDeleteEmbedded(KodoStateManager sm)

deleteEmbedded

public void deleteEmbedded(KodoStateManager sm,
                           RowManager rm)
                    throws SQLException

deleteEmbedded

public void deleteEmbedded(KodoStateManager sm,
                           JDBCStoreManager store)
                    throws SQLException

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.
Overrides:
resolve in class AbstractClassMapping

SolarMetric Kodo JDO 3.4.1 generated on May 30 2006

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