Skip navigation links
org.eclipse.persistence.mappings.xdb
Class DirectToXMLTypeMapping
java.lang.Object
org.eclipse.persistence.mappings.DatabaseMapping
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.
- Since:
- Toplink 10.1.3
- See Also:
- Serialized Form
Fields inherited from class org.eclipse.persistence.mappings.foundation.AbstractDirectMapping |
attributeClassification, attributeClassificationName, attributeObjectClassification, converter, converterClassName, field, fieldClassificationClassName, isInsertable, isMutable, isUpdatable, keyTableForMapKey, nullValue |
Fields inherited from class org.eclipse.persistence.mappings.DatabaseMapping |
attributeAccessor, attributeName, derivedIdMapping, derivesId, descriptor, fields, isCacheable, isJPAId, isLazy, isMapKeyMapping, isOptional, isPrimaryKeyMapping, isReadOnly, isRemotelyInitialized, mapsIdValue, NO_FIELDS, NO_WEIGHT, properties, weight, WEIGHT_AGGREGATE, WEIGHT_DIRECT, WEIGHT_TO_ONE, WEIGHT_TRANSFORM |
Method Summary |
protected java.lang.Object |
buildCloneValue(java.lang.Object attributeValue, org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Clone the DOM Document if required. |
protected boolean |
compareObjectValues(java.lang.Object firstValue, java.lang.Object secondValue, org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Compare the attribute values. |
java.lang.Object |
getAttributeValue(java.lang.Object fieldValue, Session session)
INTERNAL: Get the attribute value for the given field value. |
void |
initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: The mapping is initialized with the given session. |
boolean |
isDirectToXMLTypeMapping()
INTERNAL: Related mapping should implement this method to return true. |
void |
preInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Default to mutable if mapped as a DOM. |
void |
setShouldReadWholeDocument(boolean readWholeDocument)
PUBLIC: |
boolean |
shouldReadWholeDocument()
PUBLIC: |
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, clone, collectFields, compareForChange, compareObjects, convertClassNamesToClasses, createMapComponentFromJoinedRow, createMapComponentFromRow, createMapComponentsFromSerializableKeyInfo, createQueryKeyForMapKey, createSerializableMapKeyInfo, createStubbedMapComponentFromSerializableKeyInfo, deleteMapKey, extractIdentityFieldsForQuery, fixObjectReferences, getAdditionalSelectionCriteriaForMapKey, getAdditionalTablesForJoinQuery, getAllFieldsForMapKey, getAttributeClassification, getAttributeClassificationName, getConverter, getField, getFieldClassification, getFieldClassification, getFieldName, getFieldValue, getForeignKeyFieldsForMapKey, getIdentityFieldsForMapKey, getMapKeyTargetType, getNestedJoinQuery, getNullValue, getReferenceDescriptor, getTargetVersionOfSourceObject, getWeight, hasConverter, internalBuildChangeRecord, isAbstractDirectMapping, isChangeTrackingSupported, isCloningRequired, isDirectToFieldMapping, isMutable, iterate, iterateOnMapKey, mergeChangesIntoObject, mergeIntoObject, postInitializeMapKey, preinitializeMapKey, remoteInitialization, requiresDataModificationEventsForMapKey, setAttributeClassification, setAttributeClassificationName, setConverter, setConverterClassName, setField, 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.DatabaseMapping |
buildBackupCloneForPartObject, buildCloneForPartObject, buildContainerClone, buildObjectJoinExpression, buildObjectJoinExpression, calculateDeferredChanges, cascadeDiscoverAndPersistUnregisteredNewObjects, cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired, cloneFields, collectQueryParameters, createCloneValueHolder, derivesId, earlyPreDelete, extractNestedExpressions, fixRealObjectReferences, getAttributeAccessor, getAttributeName, getAttributeValueFromObject, getContainerPolicy, getDerivedIdMapping, getDescriptor, getFields, getGetMethodName, getMapsIdValue, getObjectCorrespondingTo, getProperties, getProperty, getRealAttributeValueFromAttribute, getRealAttributeValueFromObject, getRealCollectionAttributeValueFromObject, getRelationshipPartner, getSelectFields, getSelectTables, getSetMethodName, getValueFromRemoteValueHolder, hasConstraintDependency, hasDependency, hasInverseConstraintDependency, hasMapsIdValue, hasRootExpressionThatShouldUseOuterJoin, instantiateAttribute, isAbstractCompositeCollectionMapping, isAbstractCompositeDirectCollectionMapping, isAbstractCompositeObjectMapping, isAggregateCollectionMapping, isAggregateMapping, isAggregateObjectMapping, isCacheable, isCandidateForPrivateOwnedRemoval, isCascadedLockingSupported, isCollectionMapping, isDatabaseMapping, isDirectCollectionMapping, isDirectMapMapping, isEISMapping, isElementCollectionMapping, isForeignReferenceMapping, isJoiningSupported, isJPAId, isLazy, isLockableMapping, isManyToManyMapping, isManyToOneMapping, isMapKeyMapping, isNestedTableMapping, isObjectReferenceMapping, isOneToManyMapping, isOneToOneMapping, isOptional, isOwned, isPrimaryKeyMapping, isPrivateOwned, isReadOnly, isReferenceMapping, isRemotelyInitialized, isStructureMapping, isTransformationMapping, isUnidirectionalOneToManyMapping, isUsingMethodAccess, isVariableOneToOneMapping, isWriteOnly, isXMLMapping, iterateOnRealAttributeValue, performDataModificationEvent, postCalculateChanges, postCalculateChangesOnDeleted, postDelete, postInitialize, postInsert, postUpdate, preDelete, preInsert, prepareCascadeLockingPolicy, preUpdate, readFromResultSetIntoObject, readFromRowIntoObject, readOnly, readWrite, recordPrivateOwnedRemovals, rehashFieldDependancies, remotelyInitialized, replaceValueHoldersIn, setAttributeAccessor, setAttributeName, setAttributeValueInObject, setChangeListener, setDerivedIdMapping, setDerivesId, setDescriptor, setFields, setGetMethodName, setIsCacheable, setIsJPAId, setIsLazy, setIsMapKeyMapping, setIsOptional, setIsPrimaryKeyMapping, setIsReadOnly, setMapsIdValue, setProperties, setProperty, setRealAttributeValueInObject, setSetMethodName, setWeight, simpleAddToCollectionChangeRecord, simpleRemoveFromCollectionChangeRecord, updateCollectionChangeRecord, validateAfterInitialization, valueFromRow, verifyDelete, writeFromAttributeIntoRow, writeFromObjectIntoRowForShallowInsert, writeFromObjectIntoRowForShallowInsertWithChangeRecord, writeFromObjectIntoRowForWhereClause |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
shouldReadWholeDocument
protected boolean shouldReadWholeDocument
- Indicates if we should initialize the whole DOM on a read. This is only used if the user is mapping from an Oracle Document implementation.
xmlTransformer
private XMLTransformer xmlTransformer
- Used to convert the DOM to a String.
xmlComparer
private XMLComparer xmlComparer
- Used to determine if the XML document has been modified.
xmlParser
private XMLParser xmlParser
- Used to convert the String to a DOM
DirectToXMLTypeMapping
public DirectToXMLTypeMapping()
preInitialize
public void preInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
throws DescriptorException
- INTERNAL: Default to mutable if mapped as a DOM.
-
- Overrides:
preInitialize
in class AbstractDirectMapping
-
- Throws:
DescriptorException
initialize
public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
throws DescriptorException
- INTERNAL: The mapping is initialized with the given session. This mapping is fully initialized after this.
-
- Overrides:
initialize
in class AbstractDirectMapping
-
- Throws:
DescriptorException
setShouldReadWholeDocument
public void setShouldReadWholeDocument(boolean readWholeDocument)
- PUBLIC:
-
- Parameters:
boolean
- - 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.
getAttributeValue
public java.lang.Object getAttributeValue(java.lang.Object fieldValue,
Session session)
throws ConversionException
- INTERNAL: 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:
getAttributeValue
in class AbstractDirectMapping
-
- Throws:
ConversionException
isDirectToXMLTypeMapping
public boolean isDirectToXMLTypeMapping()
- Description copied from class:
DatabaseMapping
- INTERNAL: Related mapping should implement this method to return true.
-
- Overrides:
isDirectToXMLTypeMapping
in class DatabaseMapping
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:
buildCloneValue
in class AbstractDirectMapping
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:
compareObjectValues
in class AbstractDirectMapping
Skip navigation links