|
Oracle Application Server TopLink API Reference 10g Release 2 (10.1.2) B15903-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.toplink.mappings.DatabaseMapping
oracle.toplink.mappings.ForeignReferenceMapping
oracle.toplink.mappings.CollectionMapping
Purpose: Abstract class for relationship mappings which store collection of objects
Constructor Summary | |
CollectionMapping() PUBLIC: Default constructor. |
Method Summary | |
void |
addAscendingOrdering(java.lang.String queryKeyName) PUBLIC: Provide order suppor for queryKeyName in ascending order |
void |
addDescendingOrdering(java.lang.String queryKeyName) PUBLIC: Provide order suppor for queryKeyName in descending order |
java.lang.Object |
getRealCollectionAttributeValueFromObject(java.lang.Object object, oracle.toplink.publicinterface.Session session) Convenience method. |
void |
setContainerPolicy(oracle.toplink.internal.queryframework.ContainerPolicy containerPolicy) ADVANCED: Configure the mapping to use a container policy. |
void |
setCustomDeleteAllQuery(ModifyQuery query) PUBLIC: The default delete all query for mapping can be overridden by specifying the new query. |
void |
setDeleteAllSQLString(java.lang.String sqlString) PUBLIC: Set the receiver's delete SQL string. |
void |
setSessionName(java.lang.String name) PUBLIC: Set the name of the session to execute the mapping's queries under. |
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 concreteClass) PUBLIC: Configure the mapping to use an instance of the specified container class to hold the target objects. |
void |
useMapClass(java.lang.Class concreteClass, java.lang.String methodName) PUBLIC: Configure the mapping to use an instance of the specified container class to hold the target objects. |
void |
useSortedSetClass(java.lang.Class concreteClass, java.util.Comparator comparator) PUBLIC: Configure the mapping to use an instance of the specified container class to hold the target objects. |
void |
useTransparentCollection() PUBLIC: If transparent indirection is used, a special collection will be placed in the source object's attribute. |
void |
useTransparentMap(java.lang.String methodName) PUBLIC: If transparent indirection is used, a special map will be placed in the source object's attribute. |
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 |
public CollectionMapping()
Method Detail |
public void addAscendingOrdering(java.lang.String queryKeyName)
public void addDescendingOrdering(java.lang.String queryKeyName)
public java.lang.Object getRealCollectionAttributeValueFromObject(java.lang.Object object, oracle.toplink.publicinterface.Session session) throws DescriptorException
getRealCollectionAttributeValueFromObject
in class DatabaseMapping
DescriptorException
public void setContainerPolicy(oracle.toplink.internal.queryframework.ContainerPolicy containerPolicy)
setContainerPolicy
in interface ContainerMapping
public void setCustomDeleteAllQuery(ModifyQuery query)
public void setDeleteAllSQLString(java.lang.String sqlString)
public void setSessionName(java.lang.String name)
public void simpleAddToCollectionChangeRecord(java.lang.Object referenceKey, java.lang.Object changeSetToAdd, oracle.toplink.internal.sessions.ObjectChangeSet changeSet, oracle.toplink.publicinterface.Session session)
simpleAddToCollectionChangeRecord
in class DatabaseMapping
public void simpleRemoveFromCollectionChangeRecord(java.lang.Object referenceKey, java.lang.Object changeSetToRemove, oracle.toplink.internal.sessions.ObjectChangeSet changeSet, oracle.toplink.publicinterface.Session session)
simpleRemoveFromCollectionChangeRecord
in class DatabaseMapping
public void useCollectionClass(java.lang.Class concreteClass)
The container class must implement (directly or indirectly) the java.util.Collection
interface.
useCollectionClass
in interface ContainerMapping
public void useSortedSetClass(java.lang.Class concreteClass, java.util.Comparator comparator)
The container class must implement (directly or indirectly) the java.util.SortedSet
interface.
public void useMapClass(java.lang.Class concreteClass, java.lang.String methodName)
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 any value to be inserted into the Map
.
The container class must implement (directly or indirectly) the java.util.Map
interface.
To facilitate resolving the method, the mapping's referenceClass must set before calling this method.
useMapClass
in interface ContainerMapping
public void useTransparentCollection()
public void useTransparentMap(java.lang.String methodName)
The key used in the Map is the value returned by a call to the zero parameter method named methodName. The method should be a zero argument method implemented (or inherited) by the value to be inserted into the Map.
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |