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, java.io.Serializable

public class AggregateCollectionMapping
extends CollectionMapping

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
TypeMethod
 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.
 
Methods inherited from class oracle.toplink.mappings.CollectionMapping
addAscendingOrdering, addDescendingOrdering, setContainerPolicy, setCustomDeleteAllQuery, setDeleteAllSQLString, setSessionName, useCollectionClass, useMapClass, useTransparentCollection, useTransparentMap
 
Methods inherited from class oracle.toplink.mappings.ForeignReferenceMapping
dontUseBatchReading, dontUseIndirection, getReferenceClass, getRelationshipPartnerAttributeName, privateOwnedRelationship, setCustomSelectionQuery, setIndirectionPolicy, setReferenceClass, setRelationshipPartnerAttributeName, setSelectionCriteria, setSelectionSQLString, setUsesBatchReading, setUsesIndirection, shouldUseBatchReading, useBasicIndirection, useBatchReading, useContainerIndirection, useIndirection, usesIndirection
 
Methods inherited from class oracle.toplink.mappings.DatabaseMapping
getAttributeClassification, getAttributeName, getGetMethodName, getSetMethodName, readOnly, readWrite, 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.