Oracle Fusion Middleware Java API Reference for Oracle TopLink (Deprecated)
11g Release 1 (11.1.1)

B32476-04

oracle.toplink.mappings
Class AggregateCollectionMapping

java.lang.Object
  extended by oracle.toplink.mappings.DatabaseMapping
      extended by oracle.toplink.mappings.ForeignReferenceMapping
          extended by oracle.toplink.mappings.CollectionMapping
              extended by oracle.toplink.mappings.AggregateCollectionMapping
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, ContainerMapping, oracle.toplink.mappings.RelationalMapping

public class AggregateCollectionMapping
extends CollectionMapping
implements oracle.toplink.mappings.RelationalMapping

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.

Since:
TOPLink/Java 3.0
See Also:
Serialized Form

Field Summary
 
Fields inherited from class oracle.toplink.mappings.ForeignReferenceMapping
INNER_JOIN, NONE, OUTER_JOIN
 
Constructor Summary
AggregateCollectionMapping()
          Default constructor.
 
Method Summary
 void addTargetForeignKeyFieldName(java.lang.String targetForeignKey, java.lang.String sourceKey)
          Define the target foreign key relationship in the 1-M aggregate collection mapping.
 java.util.Vector getSourceKeyFieldNames()
          Return the source key field names associated with the mapping.
 java.util.Vector getTargetForeignKeyFieldNames()
          Return the target foregin key field names associated with the mapping.
 void setSourceKeyFieldNames(java.util.Vector fieldNames)
          Set the source key field names associated with the mapping.
 void setTargetForeignKeyFieldNames(java.util.Vector fieldNames)
          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.internal.sessions.AbstractSession 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.internal.sessions.AbstractSession 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.
 
Methods inherited from class oracle.toplink.mappings.CollectionMapping
addAggregateOrderBy, addAscendingOrdering, addDescendingOrdering, addOrderBy, getRealCollectionAttributeValueFromObject, setContainerPolicy, setCustomDeleteAllQuery, setDeleteAllCall, setDeleteAllSQLString, setSessionName, useCollectionClass, useMapClass, useMapClass, useSortedSetClass, useTransparentCollection, useTransparentList, useTransparentMap, useTransparentSet
 
Methods inherited from class oracle.toplink.mappings.ForeignReferenceMapping
dontUseBatchReading, dontUseIndirection, getJoinFetch, getReferenceClass, getRelationshipPartnerAttributeName, isCascadeMerge, isCascadePersist, isCascadeRefresh, isCascadeRemove, isInnerJoinFetched, isJoinFetched, isOuterJoinFetched, privateOwnedRelationship, setCascadeAll, setCascadeMerge, setCascadePersist, setCascadeRefresh, setCascadeRemove, setCustomSelectionQuery, setIndirectionPolicy, setIsPrivateOwned, setJoinFetch, setReferenceClass, setRelationshipPartnerAttributeName, setSelectionCall, setSelectionCriteria, setSelectionSQLString, setUsesBatchReading, setUsesIndirection, shouldUseBatchReading, useBasicIndirection, useBatchReading, useContainerIndirection, useInnerJoinFetch, useOuterJoinFetch, usesIndirection
 
Methods inherited from class oracle.toplink.mappings.DatabaseMapping
getAttributeAccessor, getAttributeClassification, getAttributeName, getGetMethodName, getProperty, getSetMethodName, isLazy, isOptional, isUsingMethodAccess, readOnly, readWrite, setAttributeAccessor, setAttributeName, setGetMethodName, setIsLazy, setIsOptional, setIsReadOnly, setProperty, setSetMethodName, setWeight
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AggregateCollectionMapping

public AggregateCollectionMapping()
Default constructor.

Method Detail

addTargetForeignKeyFieldName

public void addTargetForeignKeyFieldName(java.lang.String targetForeignKey,
                                         java.lang.String sourceKey)
Define the target foreign key relationship in the 1-M aggregate collection mapping. Both the target foreign key field name and the source primary key field name must be specified.


getSourceKeyFieldNames

public java.util.Vector getSourceKeyFieldNames()
Return the source key field names associated with the mapping. These are in-order with the targetForeignKeyFieldNames.


getTargetForeignKeyFieldNames

public java.util.Vector getTargetForeignKeyFieldNames()
Return the target foregin key field names associated with the mapping. These are in-order with the sourceKeyFieldNames.


setSourceKeyFieldNames

public void setSourceKeyFieldNames(java.util.Vector fieldNames)
Set the source key field names associated with the mapping. These must be in-order with the targetForeignKeyFieldNames.


setTargetForeignKeyFieldNames

public void setTargetForeignKeyFieldNames(java.util.Vector fieldNames)
Set the target foregin key field names associated with the mapping. These must be in-order with the sourceKeyFieldNames.


simpleAddToCollectionChangeRecord

public void simpleAddToCollectionChangeRecord(java.lang.Object referenceKey,
                                              java.lang.Object changeSetToAdd,
                                              oracle.toplink.internal.sessions.ObjectChangeSet changeSet,
                                              oracle.toplink.internal.sessions.AbstractSession 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. PLEASE ENSURE that the changes have been made in the object model first.

Overrides:
simpleAddToCollectionChangeRecord in class CollectionMapping

simpleRemoveFromCollectionChangeRecord

public void simpleRemoveFromCollectionChangeRecord(java.lang.Object referenceKey,
                                                   java.lang.Object changeSetToRemove,
                                                   oracle.toplink.internal.sessions.ObjectChangeSet changeSet,
                                                   oracle.toplink.internal.sessions.AbstractSession 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. PLEASE ENSURE that the changes have been made in the object model first.

Overrides:
simpleRemoveFromCollectionChangeRecord in class CollectionMapping

Copyright © 1998, 2012, Oracle. All Rights Reserved.