EclipseLink1.0 - 20080707 API Reference

org.eclipse.persistence.mappings.structures
Class ArrayMapping

java.lang.Object
  extended by org.eclipse.persistence.mappings.DatabaseMapping
      extended by org.eclipse.persistence.mappings.foundation.AbstractCompositeDirectCollectionMapping
          extended by org.eclipse.persistence.mappings.structures.ArrayMapping
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, ContainerMapping, ArrayCollectionMapping

public class ArrayMapping
extends AbstractCompositeDirectCollectionMapping
implements ArrayCollectionMapping

Purpose: In an object-relational data model, structures can contain "Arrays" or collections of other data-types. In Oracle 8i, a "VARRAY" is typically used to represent a collection of primitive data or aggregate structures. These arrays are stored with their parent structure in the same table.

See Also:
StructureMapping, NestedTableMapping, ReferenceMapping, Serialized Form

Field Summary
 
Fields inherited from class org.eclipse.persistence.mappings.foundation.AbstractCompositeDirectCollectionMapping
elementDataTypeName, field, valueConverter
 
Fields inherited from class org.eclipse.persistence.mappings.DatabaseMapping
attributeAccessor, attributeName, descriptor, fields, isLazy, isOptional, isReadOnly, isRemotelyInitialized, NO_FIELDS, NO_WEIGHT, primaryKeyMapping, properties, weight, WEIGHT_1
 
Constructor Summary
ArrayMapping()
          Default constructor.
 
Method Summary
 org.eclipse.persistence.internal.sessions.ChangeRecord compareForChange(java.lang.Object clone, java.lang.Object backup, org.eclipse.persistence.internal.sessions.ObjectChangeSet owner, org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: Build and return the change record that results from comparing the two direct collection attributes.
 boolean compareObjects(java.lang.Object object1, java.lang.Object object2, org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: Compare the attributes belonging to this mapping for the objects.
 java.lang.String getElementDataTypeName()
          PUBLIC: Return the "data type" associated with each element in the nested collection.
 java.lang.String getStructureName()
          PUBLIC: Return the name of the structure.
 void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: Initialize the mapping.
 void mergeChangesIntoObject(java.lang.Object target, org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord, java.lang.Object source, org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
          INTERNAL: Merge changes from the source to the target object.
 void mergeIntoObject(java.lang.Object target, boolean isTargetUnInitialized, java.lang.Object source, org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
          INTERNAL: Merge changes from the source to the target object.
 void setElementDataTypeName(java.lang.String elementDataTypeName)
          PUBLIC: Set the "data type" associated with each element in the nested collection.
 void setFieldName(java.lang.String fieldName)
          PUBLIC: Set the name of the field that holds the nested collection.
 void setStructureName(java.lang.String structureName)
          PUBLIC: Set the name of the structure.
 void simpleAddToCollectionChangeRecord(java.lang.Object referenceKey, java.lang.Object changeSetToAdd, org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet, org.eclipse.persistence.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 changeSetToRemove, org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet, org.eclipse.persistence.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.
 
Methods inherited from class org.eclipse.persistence.mappings.foundation.AbstractCompositeDirectCollectionMapping
buildAddedElementFromChangeSet, buildBackupClone, buildChangeSet, buildClone, buildCloneFromRow, buildClonePart, buildCopy, buildElementFromChangeSet, buildElementFromElement, buildRemovedElementFromChangeSet, cascadePerformRemoveIfRequired, cascadeRegisterNewIfRequired, collectFields, compareElements, compareElementsForChange, convertToChangeRecord, fixObjectReferences, getAttributeElementClass, getContainerPolicy, getField, getFieldClassification, getFieldElementClass, getFieldName, getRealCollectionAttributeValueFromObject, getValueConverter, hasValueConverter, isAbstractCompositeDirectCollectionMapping, iterate, mapKeyHasChanged, setAttributeElementClass, setContainerPolicy, setField, setFieldElementClass, setUsesSingleNode, setValueConverter, useCollectionClass, useMapClass, usesSingleNode, valueFromRow, writeFromObjectIntoRow, writeFromObjectIntoRowForUpdate, writeFromObjectIntoRowWithChangeRecord, writeInsertFieldsIntoRow
 
Methods inherited from class org.eclipse.persistence.mappings.DatabaseMapping
addToCollectionChangeRecord, buildBackupCloneForPartObject, buildChangeRecord, buildCloneForPartObject, buildExpression, buildObjectJoinExpression, buildObjectJoinExpression, buildShallowOriginalFromRow, calculateDeferredChanges, cascadeDiscoverAndPersistUnregisteredNewObjects, cascadeMerge, clone, cloneFields, convertClassNamesToClasses, createUnitOfWorkValueHolder, extractNestedExpressions, fixRealObjectReferences, getAttributeAccessor, getAttributeClassification, getAttributeName, getAttributeValueFromObject, getDescriptor, getFields, getGetMethodName, getObjectCorrespondingTo, getProperties, getProperty, getRealAttributeValueFromObject, getReferenceDescriptor, getRelationshipPartner, getSelectFields, getSelectTables, getSetMethodName, getValueFromRemoteValueHolder, getWeight, hasConstraintDependency, hasDependency, hasInverseConstraintDependency, hasRootExpressionThatShouldUseOuterJoin, instantiateAttribute, isAbstractCompositeCollectionMapping, isAbstractCompositeObjectMapping, isAbstractDirectMapping, isAggregateCollectionMapping, isAggregateMapping, isAggregateObjectMapping, isCascadedLockingSupported, isChangeTrackingSupported, isCloningRequired, isCollectionMapping, isDatabaseMapping, isDirectCollectionMapping, isDirectMapMapping, isDirectToFieldMapping, isDirectToXMLTypeMapping, isEISMapping, isForeignReferenceMapping, isJoiningSupported, isLazy, isManyToManyMapping, isNestedTableMapping, isObjectReferenceMapping, isOneToManyMapping, isOneToOneMapping, isOptional, isPrimaryKeyMapping, isPrivateOwned, isReadOnly, isReferenceMapping, isRelationalMapping, isRemotelyInitialized, isStructureMapping, isTransformationMapping, isUsingMethodAccess, isVariableOneToOneMapping, isWriteOnly, isXMLMapping, iterateOnRealAttributeValue, performDataModificationEvent, postDelete, postInitialize, postInsert, postUpdate, preDelete, preInitialize, preInsert, prepareCascadeLockingPolicy, preUpdate, readFromResultSetIntoObject, readFromRowIntoObject, readFromRowIntoObject, readOnly, readWrite, rehashFieldDependancies, remoteInitialization, remotelyInitialized, removeFromCollectionChangeRecord, replaceValueHoldersIn, setAttributeAccessor, setAttributeName, setAttributeValueInObject, setChangeListener, setDescriptor, setFields, setGetMethodName, setIsLazy, setIsOptional, setIsPrimaryKeyMapping, setIsReadOnly, setProperties, setProperty, setRealAttributeValueInObject, setSetMethodName, setWeight, toString, updateChangeRecord, validateAfterInitialization, validateBeforeInitialization, valueFromObject, valueFromResultSet, valueFromRow, verifyDelete, writeFromAttributeIntoRow, writeFromObjectIntoRowForShallowInsert, writeFromObjectIntoRowForShallowInsertWithChangeRecord, writeFromObjectIntoRowForWhereClause, writeUpdateFieldsIntoRow
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.persistence.mappings.structures.ArrayCollectionMapping
buildAddedElementFromChangeSet, buildChangeSet, buildElementFromElement, buildRemovedElementFromChangeSet, compareElements, compareElementsForChange, getAttributeName, getRealCollectionAttributeValueFromObject, mapKeyHasChanged, setRealAttributeValueInObject
 
Methods inherited from interface org.eclipse.persistence.mappings.ContainerMapping
getContainerPolicy, setContainerPolicy, useCollectionClass, useMapClass
 

Constructor Detail

ArrayMapping

public ArrayMapping()
Default constructor.

Method Detail

setFieldName

public void setFieldName(java.lang.String fieldName)
PUBLIC: Set the name of the field that holds the nested collection.


getStructureName

public java.lang.String getStructureName()
PUBLIC: Return the name of the structure. This is the name of the user-defined data type as defined on the database.


setStructureName

public void setStructureName(java.lang.String structureName)
PUBLIC: Set the name of the structure. This is the name of the user-defined data type as defined on the database.


getElementDataTypeName

public java.lang.String getElementDataTypeName()
PUBLIC: Return the "data type" associated with each element in the nested collection. Depending on the data store, this could be optional.


setElementDataTypeName

public void setElementDataTypeName(java.lang.String elementDataTypeName)
PUBLIC: Set the "data type" associated with each element in the nested collection. Depending on the data store, this could be optional.


initialize

public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
                throws DescriptorException
INTERNAL: Initialize the mapping.

Overrides:
initialize in class AbstractCompositeDirectCollectionMapping
Throws:
DescriptorException

compareForChange

public org.eclipse.persistence.internal.sessions.ChangeRecord compareForChange(java.lang.Object clone,
                                                                               java.lang.Object backup,
                                                                               org.eclipse.persistence.internal.sessions.ObjectChangeSet owner,
                                                                               org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Build and return the change record that results from comparing the two direct collection attributes.

Overrides:
compareForChange in class AbstractCompositeDirectCollectionMapping
Returns:
prototype.changeset.ChangeRecord

compareObjects

public boolean compareObjects(java.lang.Object object1,
                              java.lang.Object object2,
                              org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Compare the attributes belonging to this mapping for the objects.

Overrides:
compareObjects in class AbstractCompositeDirectCollectionMapping

mergeChangesIntoObject

public void mergeChangesIntoObject(java.lang.Object target,
                                   org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord,
                                   java.lang.Object source,
                                   org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
INTERNAL: Merge changes from the source to the target object.

Overrides:
mergeChangesIntoObject in class AbstractCompositeDirectCollectionMapping

mergeIntoObject

public void mergeIntoObject(java.lang.Object target,
                            boolean isTargetUnInitialized,
                            java.lang.Object source,
                            org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
INTERNAL: Merge changes from the source to the target object. Simply replace the entire target collection.

Overrides:
mergeIntoObject in class AbstractCompositeDirectCollectionMapping

simpleAddToCollectionChangeRecord

public void simpleAddToCollectionChangeRecord(java.lang.Object referenceKey,
                                              java.lang.Object changeSetToAdd,
                                              org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet,
                                              org.eclipse.persistence.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.

Overrides:
simpleAddToCollectionChangeRecord in class AbstractCompositeDirectCollectionMapping

simpleRemoveFromCollectionChangeRecord

public void simpleRemoveFromCollectionChangeRecord(java.lang.Object referenceKey,
                                                   java.lang.Object changeSetToRemove,
                                                   org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet,
                                                   org.eclipse.persistence.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.

Overrides:
simpleRemoveFromCollectionChangeRecord in class AbstractCompositeDirectCollectionMapping

EclipseLink1.0 - 20080707 API Reference