|
Oracle Fusion Middleware Java API Reference for Oracle TopLink 11g Release 1 (11.1.1) B32476-03 |
||||||||
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 oracle.toplink.mappings.DirectCollectionMapping oracle.toplink.mappings.DirectMapMapping
public class DirectMapMapping
Mapping for a collection of key-value pairs. The key and value must be simple types (String, Number, Date, etc.) and stored in a single table along with a foreign key to the source object. A converter can be used on the key and value if the desired object types do not match the data types.
Converter
,
ObjectTypeConverter
,
TypeConversionConverter
,
SerializedObjectConverter
,
Serialized FormField Summary |
---|
Fields inherited from class oracle.toplink.mappings.ForeignReferenceMapping |
---|
INNER_JOIN, NONE, OUTER_JOIN |
Constructor Summary | |
---|---|
DirectMapMapping()
DirectMapCollectionMapping constructor |
Method Summary | |
---|---|
java.lang.Class |
getKeyClass()
This is a helper method to get the object class from the key converter if it is a TypeConversionConverter. |
Converter |
getKeyConverter()
Return the converter on the mapping. |
java.lang.Class |
getValueClass()
This is a helper method to get the object class from the value converter if it is a TypeConversionConverter. |
void |
setDirectKeyFieldName(java.lang.String fieldName)
Set the direct key field name in the reference table. |
void |
setKeyClass(java.lang.Class keyClass)
This is a helper method to set the key converter to a TypeConversionConverter. |
void |
setKeyConverter(Converter keyConverter)
Set the converter on the mapping. |
void |
setValueClass(java.lang.Class valueClass)
This is a helper method to set the value converter to a TypeConversionConverter. |
void |
simpleAddToCollectionChangeRecord(java.lang.Object referenceKey,
java.lang.Object objectToAdd,
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 objectToRemove,
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. |
void |
useMapClass(java.lang.Class concreteClass)
Configure the mapping to use an instance of the specified container class to hold the target objects. |
void |
useTransparentMap()
Configure the mapping to use an instance of the specified container class to hold the target objects. |
Methods inherited from class oracle.toplink.mappings.CollectionMapping |
---|
addAggregateOrderBy, addAscendingOrdering, addDescendingOrdering, addOrderBy, getRealCollectionAttributeValueFromObject, setCustomDeleteAllQuery, setDeleteAllCall, setDeleteAllSQLString, useSortedSetClass, useTransparentCollection, useTransparentList, useTransparentMap, useTransparentSet |
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 |
---|
public DirectMapMapping()
Method Detail |
---|
public Converter getKeyConverter()
public void setKeyConverter(Converter keyConverter)
public void setDirectKeyFieldName(java.lang.String fieldName)
public void useMapClass(java.lang.Class concreteClass)
The default container class is java.util.Hashtable.
The container class must implements (directly or indirectly) the Map interface.
Note: Do not use both useMapClass(Class concreteClass), useTransparentMap(). The last use of one of the two methods will overide the previous one.
useMapClass
in class CollectionMapping
public void useTransparentMap()
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.
Note: Do not use both useMapClass(Class concreteClass), useTransparentMap(). The last use of one of the two methods will overide the previous one.
public void setKeyClass(java.lang.Class keyClass)
public java.lang.Class getKeyClass()
public void setValueClass(java.lang.Class valueClass)
public void simpleAddToCollectionChangeRecord(java.lang.Object referenceKey, java.lang.Object objectToAdd, oracle.toplink.internal.sessions.ObjectChangeSet changeSet, oracle.toplink.internal.sessions.AbstractSession session)
simpleAddToCollectionChangeRecord
in class DirectCollectionMapping
public void simpleRemoveFromCollectionChangeRecord(java.lang.Object referenceKey, java.lang.Object objectToRemove, oracle.toplink.internal.sessions.ObjectChangeSet changeSet, oracle.toplink.internal.sessions.AbstractSession session)
simpleRemoveFromCollectionChangeRecord
in class DirectCollectionMapping
public java.lang.Class getValueClass()
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |