Class DirectToXMLTypeMapping
- java.lang.Object
-
- org.eclipse.persistence.core.mappings.CoreMapping<AttributeAccessor,org.eclipse.persistence.internal.sessions.AbstractSession,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField>
-
- org.eclipse.persistence.mappings.DatabaseMapping
-
- org.eclipse.persistence.mappings.foundation.AbstractColumnMapping
-
- org.eclipse.persistence.mappings.foundation.AbstractDirectMapping
-
- org.eclipse.persistence.mappings.DirectToFieldMapping
-
- org.eclipse.persistence.mappings.xdb.DirectToXMLTypeMapping
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,MapComponentMapping,MapKeyMapping,RelationalMapping
public class DirectToXMLTypeMapping extends DirectToFieldMapping
Purpose: Mapping used to map from a DOM (org.w3c.Document) or XML String into an Oracle XMLType field, in Oracle 9i XDB.- See Also:
- Serialized Form
- Since:
- Toplink 10.1.3
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.persistence.mappings.DatabaseMapping
DatabaseMapping.WriteType
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanshouldReadWholeDocumentIndicates if we should initialize the whole DOM on a read.-
Fields inherited from class org.eclipse.persistence.mappings.foundation.AbstractDirectMapping
attributeClassification, attributeClassificationName, attributeObjectClassification, bypassDefaultNullValueCheck, fieldClassificationClassName, isMutable, keyTableForMapKey, nullValue
-
Fields inherited from class org.eclipse.persistence.mappings.foundation.AbstractColumnMapping
converter, converterClassName, field, isInsertable, isUpdatable
-
Fields inherited from class org.eclipse.persistence.mappings.DatabaseMapping
attributeAccessor, attributeName, derivedIdMapping, derivesId, descriptor, fields, isCacheable, isInSopObject, isJPAId, isLazy, isMapKeyMapping, isOptional, isPrimaryKeyMapping, isReadOnly, isRemotelyInitialized, mapsIdValue, NO_FIELDS, NO_WEIGHT, properties, unconvertedProperties, weight, WEIGHT_AGGREGATE, WEIGHT_DIRECT, WEIGHT_TO_ONE, WEIGHT_TRANSFORM
-
-
Constructor Summary
Constructors Constructor Description DirectToXMLTypeMapping()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.ObjectbuildCloneValue(java.lang.Object attributeValue, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Clone the DOM Document if required.protected booleancompareObjectValues(java.lang.Object firstValue, java.lang.Object secondValue, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Compare the attribute values.java.lang.ObjectgetObjectValue(java.lang.Object fieldValue, Session session)INTERNAL: Get the attribute value for the given field value.voidinitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: The mapping is initialized with the given session.booleanisDirectToXMLTypeMapping()INTERNAL: Related mapping should implement this method to return true.voidpreInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Default to mutable if mapped as a DOM.voidsetShouldReadWholeDocument(boolean readWholeDocument)PUBLIC:booleanshouldReadWholeDocument()PUBLIC:-
Methods inherited from class org.eclipse.persistence.mappings.DirectToFieldMapping
isRelationalMapping, setFieldName, writeValueIntoRow
-
Methods inherited from class org.eclipse.persistence.mappings.foundation.AbstractDirectMapping
addAdditionalFieldsToQuery, addFieldsForMapKey, addKeyToDeletedObjectsList, buildBackupClone, buildChangeRecord, buildClone, buildCloneFromRow, buildCloneValue, buildCopy, buildElementClone, buildExpression, buildSelectionQueryForDirectCollectionKeyMapping, buildShallowOriginalFromRow, cascadeDiscoverAndPersistUnregisteredNewObjects, cascadePerformRemoveIfRequired, cascadePerformRemoveIfRequired, cascadeRegisterNewIfRequired, cascadeRegisterNewIfRequired, compareForChange, compareObjects, convertClassNamesToClasses, createMapComponentFromJoinedRow, createMapComponentFromRow, createMapComponentsFromSerializableKeyInfo, createQueryKeyForMapKey, createSerializableMapKeyInfo, createStubbedMapComponentFromSerializableKeyInfo, deleteMapKey, extractIdentityFieldsForQuery, getAdditionalSelectionCriteriaForMapKey, getAdditionalTablesForJoinQuery, getAllFieldsForMapKey, getAttributeClassification, getAttributeClassificationName, getFieldClassification, getFieldClassification, getFieldClassificationClassName, getFieldName, getFieldValue, getForeignKeyFieldsForMapKey, getIdentityFieldsForMapKey, getMapKeyTargetType, getNestedJoinQuery, getNullValue, getObjectValueWithoutClassCheck, getReferenceDescriptor, getTargetVersionOfSourceObject, getWeight, internalBuildChangeRecord, isAbstractDirectMapping, isChangeTrackingSupported, isCloningRequired, isDirectToFieldMapping, isMutable, iterateOnMapKey, mergeChangesIntoObject, mergeIntoObject, postInitializeMapKey, preinitializeMapKey, remoteInitialization, requiresDataModificationEventsForMapKey, setAttributeClassification, setAttributeClassificationName, setFieldClassification, setFieldClassificationClassName, setFieldType, setIsMutable, setNullValue, toString, unwrapKey, updateChangeRecord, validateBeforeInitialization, valueFromObject, valueFromResultSet, valueFromRow, wrapKey, writeFromObjectIntoRow, writeFromObjectIntoRowForUpdate, writeFromObjectIntoRowWithChangeRecord, writeInsertFieldsIntoRow, writeUpdateFieldsIntoRow
-
Methods inherited from class org.eclipse.persistence.mappings.foundation.AbstractColumnMapping
clone, collectFields, fixObjectReferences, getConverter, getField, hasConverter, isAbstractColumnMapping, isInsertable, isUpdatable, iterate, setConverter, setConverterClassName, setField
-
Methods inherited from class org.eclipse.persistence.mappings.DatabaseMapping
addUnconvertedProperty, buildBackupCloneForPartObject, buildCloneForPartObject, buildContainerClone, buildObjectJoinExpression, buildObjectJoinExpression, calculateDeferredChanges, cascadeDiscoverAndPersistUnregisteredNewObjects, cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired, cloneFields, collectQueryParameters, convertConverterClassNamesToClasses, createCloneValueHolder, derivesId, earlyPreDelete, extractNestedExpressions, extractNestedNonAggregateExpressions, fixRealObjectReferences, getAttributeAccessor, getAttributeName, getAttributeValueFromObject, getContainerPolicy, getDerivedIdMapping, getDescriptor, getFields, getGetMethodName, getMapsIdValue, getObjectCorrespondingTo, getOrderByNormalizedExpressions, getProperties, getProperty, getRealAttributeValueFromAttribute, getRealAttributeValueFromObject, getRealCollectionAttributeValueFromObject, getRelationshipPartner, getSelectFields, getSelectTables, getSetMethodName, getUnconvertedProperties, getValueFromRemoteValueHolder, hasConstraintDependency, hasDependency, hasInverseConstraintDependency, hasMapsIdValue, hasNestedIdentityReference, hasRootExpressionThatShouldUseOuterJoin, hasUnconvertedProperties, instantiateAttribute, isAbstractCompositeCollectionMapping, isAbstractCompositeDirectCollectionMapping, isAbstractCompositeObjectMapping, isAggregateCollectionMapping, isAggregateMapping, isAggregateObjectMapping, isAttributeValueFromObjectInstantiated, isCacheable, isCandidateForPrivateOwnedRemoval, isCascadedLockingSupported, isCollectionMapping, isDatabaseMapping, isDirectCollectionMapping, isDirectMapMapping, isEISMapping, isElementCollectionMapping, isForeignReferenceMapping, isInAndOutSopObject, isInOnlySopObject, isInSopObject, isJoiningSupported, isJPAId, isLazy, isLockableMapping, isManyToManyMapping, isManyToOneMapping, isMapKeyMapping, isMultitenantPrimaryKeyMapping, isNestedTableMapping, isObjectReferenceMapping, isOneToManyMapping, isOneToOneMapping, isOptional, isOutOnlySopObject, isOutSopObject, isOwned, isPrimaryKeyMapping, isPrivateOwned, isReadOnly, isReferenceMapping, isRemotelyInitialized, isStructureMapping, isTransformationMapping, isUnidirectionalOneToManyMapping, isUsingMethodAccess, isVariableOneToOneMapping, isWriteOnly, isXMLMapping, iterateOnRealAttributeValue, load, loadAll, performDataModificationEvent, postCalculateChanges, postCalculateChangesOnDeleted, postDelete, postInitialize, postInitializeSourceAndTargetExpressions, postInsert, postUpdate, preDelete, preInsert, prepareCascadeLockingPolicy, preUpdate, readFromResultSetIntoObject, readFromRowIntoObject, readOnly, readWrite, recordPrivateOwnedRemovals, rehashFieldDependancies, remotelyInitialized, replaceValueHoldersIn, setAttributeAccessor, setAttributeName, setAttributeValueInObject, setChangeListener, setDerivedIdMapping, setDerivesId, setDescriptor, setFields, setGetMethodName, setIsCacheable, setIsInAndOutSopObject, setIsInSopObject, setIsJPAId, setIsLazy, setIsMapKeyMapping, setIsOptional, setIsOutSopObject, setIsPrimaryKeyMapping, setIsReadOnly, setMapsIdValue, setProperties, setProperty, setRealAttributeValueInObject, setSetMethodName, setWeight, simpleAddToCollectionChangeRecord, simpleRemoveFromCollectionChangeRecord, updateCollectionChangeRecord, validateAfterInitialization, valueFromRow, verifyDelete, writeFromAttributeIntoRow, writeFromObjectIntoRowForShallowInsert, writeFromObjectIntoRowForShallowInsertWithChangeRecord, writeFromObjectIntoRowForUpdateAfterShallowInsert, writeFromObjectIntoRowForUpdateBeforeShallowDelete, writeFromObjectIntoRowForWhereClause
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.persistence.mappings.foundation.MapComponentMapping
clone
-
-
-
-
Method Detail
-
preInitialize
public void preInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorExceptionINTERNAL: Default to mutable if mapped as a DOM.- Overrides:
preInitializein classAbstractDirectMapping- Throws:
DescriptorException
-
initialize
public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorExceptionINTERNAL: The mapping is initialized with the given session. This mapping is fully initialized after this.- Overrides:
initializein classAbstractDirectMapping- Throws:
DescriptorException
-
setShouldReadWholeDocument
public void setShouldReadWholeDocument(boolean readWholeDocument)
PUBLIC:- Parameters:
readWholeDocument- - determines if the Oracle XDB DOM should be fully initialized on a read.
-
shouldReadWholeDocument
public boolean shouldReadWholeDocument()
PUBLIC:- Returns:
- boolean - returns true if currently initializing DOMs on reads.
-
getObjectValue
public java.lang.Object getObjectValue(java.lang.Object fieldValue, Session session) throws ConversionExceptionINTERNAL: Get the attribute value for the given field value. If we're mapping to a Document, we need to check if we should return the Oracle DOM or build a new one.- Overrides:
getObjectValuein classAbstractDirectMapping- Throws:
ConversionException
-
isDirectToXMLTypeMapping
public boolean isDirectToXMLTypeMapping()
Description copied from class:DatabaseMappingINTERNAL: Related mapping should implement this method to return true.- Overrides:
isDirectToXMLTypeMappingin classDatabaseMapping
-
buildCloneValue
protected java.lang.Object buildCloneValue(java.lang.Object attributeValue, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Clone the DOM Document if required.- Overrides:
buildCloneValuein classAbstractDirectMapping
-
compareObjectValues
protected boolean compareObjectValues(java.lang.Object firstValue, java.lang.Object secondValue, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Compare the attribute values. Compare Nodes if mapped as a DOM.- Overrides:
compareObjectValuesin classAbstractDirectMapping
-
-