|
Oracle Application Server TopLink API Reference 10g (9.0.4.3) B10491-02 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
oracle.toplink.mappings.DatabaseMapping
oracle.toplink.sdk.SDKDirectCollectionMapping
SDKDirectCollectionMapping consolidates the behavior of mappings that map collections of "native" data objects (e.g. Strings). These are objects that do not have their own descriptor and repeat within the database row for the containing object. (Sorta like a DirectCollectionMapping without the additional table.)
SDKDescriptor, SDKFieldValue, SDKCollectionMappingHelper, SDKCollectionChangeRecord, SDKOrderedCollectionChangeRecord, Serialized Form| Constructor Summary | |
SDKDirectCollectionMapping()Default constructor. | |
| Method Summary | |
java.lang.Object |
buildAddedElementFromChangeSet(java.lang.Object changeSet, oracle.toplink.internal.sessions.MergeManager mergeManager)INTERNAL: Build and return a new element based on the change set. |
void |
buildBackupClone(java.lang.Object clone, java.lang.Object backup, oracle.toplink.publicinterface.UnitOfWork unitOfWork)INTERNAL: Clone the attribute from the clone and assign it to the backup. |
java.lang.Object |
buildChangeSet(java.lang.Object element, oracle.toplink.internal.sessions.ObjectChangeSet owner, oracle.toplink.publicinterface.Session session)INTERNAL: Build and return a change set for the specified element. |
void |
buildClone(java.lang.Object original, java.lang.Object clone, oracle.toplink.publicinterface.UnitOfWork unitOfWork)INTERNAL: Clone the attribute from the original and assign it to the clone. |
void |
buildCopy(java.lang.Object copy, java.lang.Object original, ObjectCopyingPolicy policy)INTERNAL: Copy of the attribute of the object. |
java.lang.Object |
buildElementFromElement(java.lang.Object object, oracle.toplink.internal.sessions.MergeManager mergeManager)INTERNAL: Build and return a new element based on the specified element. |
java.lang.Object |
buildRemovedElementFromChangeSet(java.lang.Object changeSet, oracle.toplink.internal.sessions.MergeManager mergeManager)INTERNAL: Build and return a new element based on the change set. |
boolean |
compareElements(java.lang.Object element1, java.lang.Object element2, oracle.toplink.publicinterface.Session session)INTERNAL: Compare the non-null elements. |
boolean |
compareElementsForChange(java.lang.Object element1, java.lang.Object element2, oracle.toplink.publicinterface.Session session)INTERNAL: Compare the non-null elements and return true if they are alike. |
oracle.toplink.internal.sessions.ChangeRecord |
compareForChange(java.lang.Object clone, java.lang.Object backup, oracle.toplink.internal.sessions.ObjectChangeSet owner, oracle.toplink.publicinterface.Session session)INTERNAL: Build and return the change record that results from comparing the two direct collection attributes. |
boolean |
compareObjects(java.lang.Object object1, java.lang.Object object2, oracle.toplink.publicinterface.Session session)INTERNAL: Compare the attributes belonging to this mapping for the objects. |
void |
fixObjectReferences(java.lang.Object object, oracle.toplink.internal.helper.IdentityHashtable objectDescriptors, oracle.toplink.internal.helper.IdentityHashtable processedObjects, ObjectLevelReadQuery query, RemoteSession session)INTERNAL: An object has been serialized from the server to the client. |
java.lang.Class |
getAttributeElementClass()PUBLIC: Return the class each element in the object's collection should be converted to, before the collection is inserted into the object. |
oracle.toplink.internal.queryframework.ContainerPolicy |
getContainerPolicy()INTERNAL: Return the mapping's containerPolicy. |
java.lang.String |
getElementDataTypeName()PUBLIC: Return the "data type" associated with each element in the nested collection. |
oracle.toplink.internal.helper.DatabaseField |
getField()INTERNAL: Return the field that holds the nested collection. |
java.lang.Class |
getFieldElementClass()PUBLIC: Return the class each element in the database row's collection should be converted to, before the collection is inserted into the database. |
java.lang.String |
getFieldName()PUBLIC: Return the name of the field that holds the nested collection. |
java.lang.Object |
getRealCollectionAttributeValueFromObject(java.lang.Object object, oracle.toplink.publicinterface.Session session)INTERNAL: Convenience method. |
void |
initialize(oracle.toplink.publicinterface.Session session)INTERNAL: Initialize the mapping. |
void |
iterate(oracle.toplink.internal.descriptors.DescriptorIterator iterator)INTERNAL: Iterate on the appropriate attribute value. |
boolean |
mapKeyHasChanged(java.lang.Object element, oracle.toplink.publicinterface.Session session)INTERNAL: Return whether the element's user-defined Map key has changed since it was cloned from the original version. |
void |
mergeChangesIntoObject(java.lang.Object target, oracle.toplink.internal.sessions.ChangeRecord changeRecord, java.lang.Object source, oracle.toplink.internal.sessions.MergeManager mergeManager)INTERNAL: Merge changes from the source to the target object. |
void |
mergeIntoObject(java.lang.Object target, boolean isTargetUnInitialized, java.lang.Object source, oracle.toplink.internal.sessions.MergeManager mergeManager)INTERNAL: Merge changes from the source to the target object. |
void |
setAttributeElementClass(java.lang.Class attributeElementClass)PUBLIC: Set the class each element in the object's collection should be converted to, before the collection is inserted into the object. |
void |
setContainerPolicy(oracle.toplink.internal.queryframework.ContainerPolicy containerPolicy)ADVANCED: Set the mapping's containerPolicy. |
void |
setElementDataTypeName(java.lang.String elementDataTypeName)PUBLIC: Set the "data type" associated with each element in the nested collection. |
void |
setFieldElementClass(java.lang.Class fieldElementClass)PUBLIC: Set the class each element in the database row's collection should be converted to, before the collection is inserted into the database. |
void |
setFieldName(java.lang.String fieldName)PUBLIC: Set the name of the field that holds the nested collection. |
void |
simpleAddToCollectionChangeRecord(java.lang.Object referenceKey, java.lang.Object changeSetToAdd, oracle.toplink.internal.sessions.ObjectChangeSet changeSet, oracle.toplink.publicinterface.Session session)ADVANCED: This method is used to have an object add to a collection once the changeSet is applied The referenceKey parameter should only be used for direct Maps. |
void |
simpleRemoveFromCollectionChangeRecord(java.lang.Object referenceKey, java.lang.Object changeSetToRemove, oracle.toplink.internal.sessions.ObjectChangeSet changeSet, oracle.toplink.publicinterface.Session session)ADVANCED: This method is used to have an object removed from a collection once the changeSet is applied The referenceKey parameter should only be used for direct Maps. |
void |
useCollectionClass(java.lang.Class concreteClass)PUBLIC: Configure the mapping to use an instance of the specified container class to hold the nested objects. |
void |
useMapClass(java.lang.Class concreteClass, java.lang.String methodName)PUBLIC: SDKDirectCollectionMapping does not support Map containers. |
java.lang.Object |
valueFromRow(DatabaseRow row, ObjectLevelReadQuery query)INTERNAL: Build the nested collection from the database row. |
void |
writeFromObjectIntoRow(java.lang.Object object, DatabaseRow row, oracle.toplink.publicinterface.Session session)INTERNAL: Get the attribute value from the object and store it in the appropriate field of the row. |
void |
writeFromObjectIntoRowForUpdate(WriteObjectQuery writeQuery, DatabaseRow row)INTERNAL: If any part of the nested collection has changed, the whole thing is written. |
void |
writeFromObjectIntoRowWithChangeRecord(oracle.toplink.internal.sessions.ChangeRecord changeRecord, DatabaseRow row, oracle.toplink.publicinterface.Session session)INTERNAL: Get the appropriate attribute value from the object and put it in the appropriate field of the database row. |
void |
writeInsertFieldsIntoRow(DatabaseRow row, oracle.toplink.publicinterface.Session session)INTERNAL: Write the fields needed for insert into the template with null values. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface oracle.toplink.sdk.SDKCollectionMapping |
getAttributeName, setRealAttributeValueInObject |
| Constructor Detail |
public SDKDirectCollectionMapping()
| Method Detail |
public java.lang.Object buildAddedElementFromChangeSet(java.lang.Object changeSet,
oracle.toplink.internal.sessions.MergeManager mergeManager)
buildAddedElementFromChangeSet in interface SDKCollectionMapping
public void buildBackupClone(java.lang.Object clone,
java.lang.Object backup,
oracle.toplink.publicinterface.UnitOfWork unitOfWork)
buildBackupClone in class DatabaseMapping
public java.lang.Object buildChangeSet(java.lang.Object element,
oracle.toplink.internal.sessions.ObjectChangeSet owner,
oracle.toplink.publicinterface.Session session)
buildChangeSet in interface SDKCollectionMapping
public void buildClone(java.lang.Object original,
java.lang.Object clone,
oracle.toplink.publicinterface.UnitOfWork unitOfWork)
buildClone in class DatabaseMapping
public void buildCopy(java.lang.Object copy,
java.lang.Object original,
ObjectCopyingPolicy policy)
buildCopy in class DatabaseMapping
public java.lang.Object buildElementFromElement(java.lang.Object object,
oracle.toplink.internal.sessions.MergeManager mergeManager)
buildElementFromElement in interface SDKCollectionMapping
public java.lang.Object buildRemovedElementFromChangeSet(java.lang.Object changeSet,
oracle.toplink.internal.sessions.MergeManager mergeManager)
buildRemovedElementFromChangeSet in interface SDKCollectionMapping
public boolean compareElements(java.lang.Object element1,
java.lang.Object element2,
oracle.toplink.publicinterface.Session session)
compareElements in interface SDKCollectionMapping
public boolean compareElementsForChange(java.lang.Object element1,
java.lang.Object element2,
oracle.toplink.publicinterface.Session session)
compareElementsForChange in interface SDKCollectionMapping
public oracle.toplink.internal.sessions.ChangeRecord compareForChange(java.lang.Object clone,
java.lang.Object backup,
oracle.toplink.internal.sessions.ObjectChangeSet owner,
oracle.toplink.publicinterface.Session session)
compareForChange in class DatabaseMapping
public boolean compareObjects(java.lang.Object object1,
java.lang.Object object2,
oracle.toplink.publicinterface.Session session)
compareObjects in class DatabaseMapping
public void fixObjectReferences(java.lang.Object object,
oracle.toplink.internal.helper.IdentityHashtable objectDescriptors,
oracle.toplink.internal.helper.IdentityHashtable processedObjects,
ObjectLevelReadQuery query,
RemoteSession session)
fixObjectReferences in class DatabaseMappingpublic java.lang.Class getAttributeElementClass()
public oracle.toplink.internal.queryframework.ContainerPolicy getContainerPolicy()
getContainerPolicy in interface ContainerMappinggetContainerPolicy in class DatabaseMappingpublic java.lang.String getElementDataTypeName()
public oracle.toplink.internal.helper.DatabaseField getField()
getField in class DatabaseMappingpublic java.lang.Class getFieldElementClass()
public java.lang.String getFieldName()
public java.lang.Object getRealCollectionAttributeValueFromObject(java.lang.Object object,
oracle.toplink.publicinterface.Session session)
throws DescriptorException
getRealCollectionAttributeValueFromObject in interface SDKCollectionMappinggetRealCollectionAttributeValueFromObject in class DatabaseMappingDescriptorException
public void initialize(oracle.toplink.publicinterface.Session session)
throws DescriptorException
initialize in class DatabaseMappingDescriptorExceptionpublic void iterate(oracle.toplink.internal.descriptors.DescriptorIterator iterator)
iterate in class DatabaseMapping
public boolean mapKeyHasChanged(java.lang.Object element,
oracle.toplink.publicinterface.Session session)
mapKeyHasChanged in interface SDKCollectionMapping
public void mergeChangesIntoObject(java.lang.Object target,
oracle.toplink.internal.sessions.ChangeRecord changeRecord,
java.lang.Object source,
oracle.toplink.internal.sessions.MergeManager mergeManager)
mergeChangesIntoObject in class DatabaseMapping
public void mergeIntoObject(java.lang.Object target,
boolean isTargetUnInitialized,
java.lang.Object source,
oracle.toplink.internal.sessions.MergeManager mergeManager)
mergeIntoObject in class DatabaseMappingpublic void setAttributeElementClass(java.lang.Class attributeElementClass)
public void setContainerPolicy(oracle.toplink.internal.queryframework.ContainerPolicy containerPolicy)
setContainerPolicy in interface ContainerMappingpublic void setElementDataTypeName(java.lang.String elementDataTypeName)
public void setFieldElementClass(java.lang.Class fieldElementClass)
public void setFieldName(java.lang.String fieldName)
public void simpleAddToCollectionChangeRecord(java.lang.Object referenceKey,
java.lang.Object changeSetToAdd,
oracle.toplink.internal.sessions.ObjectChangeSet changeSet,
oracle.toplink.publicinterface.Session session)
simpleAddToCollectionChangeRecord in class DatabaseMapping
public void simpleRemoveFromCollectionChangeRecord(java.lang.Object referenceKey,
java.lang.Object changeSetToRemove,
oracle.toplink.internal.sessions.ObjectChangeSet changeSet,
oracle.toplink.publicinterface.Session session)
simpleRemoveFromCollectionChangeRecord in class DatabaseMappingpublic void useCollectionClass(java.lang.Class concreteClass)
jdk1.2.x: The container class must implement (directly or indirectly) the Collection interface.
jdk1.1.x: The container class must be a subclass of Vector.
useCollectionClass in interface ContainerMapping
public void useMapClass(java.lang.Class concreteClass,
java.lang.String methodName)
useMapClass in interface ContainerMapping
public java.lang.Object valueFromRow(DatabaseRow row,
ObjectLevelReadQuery query)
throws DatabaseException
valueFromRow in class DatabaseMappingDatabaseException
public void writeFromObjectIntoRow(java.lang.Object object,
DatabaseRow row,
oracle.toplink.publicinterface.Session session)
writeFromObjectIntoRow in class DatabaseMapping
public void writeFromObjectIntoRowForUpdate(WriteObjectQuery writeQuery,
DatabaseRow row)
throws DescriptorException
writeFromObjectIntoRowForUpdate in class DatabaseMappingDescriptorException
public void writeFromObjectIntoRowWithChangeRecord(oracle.toplink.internal.sessions.ChangeRecord changeRecord,
DatabaseRow row,
oracle.toplink.publicinterface.Session session)
writeFromObjectIntoRowWithChangeRecord in class DatabaseMapping
public void writeInsertFieldsIntoRow(DatabaseRow row,
oracle.toplink.publicinterface.Session session)
writeInsertFieldsIntoRow in class DatabaseMapping
|
| |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||