Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle TopLink API Reference 10g Release 3 (10.1.3) B13698-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.toplink.mappings
Class AggregateCollectionMapping

`java.lang.Object
oracle.toplink.mappings.DatabaseMapping
oracle.toplink.mappings.ForeignReferenceMapping
oracle.toplink.mappings.CollectionMapping
oracle.toplink.mappings.AggregateCollectionMapping`

All Implemented Interfaces:
  java.lang.Cloneable, ContainerMapping, oracle.toplink.mappings.RelationalMapping, java.io.Serializable

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

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.util.Vector` | `getSourceKeyFieldNames()` PUBLIC: Return the source key field names associated with the mapping.
`java.util.Vector` | `getTargetForeignKeyFieldNames()` PUBLIC: Return the target foregin key field names associated with the mapping.
`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, ObjectChangeSet changeSet, 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, ObjectChangeSet changeSet, 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.

Methods inherited from class oracle.toplink.mappings.CollectionMapping
`addAscendingOrdering, addDescendingOrdering, getRealCollectionAttributeValueFromObject, setContainerPolicy, setCustomDeleteAllQuery, setDeleteAllCall, setDeleteAllSQLString, setSessionName, useCollectionClass, useMapClass, useSortedSetClass, useTransparentCollection, useTransparentList, useTransparentMap, useTransparentSet`

Methods inherited from class oracle.toplink.mappings.ForeignReferenceMapping
`dontUseBatchReading, dontUseIndirection, getReferenceClass, getRelationshipPartnerAttributeName, isCascadeMerge, isCascadePersist, isCascadeRefresh, isCascadeRemove, privateOwnedRelationship, setCascadeAll, setCascadeMerge, setCascadePersist, setCascadeRefresh, setCascadeRemove, setCustomSelectionQuery, setIndirectionPolicy, setReferenceClass, setRelationshipPartnerAttributeName, setSelectionCall, setSelectionCriteria, setSelectionSQLString, setUsesBatchReading, setUsesIndirection, shouldUseBatchReading, useBasicIndirection, useBatchReading, useContainerIndirection, usesIndirection`

Methods inherited from class oracle.toplink.mappings.DatabaseMapping
`getAttributeAccessor, getAttributeClassification, getAttributeName, getGetMethodName, getReferenceClassDescriptor, getSetMethodName, isUsingMethodAccess, readOnly, readWrite, setAttributeAccessor, setAttributeName, setGetMethodName, setIsReadOnly, setSetMethodName, setWeight`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### AggregateCollectionMapping

    public AggregateCollectionMapping()

  PUBLIC: Default constructor.

Method Detail

### addTargetForeignKeyFieldName

    public void addTargetForeignKeyFieldName(java.lang.String targetForeignKey,
                                             java.lang.String sourceKey)

  PUBLIC: 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()

  PUBLIC: Return the source key field names associated with the mapping. These are in-order with the targetForeignKeyFieldNames.

### getTargetForeignKeyFieldNames

    public java.util.Vector getTargetForeignKeyFieldNames()

  PUBLIC: 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)

  PUBLIC: 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)

  PUBLIC: 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,
                                                  ObjectChangeSet changeSet,
                                                  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. 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,
                                                       ObjectChangeSet changeSet,
                                                       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. PLEASE ENSURE that the changes have been made in the object model first.
  Overrides:
    `simpleRemoveFromCollectionChangeRecord` in class `CollectionMapping`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 1998, 2006, Oracle. All Rights Reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD