Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle TopLink API Reference 10g Release 3 (10.1.3) B13698-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.toplink.mappings.foundation
Class AbstractCompositeDirectCollectionMapping

`java.lang.Object
oracle.toplink.mappings.DatabaseMapping
oracle.toplink.mappings.foundation.AbstractCompositeDirectCollectionMapping`

All Implemented Interfaces:
  java.lang.Cloneable, ContainerMapping, java.io.Serializable

Direct Known Subclasses:
  EISCompositeDirectCollectionMapping, SDKDirectCollectionMapping, XMLCompositeDirectCollectionMapping

public abstract class AbstractCompositeDirectCollectionMapping
extends DatabaseMapping
implements ContainerMapping

`AbstractCompositeDirectCollectionMapping` consolidates the behavior of mappings that map collections of "native" data objects (e.g. `String`s). These are objects that do not have their own descriptor and repeat within the XML record for the containing object.

Since:
  TOPLink/Java 3.0
See Also:
  Serialized Form

Constructor Summary
`AbstractCompositeDirectCollectionMapping()` Default constructor.

Method Summary
`java.lang.Class` | `getAttributeElementClass()` PUBLIC: Return the class each element in the object's collection should be converted to, before the collection is inserted into the object.
`java.lang.Class` | `getFieldElementClass()` PUBLIC: Return the class each element in the database row's collection should be converted to, before the collection is inserted into the database.
`java.lang.String` | `getFieldName()` PUBLIC: Return the name of the field that holds the nested collection.
`Converter` | `getValueConverter()` PUBLIC: Return the converter on the mapping.
`void` | `setAttributeElementClass(java.lang.Class attributeElementClass)` PUBLIC: Set the class each element in the object's collection should be converted to, before the collection is inserted into the object.
`void` | `setContainerPolicy(ContainerPolicy containerPolicy)` ADVANCED: Set the mapping's containerPolicy.
`void` | `setField(DatabaseField field)` Set the field that holds the nested collection.
`void` | `setFieldElementClass(java.lang.Class fieldElementClass)` PUBLIC: Set the class each element in the database row's collection should be converted to, before the collection is inserted into the database.
`void` | `setUsesSingleNode(boolean usesSingleNode)` PUBLIC: Sets whether the mapping uses a single node.
`void` | `setValueConverter(Converter valueConverter)` PUBLIC: Set the converter on the mapping.
`void` | `simpleAddToCollectionChangeRecord(java.lang.Object referenceKey, java.lang.Object changeSetToAdd, ObjectChangeSet changeSet, 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, ObjectChangeSet changeSet, 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 nested objects.
`void` | `useMapClass(java.lang.Class concreteClass, java.lang.String methodName)` PUBLIC: Mapping does not support Map containers.
`boolean` | `usesSingleNode()` PUBLIC: Checks whether the mapping uses a single node.

Methods inherited from class oracle.toplink.mappings.DatabaseMapping
`getAttributeAccessor, getAttributeClassification, getAttributeName, getGetMethodName, getReferenceClassDescriptor, getSetMethodName, isUsingMethodAccess, readOnly, readWrite, setAttributeAccessor, setAttributeName, setGetMethodName, setIsReadOnly, setSetMethodName, setWeight`

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

Constructor Detail

### AbstractCompositeDirectCollectionMapping

    public AbstractCompositeDirectCollectionMapping()

  Default constructor.

Method Detail

### getValueConverter

    public Converter getValueConverter()

  PUBLIC: Return the converter on the mapping. A converter can be used to convert between the direct collection's object value and database value.

### setValueConverter

    public void setValueConverter(Converter valueConverter)

  PUBLIC: Set the converter on the mapping. A converter can be used to convert between the direct collection's object value and database value.

### getAttributeElementClass

    public java.lang.Class getAttributeElementClass()

  PUBLIC: Return the class each element in the object's collection should be converted to, before the collection is inserted into the object. This is optional - if left null, the elements will be added to the object's collection unconverted.

### getFieldElementClass

    public java.lang.Class getFieldElementClass()

  PUBLIC: Return the class each element in the database row's collection should be converted to, before the collection is inserted into the database. This is optional - if left null, the elements will be added to the database row's collection unconverted.

### getFieldName

    public java.lang.String getFieldName()

  PUBLIC: Return the name of the field that holds the nested collection.

### setAttributeElementClass

    public void setAttributeElementClass(java.lang.Class attributeElementClass)

  PUBLIC: Set the class each element in the object's collection should be converted to, before the collection is inserted into the object. This is optional - if left null, the elements will be added to the object's collection unconverted.

### setContainerPolicy

    public void setContainerPolicy(ContainerPolicy containerPolicy)

  ADVANCED: Set the mapping's containerPolicy.
  Specified by:
    `setContainerPolicy` in interface `ContainerMapping`

### setField

    public void setField(DatabaseField field)

  Set the field that holds the nested collection.

### setFieldElementClass

    public void setFieldElementClass(java.lang.Class fieldElementClass)

  PUBLIC: Set the class each element in the database row's collection should be converted to, before the collection is inserted into the database. This is optional - if left null, the elements will be added to the database row's collection unconverted.

### simpleAddToCollectionChangeRecord

    public void simpleAddToCollectionChangeRecord(java.lang.Object referenceKey,
                                                  java.lang.Object changeSetToAdd,
                                                  ObjectChangeSet changeSet,
                                                  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.
  Overrides:
    `simpleAddToCollectionChangeRecord` in class `DatabaseMapping`

### simpleRemoveFromCollectionChangeRecord

    public void simpleRemoveFromCollectionChangeRecord(java.lang.Object referenceKey,
                                                       java.lang.Object changeSetToRemove,
                                                       ObjectChangeSet changeSet,
                                                       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.
  Overrides:
    `simpleRemoveFromCollectionChangeRecord` in class `DatabaseMapping`

### useCollectionClass

    public void useCollectionClass(java.lang.Class concreteClass)

  PUBLIC: Configure the mapping to use an instance of the specified container class to hold the nested objects.

  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.

  Specified by:
    `useCollectionClass` in interface `ContainerMapping`

### useMapClass

    public void useMapClass(java.lang.Class concreteClass,
                            java.lang.String methodName)

  PUBLIC: Mapping does not support Map containers. It supports only Collection containers.
  Specified by:
    `useMapClass` in interface `ContainerMapping`

### setUsesSingleNode

    public void setUsesSingleNode(boolean usesSingleNode)

  PUBLIC: Sets whether the mapping uses a single node.

### usesSingleNode

    public boolean usesSingleNode()

  PUBLIC: Checks whether the mapping uses a single node.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 1998, 2006, Oracle. All Rights Reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD