Oracle Application Server TopLink API Reference
10g Release 2 (10.1.2)

B15903-01


oracle.toplink.sdk
Class SDKAggregateCollectionMapping

java.lang.Object
  extended byoracle.toplink.mappings.DatabaseMapping
      extended byoracle.toplink.mappings.AggregateMapping
          extended byoracle.toplink.sdk.SDKAggregateCollectionMapping

All Implemented Interfaces:
java.lang.Cloneable, ContainerMapping, SDKCollectionMapping, java.io.Serializable
Direct Known Subclasses:
ObjectArrayMapping

public class SDKAggregateCollectionMapping
extends AggregateMapping
implements SDKCollectionMapping

Chunks of data from non-relational data sources can have embedded collections of component objects. These can be mapped using this mapping. The format of the embedded data is determined by the reference descriptor.

Since:
TOPLink/Java 3.0
See Also:
SDKDescriptor, SDKFieldValue, SDKCollectionMappingHelper, SDKCollectionChangeRecord, SDKOrderedCollectionChangeRecord, Serialized Form

Constructor Summary
SDKAggregateCollectionMapping()
Default constructor.

Method Summary
java.lang.String getFieldName()
PUBLIC: Return the mapping's field name.
void setContainerPolicy(oracle.toplink.internal.queryframework.ContainerPolicy containerPolicy)
ADVANCED: Set the mapping's containerPolicy.
void setFieldName(java.lang.String fieldName)
PUBLIC: Set the mapping's field name.
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 concreteContainerClass)
PUBLIC: Configure the mapping to use an instance of the specified container class to hold the target objects.
void useMapClass(java.lang.Class concreteContainerClass, java.lang.String methodName)
PUBLIC: Configure the mapping to use an instance of the specified container class to hold the target objects.

Methods inherited from class oracle.toplink.mappings.AggregateMapping
getReferenceClass, setReferenceClass

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

Methods inherited from interface oracle.toplink.sdk.SDKCollectionMapping
getAttributeName, setRealAttributeValueInObject

Constructor Detail

SDKAggregateCollectionMapping

public SDKAggregateCollectionMapping()
Default constructor.

Method Detail

getFieldName

public java.lang.String getFieldName()
PUBLIC: Return the mapping's field name. This is the field in the database row that will hold the nested rows that make up the aggregate collection.

setContainerPolicy

public void setContainerPolicy(oracle.toplink.internal.queryframework.ContainerPolicy containerPolicy)
ADVANCED: Set the mapping's containerPolicy.
Specified by:
setContainerPolicy in interface ContainerMapping

setFieldName

public void setFieldName(java.lang.String fieldName)
PUBLIC: Set the mapping's field name. This is the field in the database row that will hold the nested rows that make up the aggregate collection.

simpleAddToCollectionChangeRecord

public 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.
Overrides:
simpleAddToCollectionChangeRecord in class DatabaseMapping

simpleRemoveFromCollectionChangeRecord

public 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.
Overrides:
simpleRemoveFromCollectionChangeRecord in class DatabaseMapping

useCollectionClass

public void useCollectionClass(java.lang.Class concreteContainerClass)
PUBLIC: Configure the mapping to use an instance of the specified container class to hold the target objects.

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.

Specified by:
useCollectionClass in interface ContainerMapping

useMapClass

public void useMapClass(java.lang.Class concreteContainerClass,
                        java.lang.String methodName)
PUBLIC: Configure the mapping to use an instance of the specified container class to hold the target objects. The key used to index the value in the Map is the value returned by a call to the specified zero-argument method. The method must be implemented by the class (or a superclass) of the value to be inserted into the Map.

jdk1.2.x: The container class must implement (directly or indirectly) the Map interface.

jdk1.1.x: The container class must be a subclass of Hashtable.

The referenceClass must be set before calling this method.

Specified by:
useMapClass in interface ContainerMapping

Copyright © 1998, 2005 Oracle Corporation. All Rights Reserved.