|
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.mappings.ForeignReferenceMapping
oracle.toplink.mappings.CollectionMapping
oracle.toplink.mappings.AggregateCollectionMapping
Purpose: The aggregate collection mapping is used to represent the aggregate relationship between a single source object and a collection of target objects. The target objects cannot exist without the existence of the source object (privately owned) Unlike the normal aggregate mapping, there is a target table being mapped from the target objects. Unlike normal 1:m mapping, there is no 1:1 back reference mapping, as foreign key constraints have been resolved by the aggregation.
| Constructor Summary | |
AggregateCollectionMapping()PUBLIC: Default constructor. | |
| Method Summary | |
void |
addTargetForeignKeyFieldName(java.lang.String targetForeignKey, java.lang.String sourceKey)PUBLIC: Define the target foreign key relationship in the 1-M aggregate collection mapping. |
java.lang.Object |
buildBackupCloneForPartObject(java.lang.Object attributeValue, java.lang.Object clone, java.lang.Object backup, oracle.toplink.publicinterface.UnitOfWork unitOfWork)INTERNAL: Used during building the backup shallow copy to copy the vector without re-registering the target objects. |
java.lang.Object |
buildCloneForPartObject(java.lang.Object attributeValue, java.lang.Object original, java.lang.Object clone, oracle.toplink.publicinterface.UnitOfWork unitOfWork, boolean isExisting)INTERNAL: Require for cloning, the part must be cloned. |
java.lang.Object |
clone()INTERNAL: The mapping clones itself to create deep copy. |
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: This method is used to create a change record from comparing two aggregate collections |
boolean |
compareObjects(java.lang.Object firstObject, java.lang.Object secondObject, oracle.toplink.publicinterface.Session session)INTERNAL: Compare the attributes belonging to this mapping for the objects. |
java.lang.Object |
extractResultFromBatchQuery(DatabaseQuery query, DatabaseRow databaseRow, oracle.toplink.publicinterface.Session session, DatabaseRow argumentRow)INTERNAL: Extract the value from the batch optmized query. |
DatabaseRow |
getAggregateRow(ObjectLevelModifyQuery query, java.lang.Object object)INTERNAL: return the aggregate databaseRow with the primary keys from the source table and targer table |
Descriptor |
getReferenceDescriptor(java.lang.Class theClass, oracle.toplink.publicinterface.Session session)INTERNAL: for inheritance purpose |
java.util.Vector |
getReferenceObjectKeys(ObjectLevelModifyQuery query)INTERNAL: get reference object keys |
java.util.Vector |
getSourceKeyFieldNames()PUBLIC: Return the source key field names associated with the mapping. |
java.util.Vector |
getSourceKeyFields()INTERNAL: Return the source key names associated with the mapping |
java.util.Vector |
getTargetForeignKeyFieldNames()PUBLIC: Return the target foregin key field names associated with the mapping. |
java.util.Vector |
getTargetForeignKeyFields()INTERNAL: Return the target foregin key fields associated with the mapping |
java.util.Hashtable |
getTargetForeignKeyToSourceKeys()INTERNAL: |
void |
initialize(oracle.toplink.publicinterface.Session session)INTERNAL: For aggregate collection mapping the reference descriptor is cloned. |
void |
initializeChildInheritance(Descriptor parentDescriptor, oracle.toplink.publicinterface.Session session)INTERNAL: For aggregate mapping the reference descriptor is cloned. |
void |
initializeParentInheritance(Descriptor parentDescriptor, Descriptor childDescriptor, oracle.toplink.publicinterface.Session session)INTERNAL: For aggregate mapping the reference descriptor is cloned. |
boolean |
isAggregateCollectionMapping()INTERNAL: |
boolean |
isPrivateOwned()INTERNAL: |
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 |
postInitialize(oracle.toplink.publicinterface.Session session)INTERNAL: For aggregate collection mapping the reference descriptor is cloned. |
void |
postInsert(WriteObjectQuery query)INTERNAL: Insert privately owned parts |
void |
postUpdate(WriteObjectQuery writeQuery)INTERNAL: Update the privately owned parts |
void |
preDelete(DeleteObjectQuery query)INTERNAL: Delete privately owned parts |
void |
preInsert(WriteObjectQuery query)INTERNAL: The message is passed to its reference class descriptor. |
void |
prepareModifyQuery(ObjectLevelModifyQuery originalQuery, ObjectLevelModifyQuery modifyQuery, java.lang.Object object)INTERNAL: setup the modifyQuery for post insert/update and pre delete |
void |
prepareModifyQueryForDelete(ObjectLevelModifyQuery originalQuery, ObjectLevelModifyQuery modifyQuery, java.lang.Object object)INTERNAL: setup the modifyQuery for pre delete |
void |
prepareModifyQueryForUpdate(ObjectLevelModifyQuery originalQuery, ObjectLevelModifyQuery modifyQuery, java.lang.Object object)INTERNAL: setup the modifyQuery for update, |
void |
setSourceKeyFieldNames(java.util.Vector fieldNames)PUBLIC: Set the source key field names associated with the mapping. |
void |
setTargetForeignKeyFieldNames(java.util.Vector fieldNames)PUBLIC: Set the target foregin key field names associated with the mapping. |
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. |
java.lang.Object |
valueFromRow(DatabaseRow row, ObjectLevelReadQuery sourceQuery)INTERNAL: Retrieves a value from the row for a particular query key |
boolean |
verifyDelete(java.lang.Object object, oracle.toplink.publicinterface.Session session)INTERNAL: Checks if object is deleted from the database or not. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public AggregateCollectionMapping()
| Method Detail |
public void addTargetForeignKeyFieldName(java.lang.String targetForeignKey,
java.lang.String sourceKey)
public java.lang.Object buildBackupCloneForPartObject(java.lang.Object attributeValue,
java.lang.Object clone,
java.lang.Object backup,
oracle.toplink.publicinterface.UnitOfWork unitOfWork)
buildBackupCloneForPartObject in class CollectionMapping
public java.lang.Object buildCloneForPartObject(java.lang.Object attributeValue,
java.lang.Object original,
java.lang.Object clone,
oracle.toplink.publicinterface.UnitOfWork unitOfWork,
boolean isExisting)
buildCloneForPartObject in class CollectionMappingpublic java.lang.Object clone()
clone in class ForeignReferenceMapping
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 CollectionMapping
public boolean compareObjects(java.lang.Object firstObject,
java.lang.Object secondObject,
oracle.toplink.publicinterface.Session session)
compareObjects in class CollectionMapping
public java.lang.Object extractResultFromBatchQuery(DatabaseQuery query,
DatabaseRow databaseRow,
oracle.toplink.publicinterface.Session session,
DatabaseRow argumentRow)
extractResultFromBatchQuery in class ForeignReferenceMapping
public DatabaseRow getAggregateRow(ObjectLevelModifyQuery query,
java.lang.Object object)
public Descriptor getReferenceDescriptor(java.lang.Class theClass,
oracle.toplink.publicinterface.Session session)
public java.util.Vector getReferenceObjectKeys(ObjectLevelModifyQuery query)
throws DatabaseException,
OptimisticLockException
DatabaseExceptionOptimisticLockExceptionpublic java.util.Vector getSourceKeyFieldNames()
public java.util.Vector getSourceKeyFields()
public java.util.Vector getTargetForeignKeyFieldNames()
public java.util.Vector getTargetForeignKeyFields()
public java.util.Hashtable getTargetForeignKeyToSourceKeys()
public void initialize(oracle.toplink.publicinterface.Session session)
throws DescriptorException
initialize in class CollectionMappingDescriptorException
public void initializeChildInheritance(Descriptor parentDescriptor,
oracle.toplink.publicinterface.Session session)
throws DescriptorException
DescriptorException
public void initializeParentInheritance(Descriptor parentDescriptor,
Descriptor childDescriptor,
oracle.toplink.publicinterface.Session session)
throws DescriptorException
DescriptorExceptionpublic boolean isAggregateCollectionMapping()
isAggregateCollectionMapping in class DatabaseMappingpublic boolean isPrivateOwned()
isPrivateOwned in class ForeignReferenceMapping
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 CollectionMapping
public void mergeIntoObject(java.lang.Object target,
boolean isTargetUnInitialized,
java.lang.Object source,
oracle.toplink.internal.sessions.MergeManager mergeManager)
mergeIntoObject in class CollectionMapping
public void postInitialize(oracle.toplink.publicinterface.Session session)
throws DescriptorException
postInitialize in class DatabaseMappingDescriptorException
public void postInsert(WriteObjectQuery query)
throws DatabaseException,
OptimisticLockException
postInsert in class DatabaseMappingDatabaseExceptionOptimisticLockException
public void postUpdate(WriteObjectQuery writeQuery)
throws DatabaseException,
OptimisticLockException
postUpdate in class DatabaseMappingDatabaseExceptionOptimisticLockException
public void preDelete(DeleteObjectQuery query)
throws DatabaseException,
OptimisticLockException
preDelete in class DatabaseMappingDatabaseExceptionOptimisticLockException
public void preInsert(WriteObjectQuery query)
throws DatabaseException,
OptimisticLockException
preInsert in class DatabaseMappingDatabaseExceptionOptimisticLockException
public void prepareModifyQuery(ObjectLevelModifyQuery originalQuery,
ObjectLevelModifyQuery modifyQuery,
java.lang.Object object)
public void prepareModifyQueryForDelete(ObjectLevelModifyQuery originalQuery,
ObjectLevelModifyQuery modifyQuery,
java.lang.Object object)
public void prepareModifyQueryForUpdate(ObjectLevelModifyQuery originalQuery,
ObjectLevelModifyQuery modifyQuery,
java.lang.Object object)
public void setSourceKeyFieldNames(java.util.Vector fieldNames)
public void setTargetForeignKeyFieldNames(java.util.Vector fieldNames)
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 CollectionMapping
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 CollectionMapping
public java.lang.Object valueFromRow(DatabaseRow row,
ObjectLevelReadQuery sourceQuery)
throws DatabaseException
valueFromRow in class ForeignReferenceMappingDatabaseException
public boolean verifyDelete(java.lang.Object object,
oracle.toplink.publicinterface.Session session)
throws DatabaseException
verifyDelete in class CollectionMappingDatabaseException
|
| |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||