|
Oracle Fusion Middleware Java API Reference for Oracle TopLink (Deprecated) 11g Release 1 (11.1.1) B32476-04 |
||||||||
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
public class DirectCollectionMapping
Purpose: This mapping is used to store a collection of simple types (String, Number, Date, etc.) into a single table. The table must store the value and a foreign key to the source object. A converter can be used if the desired object type and the data type do not match.
Converter
,
ObjectTypeConverter
,
TypeConversionConverter
,
SerializedObjectConverter
,
Serialized FormField Summary |
---|
Fields inherited from class oracle.toplink.mappings.ForeignReferenceMapping |
---|
INNER_JOIN, NONE, OUTER_JOIN |
Constructor Summary | |
---|---|
DirectCollectionMapping()
Default constructor. |
Method Summary | |
---|---|
void |
addReferenceKeyField(DatabaseField referenceForeignKeyField,
DatabaseField sourcePrimaryKeyField)
Add the reference key field. |
void |
addReferenceKeyFieldName(java.lang.String referenceForeignKeyFieldName,
java.lang.String sourcePrimaryKeyFieldName)
Add the name of the reference key field. |
java.lang.String |
getDirectFieldName()
Returns the name of the field name in the reference table. |
HistoryPolicy |
getHistoryPolicy()
|
java.lang.String |
getReferenceTableName()
Returns the name of the reference table |
java.lang.String |
getReferenceTableQualifiedName()
Returns the qualified name of the reference table |
java.util.Vector |
getSourceKeyFieldNames()
Return the source key field names associated with the mapping. |
Converter |
getValueConverter()
Return the converter on the mapping. |
void |
setContainerPolicy(oracle.toplink.internal.queryframework.ContainerPolicy containerPolicy)
ADVANCED: Configure the mapping to use a container policy. |
void |
setCustomDeleteQuery(ModifyQuery query)
The default delete query for this mapping can be overridden by specifying the new query. |
void |
setCustomInsertQuery(DataModifyQuery query)
The default insert query for mapping can be overridden by specifying the new query. |
void |
setDeleteSQLString(java.lang.String sqlString)
Set the receiver's delete SQL string. |
void |
setDirectField(DatabaseField field)
Set the direct field in the reference table. |
void |
setDirectFieldClassification(java.lang.Class fieldType)
ADVANCED: Set the class type of the field value. |
void |
setDirectFieldName(java.lang.String fieldName)
Set the direct field name in the reference table. |
void |
setHistoryPolicy(HistoryPolicy policy)
|
void |
setInsertSQLString(java.lang.String sqlString)
Set the receiver's insert SQL string. |
void |
setReferenceKeyFieldName(java.lang.String fieldName)
Set the name of the reference key field. |
void |
setReferenceTableName(java.lang.String tableName)
Set the reference table name. |
void |
setSessionName(java.lang.String name)
Set the name of the session to execute the mapping's queries under. |
void |
setValueConverter(Converter valueConverter)
Set the converter on the mapping. |
void |
setValueConverterClassName(java.lang.String valueConverterClassName)
Set the converter class name on the mapping. |
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 |
useCollectionClass(java.lang.Class concreteClass)
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)
It is illegal to use a Map as the container of a DirectCollectionMapping. |
Methods inherited from class oracle.toplink.mappings.CollectionMapping |
---|
addAggregateOrderBy, addAscendingOrdering, addDescendingOrdering, addOrderBy, getRealCollectionAttributeValueFromObject, setCustomDeleteAllQuery, setDeleteAllCall, setDeleteAllSQLString, useMapClass, 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 DirectCollectionMapping()
Method Detail |
---|
public Converter getValueConverter()
public void setValueConverter(Converter valueConverter)
public void setValueConverterClassName(java.lang.String valueConverterClassName)
public void addReferenceKeyField(DatabaseField referenceForeignKeyField, DatabaseField sourcePrimaryKeyField)
public void addReferenceKeyFieldName(java.lang.String referenceForeignKeyFieldName, java.lang.String sourcePrimaryKeyFieldName)
public java.lang.String getDirectFieldName()
public HistoryPolicy getHistoryPolicy()
public java.lang.String getReferenceTableName()
public java.lang.String getReferenceTableQualifiedName()
public java.util.Vector getSourceKeyFieldNames()
public void setDeleteSQLString(java.lang.String sqlString)
public void setContainerPolicy(oracle.toplink.internal.queryframework.ContainerPolicy containerPolicy)
setContainerPolicy
in interface ContainerMapping
setContainerPolicy
in class CollectionMapping
public void setCustomDeleteQuery(ModifyQuery query)
public void setCustomInsertQuery(DataModifyQuery query)
public void setDirectField(DatabaseField field)
public void setDirectFieldClassification(java.lang.Class fieldType)
public void setDirectFieldName(java.lang.String fieldName)
public void setInsertSQLString(java.lang.String sqlString)
public void setReferenceKeyFieldName(java.lang.String fieldName)
public void setReferenceTableName(java.lang.String tableName)
public void setHistoryPolicy(HistoryPolicy policy)
public void setSessionName(java.lang.String name)
setSessionName
in class CollectionMapping
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 CollectionMapping
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 CollectionMapping
public void useCollectionClass(java.lang.Class concreteClass)
jdk1.2.x: The container class must implement (directly or indirectly) the Collection interface.
jdk1.1.x: The container class must be a subclass of Vector.
useCollectionClass
in interface ContainerMapping
useCollectionClass
in class CollectionMapping
public void useMapClass(java.lang.Class concreteClass, java.lang.String methodName)
useMapClass
in interface ContainerMapping
useMapClass
in class CollectionMapping
DirectMapMapping
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |