Skip navigation links

Oracle TopLink Java API Reference
10g Release 3 (10.1.3.1)

B28219-01


oracle.toplink.eis.mappings
Class EISOneToManyMapping

java.lang.Object
  extended byoracle.toplink.mappings.DatabaseMapping
      extended byoracle.toplink.mappings.ForeignReferenceMapping
          extended byoracle.toplink.mappings.CollectionMapping
              extended byoracle.toplink.eis.mappings.EISOneToManyMapping

All Implemented Interfaces:
java.lang.Cloneable, ContainerMapping, oracle.toplink.eis.mappings.EISMapping, SDKCollectionMapping, java.io.Serializable

public class EISOneToManyMapping
extends CollectionMapping
implements oracle.toplink.eis.mappings.EISMapping, SDKCollectionMapping

An EIS one-to-many mapping is a reference mapping that represents the relationship between a single source object and a collection of mapped persistent Java objects. The source object usually contains a foreign key (pointer) to the target objects (key on source); alternatively, the target objects may contiain a foreign key to the source object (key on target). Because both the source and target objects use interactions, they must all be configured as root object types.

Record Type Description
Indexed Ordered collection of record elements. The indexed record EIS format enables Java class attribute values to be retreived by position or index.
Mapped Key-value map based representation of record elements. The mapped record EIS format enables Java class attribute values to be retreived by an object key.
XML DatabaseRow/Map representation of an XML DOM element.
Since:
Oracle TopLink 10g Release 2 (10.1.3)
See Also:
EISDescriptor.useIndexedRecordFormat(), EISDescriptor.useMappedRecordFormat(), EISDescriptor.useXMLRecordFormat(), Serialized Form

Constructor Summary
EISOneToManyMapping()
           

 

Method Summary
 void addForeignKeyField(DatabaseField sourceForeignKeyField, DatabaseField targetKeyField)
          PUBLIC: Define the source foreign key relationship in the one-to-many mapping.
 void addForeignKeyFieldName(java.lang.String sourceForeignKeyFieldName, java.lang.String targetKeyFieldName)
          PUBLIC: Define the source foreign key relationship in the one-to-many mapping.
 ModifyQuery getDeleteAllQuery()
           
 XMLField getForeignKeyGroupingElement()
          Get the grouping element field on the mapping.
 boolean hasCustomDeleteAllQuery()
           
 void setDeleteAllCall(Call call)
          PUBLIC: The default delete all call for this mapping can be overridden by specifying the new call.
 void setForeignKeyGroupingElement(java.lang.String xpath)
          Set the grouping element field on 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
getRealCollectionAttributeValueFromObject, setContainerPolicy, setCustomDeleteAllQuery, setSessionName, useCollectionClass, useMapClass, useSortedSetClass, useTransparentCollection, useTransparentList, useTransparentMap, useTransparentSet

 

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

 

Methods inherited from class oracle.toplink.mappings.DatabaseMapping
getAttributeAccessor, getAttributeClassification, getAttributeName, getGetMethodName, getProperty, getReferenceClassDescriptor, getSetMethodName, isUsingMethodAccess, readOnly, readWrite, setAttributeAccessor, setAttributeName, setGetMethodName, setIsReadOnly, setProperty, 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, getRealCollectionAttributeValueFromObject, setRealAttributeValueInObject

 

Methods inherited from interface oracle.toplink.mappings.ContainerMapping
getContainerPolicy, setContainerPolicy, useCollectionClass, useMapClass

 

Constructor Detail

EISOneToManyMapping

public EISOneToManyMapping()

Method Detail

addForeignKeyField

public void addForeignKeyField(DatabaseField sourceForeignKeyField,
                               DatabaseField targetKeyField)
PUBLIC: Define the source foreign key relationship in the one-to-many mapping. This method is used for composite source foreign key relationships. That is, the source object's table has multiple foreign key fields that are references to the target object's (typically primary) key fields. Both the source foreign key field name and the corresponding target primary key field name must be specified.

addForeignKeyFieldName

public void addForeignKeyFieldName(java.lang.String sourceForeignKeyFieldName,
                                   java.lang.String targetKeyFieldName)
PUBLIC: Define the source foreign key relationship in the one-to-many mapping. This method is used for composite source foreign key relationships. That is, the source object's table has multiple foreign key fields that are references to the target object's (typically primary) key fields. Both the source foreign key field name and the corresponding target primary key field name must be specified.

getForeignKeyGroupingElement

public XMLField getForeignKeyGroupingElement()
Get the grouping element field on the mapping. This is an optional setting.

setForeignKeyGroupingElement

public void setForeignKeyGroupingElement(java.lang.String xpath)
Set the grouping element field on the mapping. This is an optional setting; however it is a required setting when there are more than one foreign keys specified

hasCustomDeleteAllQuery

public boolean hasCustomDeleteAllQuery()

getDeleteAllQuery

public ModifyQuery getDeleteAllQuery()

setDeleteAllCall

public void setDeleteAllCall(Call call)
PUBLIC: The default delete all call for this mapping can be overridden by specifying the new call. This call is responsible for doing the deletion required by the mapping, such as optimized delete all of target objects for 1-M.
Overrides:
setDeleteAllCall in class CollectionMapping

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

Skip navigation links

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