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

B32476-04

oracle.toplink.eis.mappings
Class EISOneToManyMapping

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.eis.mappings.EISOneToManyMapping
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, oracle.toplink.eis.mappings.EISMapping, ContainerMapping

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

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 Record/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

Field Summary
 
Fields inherited from class oracle.toplink.mappings.ForeignReferenceMapping
INNER_JOIN, NONE, OUTER_JOIN
 
Constructor Summary
EISOneToManyMapping()
           
 
Method Summary
 void addForeignKeyField(DatabaseField sourceForeignKeyField, DatabaseField targetKeyField)
          Define the source foreign key relationship in the one-to-many mapping.
 void addForeignKeyFieldName(java.lang.String sourceForeignKeyFieldName, java.lang.String targetKeyFieldName)
          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)
          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 setForeignKeyGroupingElement(XMLField field)
          Set if the grouping element field on 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, addOrderBy, getRealCollectionAttributeValueFromObject, setContainerPolicy, setCustomDeleteAllQuery, setSessionName, useCollectionClass, useMapClass, useMapClass, useSortedSetClass, useTransparentCollection, useTransparentList, useTransparentMap, useTransparentSet
 
Methods inherited from class oracle.toplink.mappings.ForeignReferenceMapping
dontUseIndirection, getJoinFetch, getReferenceClass, getRelationshipPartnerAttributeName, isCascadeMerge, isCascadePersist, isCascadeRefresh, isCascadeRemove, isInnerJoinFetched, isJoinFetched, isOuterJoinFetched, isPrivateOwned, privateOwnedRelationship, setCascadeAll, setCascadeMerge, setCascadePersist, setCascadeRefresh, setCascadeRemove, setCustomSelectionQuery, setIndirectionPolicy, setIsPrivateOwned, setJoinFetch, setReferenceClass, setRelationshipPartnerAttributeName, setSelectionCall, setUsesIndirection, useBasicIndirection, 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

EISOneToManyMapping

public EISOneToManyMapping()
Method Detail

addForeignKeyField

public void addForeignKeyField(DatabaseField sourceForeignKeyField,
                               DatabaseField targetKeyField)
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)
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)
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

setForeignKeyGroupingElement

public void setForeignKeyGroupingElement(XMLField field)
Set if 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.


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.

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.

Overrides:
simpleRemoveFromCollectionChangeRecord in class CollectionMapping

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