Skip navigation links

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

B28219-01


oracle.toplink.mappings
Class ForeignReferenceMapping

java.lang.Object
  extended byoracle.toplink.mappings.DatabaseMapping
      extended byoracle.toplink.mappings.ForeignReferenceMapping

All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable
Direct Known Subclasses:
CollectionMapping, ObjectReferenceMapping

public abstract class ForeignReferenceMapping
extends DatabaseMapping

Purpose: Abstract class for relationship mappings

See Also:
Serialized Form

Method Summary
 void dontUseBatchReading()
          PUBLIC: Indicates whether the referenced object should always be batch read on read all queries.
 void dontUseIndirection()
          PUBLIC: Indirection means that a ValueHolder will be put in-between the attribute and the real object.
 java.lang.Class getReferenceClass()
          PUBLIC: Returns the reference class.
 java.lang.String getRelationshipPartnerAttributeName()
          PUBLIC: Use this method retreive the relationship partner attribute name of this bidirectional Mapping.
 boolean isCascadeMerge()
          PUBLIC: Check cascading value for the MERGE operation.
 boolean isCascadePersist()
          PUBLIC: Check cascading value for the CREATE operation.
 boolean isCascadeRefresh()
          PUBLIC: Check cascading value for the REFRESH operation.
 boolean isCascadeRemove()
          PUBLIC: Check cascading value for the REMOVE operation.
 void privateOwnedRelationship()
          PUBLIC: Sets the reference object to be a private owned.
 void setCascadeAll(boolean value)
          PUBLIC: Sets the cascading for all operations.
 void setCascadeMerge(boolean value)
          PUBLIC: Sets the cascading for the MERGE operation.
 void setCascadePersist(boolean value)
          PUBLIC: Sets the cascading for the CREATE operation.
 void setCascadeRefresh(boolean value)
          PUBLIC: Sets the cascading for the REFRESH operation.
 void setCascadeRemove(boolean value)
          PUBLIC: Sets the cascading for the REMOVE operation.
 void setCustomSelectionQuery(ReadQuery query)
          PUBLIC: Relationship mappings creates a read query to read reference objects.
 void setIndirectionPolicy(IndirectionPolicy indirectionPolicy)
          ADVANCED: Set the indirection policy.
 void setReferenceClass(java.lang.Class referenceClass)
          PUBLIC: Set the referenced class.
 void setRelationshipPartnerAttributeName(java.lang.String attributeName)
          PUBLIC: Use this method to specify the relationship partner attribute name of a bidirectional Mapping.
 void setSelectionCall(Call call)
          PUBLIC: This is a property on the mapping which will allow custom call to be substituted for reading a reference object.
 void setSelectionCriteria(Expression anExpression)
          PUBLIC: Sets the selection criteria to be used as a where clause to read reference objects.
 void setSelectionSQLString(java.lang.String sqlString)
          PUBLIC: This is a property on the mapping which will allow custom SQL to be substituted for reading a reference object.
 void setUsesBatchReading(boolean usesBatchReading)
          PUBLIC: Indicates whether the referenced object should always be batch read on read all queries.
 void setUsesIndirection(boolean usesIndirection)
          PUBLIC: Indirection means that a ValueHolder will be put in-between the attribute and the real object.
 boolean shouldUseBatchReading()
          PUBLIC: Indicates whether the referenced object should always be batch read on read all queries.
 void useBasicIndirection()
          PUBLIC: Indirection means that a ValueHolder will be put in-between the attribute and the real object.
 void useBatchReading()
          PUBLIC: Indicates whether the referenced object should always be batch read on read all queries.
 void useContainerIndirection(java.lang.Class containerClass)
          PUBLIC: Indirection means that a IndirectContainer (wrapping a ValueHolder) will be put in-between the attribute and the real object.
 boolean usesIndirection()
          PUBLIC: Indirection means that some sort of indirection object will be put in-between the attribute and the real object.

 

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, simpleAddToCollectionChangeRecord, simpleRemoveFromCollectionChangeRecord

 

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

 

Method Detail

dontUseBatchReading

public void dontUseBatchReading()
PUBLIC: Indicates whether the referenced object should always be batch read on read all queries. Batch reading will read all of the related objects in a single query when accessed from an originating read all. This should only be used if it is know that the related objects are always required with the source object, or indirection is not used.

dontUseIndirection

public void dontUseIndirection()
PUBLIC: Indirection means that a ValueHolder will be put in-between the attribute and the real object. This allows for the reading of the target from the database to be delayed until accessed. This defaults to true and is strongly suggested as it give a huge performance gain.

getReferenceClass

public java.lang.Class getReferenceClass()
PUBLIC: Returns the reference class.

getRelationshipPartnerAttributeName

public java.lang.String getRelationshipPartnerAttributeName()
PUBLIC: Use this method retreive the relationship partner attribute name of this bidirectional Mapping.

isCascadePersist

public boolean isCascadePersist()
PUBLIC: Check cascading value for the CREATE operation.

isCascadeMerge

public boolean isCascadeMerge()
PUBLIC: Check cascading value for the MERGE operation.

isCascadeRefresh

public boolean isCascadeRefresh()
PUBLIC: Check cascading value for the REFRESH operation.

isCascadeRemove

public boolean isCascadeRemove()
PUBLIC: Check cascading value for the REMOVE operation.

privateOwnedRelationship

public void privateOwnedRelationship()
PUBLIC: Sets the reference object to be a private owned. The default behaviour is non private owned.

setCascadeAll

public void setCascadeAll(boolean value)
PUBLIC: Sets the cascading for all operations.

setCascadePersist

public void setCascadePersist(boolean value)
PUBLIC: Sets the cascading for the CREATE operation.

setCascadeMerge

public void setCascadeMerge(boolean value)
PUBLIC: Sets the cascading for the MERGE operation.

setCascadeRefresh

public void setCascadeRefresh(boolean value)
PUBLIC: Sets the cascading for the REFRESH operation.

setCascadeRemove

public void setCascadeRemove(boolean value)
PUBLIC: Sets the cascading for the REMOVE operation.

setCustomSelectionQuery

public void setCustomSelectionQuery(ReadQuery query)
PUBLIC: Relationship mappings creates a read query to read reference objects. If this default query needs to be customize then user can specify its own read query to do the reading of reference objects. One must instance of ReadQuery or subclasses of the ReadQuery.

setIndirectionPolicy

public void setIndirectionPolicy(IndirectionPolicy indirectionPolicy)
ADVANCED: Set the indirection policy.

setReferenceClass

public void setReferenceClass(java.lang.Class referenceClass)
PUBLIC: Set the referenced class.

setRelationshipPartnerAttributeName

public void setRelationshipPartnerAttributeName(java.lang.String attributeName)
PUBLIC: Use this method to specify the relationship partner attribute name of a bidirectional Mapping. TopLink will use the attribute name to find the back pointer mapping to maintain referential integrity of the bi-directional mappings.

setSelectionCriteria

public void setSelectionCriteria(Expression anExpression)
PUBLIC: Sets the selection criteria to be used as a where clause to read reference objects. This criteria is automatically generated by the TopLink if not explicitly specified by the user.

setSelectionSQLString

public void setSelectionSQLString(java.lang.String sqlString)
PUBLIC: This is a property on the mapping which will allow custom SQL to be substituted for reading a reference object.

setSelectionCall

public void setSelectionCall(Call call)
PUBLIC: This is a property on the mapping which will allow custom call to be substituted for reading a reference object.

setUsesBatchReading

public void setUsesBatchReading(boolean usesBatchReading)
PUBLIC: Indicates whether the referenced object should always be batch read on read all queries. Batch reading will read all of the related objects in a single query when accessed from an originating read all. This should only be used if it is know that the related objects are always required with the source object, or indirection is not used.

setUsesIndirection

public void setUsesIndirection(boolean usesIndirection)
PUBLIC: Indirection means that a ValueHolder will be put in-between the attribute and the real object. This allows for the reading of the target from the database to be delayed until accessed. This defaults to true and is strongly suggested as it give a huge performance gain.
See Also:
useBasicIndirection(), dontUseIndirection()

shouldUseBatchReading

public boolean shouldUseBatchReading()
PUBLIC: Indicates whether the referenced object should always be batch read on read all queries. Batch reading will read all of the related objects in a single query when accessed from an originating read all. This should only be used if it is know that the related objects are always required with the source object, or indirection is not used.

useBasicIndirection

public void useBasicIndirection()
PUBLIC: Indirection means that a ValueHolder will be put in-between the attribute and the real object. This allows for the reading of the target from the database to be delayed until accessed. This defaults to true and is strongly suggested as it give a huge performance gain.

useBatchReading

public void useBatchReading()
PUBLIC: Indicates whether the referenced object should always be batch read on read all queries. Batch reading will read all of the related objects in a single query when accessed from an originating read all. This should only be used if it is know that the related objects are always required with the source object, or indirection is not used.

useContainerIndirection

public void useContainerIndirection(java.lang.Class containerClass)
PUBLIC: Indirection means that a IndirectContainer (wrapping a ValueHolder) will be put in-between the attribute and the real object. This allows for an application specific class to be used which wraps the value holder. The purpose of this is that the domain objects will not require to import the ValueHolderInterface class. Refer also to transparent indirection for a transparent solution to indirection.

usesIndirection

public boolean usesIndirection()
PUBLIC: Indirection means that some sort of indirection object will be put in-between the attribute and the real object. This allows for the reading of the target from the database to be delayed until accessed. This defaults to true and is strongly suggested as it give a huge performance gain.

Skip navigation links

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