EclipseLink 2.4.2, build 'v20130514-5956486' API Reference

org.eclipse.persistence.oxm.mappings
Class XMLAbstractAnyMapping

java.lang.Object
  extended by org.eclipse.persistence.mappings.DatabaseMapping
      extended by org.eclipse.persistence.oxm.mappings.XMLAbstractAnyMapping
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
XMLAnyCollectionMapping, XMLAnyObjectMapping

public abstract class XMLAbstractAnyMapping
extends DatabaseMapping

Purpose: An abstract superclass for XMLAnyObjectMapping and XMLAnyCollectionMapping. Maps an attribute of an object to an xs:any construct in the schema.

See Also:
XMLAnyObjectMapping, XMLAnyCollectionMapping, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.persistence.mappings.DatabaseMapping
DatabaseMapping.WriteType
 
Field Summary
 
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, unconvertedProperties, weight, WEIGHT_AGGREGATE, WEIGHT_DIRECT, WEIGHT_TO_ONE, WEIGHT_TRANSFORM
 
Constructor Summary
XMLAbstractAnyMapping()
           
 
Method Summary
protected  java.lang.Object buildObjectAndWrapInXMLRoot(ClassDescriptor referenceDescriptor, XMLConverter converter, ObjectBuildingQuery query, DOMRecord record, DOMRecord nestedRecord, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, org.eclipse.persistence.internal.sessions.AbstractSession session, org.w3c.dom.Node next, java.lang.Object container, org.eclipse.persistence.internal.queries.ContainerPolicy containerPolicy)
          Uses a given reference descriptor to build an object based on a given DOMRecord.
protected  java.lang.Object buildObjectForNonXMLRoot(ClassDescriptor referenceDescriptor, XMLConverter converter, ObjectBuildingQuery query, DOMRecord record, DOMRecord nestedRecord, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, org.eclipse.persistence.internal.sessions.AbstractSession session, org.w3c.dom.Node next, java.lang.Object container, org.eclipse.persistence.internal.queries.ContainerPolicy containerPolicy)
           
protected  java.lang.Object buildObjectNoReferenceDescriptor(DOMRecord record, XMLConverter converter, org.eclipse.persistence.internal.sessions.AbstractSession session, org.w3c.dom.Node next, java.lang.Object container, org.eclipse.persistence.internal.queries.ContainerPolicy cp)
          Convenience method that takes a given Node and applies namespace information, converts it if necessary, and adds the resulting object to the given ContainerPolicy if non-null.
protected  XMLRoot buildXMLRoot(org.w3c.dom.Node node, java.lang.Object object)
          Convenience method that builds an XMLRoot wrapping a given object.
protected  XMLRoot buildXMLRootForText(org.w3c.dom.Node node, javax.xml.namespace.QName schemaTypeQName, XMLConverter converter, org.eclipse.persistence.internal.sessions.AbstractSession session, DOMRecord record)
          Convenience method that takes a given node and checks the first child for TEXT_NODE.
protected  XMLDescriptor getDescriptor(XMLRecord xmlRecord, org.eclipse.persistence.internal.sessions.AbstractSession session, javax.xml.namespace.QName rootQName)
           
 UnmarshalKeepAsElementPolicy getKeepAsElementPolicy()
           
 boolean isWriteOnly()
          INTERNAL: Some mappings support no attribute (transformation and multitenant primary key).
 void preInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: Allow for initialization of properties and validation.
 void setAttributeValueInObject(java.lang.Object object, java.lang.Object value)
          INTERNAL: Set the value of the attribute mapped by this mapping.
 void setIsWriteOnly(boolean b)
           
 void setKeepAsElementPolicy(UnmarshalKeepAsElementPolicy keepAsElementPolicy)
           
 
Methods inherited from class org.eclipse.persistence.mappings.DatabaseMapping
addUnconvertedProperty, buildBackupClone, buildBackupCloneForPartObject, buildChangeRecord, buildClone, buildCloneForPartObject, buildCloneFromRow, buildContainerClone, buildCopy, buildExpression, buildObjectJoinExpression, buildObjectJoinExpression, buildShallowOriginalFromRow, calculateDeferredChanges, cascadeDiscoverAndPersistUnregisteredNewObjects, cascadePerformRemoveIfRequired, cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired, cascadeRegisterNewIfRequired, clone, cloneFields, collectFields, collectQueryParameters, compareForChange, compareObjects, convertClassNamesToClasses, createCloneValueHolder, derivesId, earlyPreDelete, extractNestedExpressions, fixObjectReferences, fixRealObjectReferences, getAttributeAccessor, getAttributeClassification, getAttributeName, getAttributeValueFromObject, getContainerPolicy, getDerivedIdMapping, getDescriptor, getField, getFieldClassification, getFields, getGetMethodName, getMapsIdValue, getObjectCorrespondingTo, getOrderByNormalizedExpressions, getProperties, getProperty, getRealAttributeValueFromAttribute, getRealAttributeValueFromObject, getRealCollectionAttributeValueFromObject, getReferenceDescriptor, getRelationshipPartner, getSelectFields, getSelectTables, getSetMethodName, getUnconvertedProperties, getValueFromRemoteValueHolder, getWeight, hasConstraintDependency, hasDependency, hasInverseConstraintDependency, hasMapsIdValue, hasRootExpressionThatShouldUseOuterJoin, hasUnconvertedProperties, initialize, instantiateAttribute, isAbstractColumnMapping, isAbstractCompositeCollectionMapping, isAbstractCompositeDirectCollectionMapping, isAbstractCompositeObjectMapping, isAbstractDirectMapping, isAggregateCollectionMapping, isAggregateMapping, isAggregateObjectMapping, isCacheable, isCandidateForPrivateOwnedRemoval, isCascadedLockingSupported, isChangeTrackingSupported, isCloningRequired, isCollectionMapping, isDatabaseMapping, isDirectCollectionMapping, isDirectMapMapping, isDirectToFieldMapping, isDirectToXMLTypeMapping, isEISMapping, isElementCollectionMapping, isForeignReferenceMapping, isJoiningSupported, isJPAId, isLazy, isLockableMapping, isManyToManyMapping, isManyToOneMapping, isMapKeyMapping, isMultitenantPrimaryKeyMapping, isNestedTableMapping, isObjectReferenceMapping, isOneToManyMapping, isOneToOneMapping, isOptional, isOwned, isPrimaryKeyMapping, isPrivateOwned, isReadOnly, isReferenceMapping, isRelationalMapping, isRemotelyInitialized, isStructureMapping, isTransformationMapping, isUnidirectionalOneToManyMapping, isUsingMethodAccess, isVariableOneToOneMapping, isXMLMapping, iterate, iterateOnRealAttributeValue, mergeChangesIntoObject, mergeIntoObject, performDataModificationEvent, postCalculateChanges, postCalculateChangesOnDeleted, postDelete, postInitialize, postInsert, postUpdate, preDelete, preInsert, prepareCascadeLockingPolicy, preUpdate, readFromResultSetIntoObject, readFromRowIntoObject, readOnly, readWrite, recordPrivateOwnedRemovals, rehashFieldDependancies, remoteInitialization, remotelyInitialized, replaceValueHoldersIn, setAttributeAccessor, setAttributeName, setChangeListener, setDerivedIdMapping, setDerivesId, setDescriptor, setFields, setGetMethodName, setIsCacheable, setIsJPAId, setIsLazy, setIsMapKeyMapping, setIsOptional, setIsPrimaryKeyMapping, setIsReadOnly, setMapsIdValue, setProperties, setProperty, setRealAttributeValueInObject, setSetMethodName, setWeight, simpleAddToCollectionChangeRecord, simpleRemoveFromCollectionChangeRecord, toString, updateChangeRecord, updateCollectionChangeRecord, validateAfterInitialization, validateBeforeInitialization, valueFromObject, valueFromResultSet, valueFromRow, valueFromRow, verifyDelete, writeFromAttributeIntoRow, writeFromObjectIntoRow, writeFromObjectIntoRowForShallowInsert, writeFromObjectIntoRowForShallowInsertWithChangeRecord, writeFromObjectIntoRowForUpdate, writeFromObjectIntoRowForUpdateAfterShallowInsert, writeFromObjectIntoRowForUpdateBeforeShallowDelete, writeFromObjectIntoRowForWhereClause, writeFromObjectIntoRowWithChangeRecord, writeInsertFieldsIntoRow, writeUpdateFieldsIntoRow
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XMLAbstractAnyMapping

public XMLAbstractAnyMapping()
Method Detail

getKeepAsElementPolicy

public UnmarshalKeepAsElementPolicy getKeepAsElementPolicy()

setKeepAsElementPolicy

public void setKeepAsElementPolicy(UnmarshalKeepAsElementPolicy keepAsElementPolicy)

getDescriptor

protected XMLDescriptor getDescriptor(XMLRecord xmlRecord,
                                      org.eclipse.persistence.internal.sessions.AbstractSession session,
                                      javax.xml.namespace.QName rootQName)
                               throws XMLMarshalException
Throws:
XMLMarshalException

buildObjectForNonXMLRoot

protected java.lang.Object buildObjectForNonXMLRoot(ClassDescriptor referenceDescriptor,
                                                    XMLConverter converter,
                                                    ObjectBuildingQuery query,
                                                    DOMRecord record,
                                                    DOMRecord nestedRecord,
                                                    org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
                                                    org.eclipse.persistence.internal.sessions.AbstractSession session,
                                                    org.w3c.dom.Node next,
                                                    java.lang.Object container,
                                                    org.eclipse.persistence.internal.queries.ContainerPolicy containerPolicy)

buildObjectAndWrapInXMLRoot

protected java.lang.Object buildObjectAndWrapInXMLRoot(ClassDescriptor referenceDescriptor,
                                                       XMLConverter converter,
                                                       ObjectBuildingQuery query,
                                                       DOMRecord record,
                                                       DOMRecord nestedRecord,
                                                       org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
                                                       org.eclipse.persistence.internal.sessions.AbstractSession session,
                                                       org.w3c.dom.Node next,
                                                       java.lang.Object container,
                                                       org.eclipse.persistence.internal.queries.ContainerPolicy containerPolicy)
Uses a given reference descriptor to build an object based on a given DOMRecord. If a converter is provided it is applied to the newly built object. The reference descriptor will wrap the object in an XMLRoot if required, and the object will be added to the given Container Policy if it is non-null.


buildObjectNoReferenceDescriptor

protected java.lang.Object buildObjectNoReferenceDescriptor(DOMRecord record,
                                                            XMLConverter converter,
                                                            org.eclipse.persistence.internal.sessions.AbstractSession session,
                                                            org.w3c.dom.Node next,
                                                            java.lang.Object container,
                                                            org.eclipse.persistence.internal.queries.ContainerPolicy cp)
Convenience method that takes a given Node and applies namespace information, converts it if necessary, and adds the resulting object to the given ContainerPolicy if non-null.


buildXMLRootForText

protected XMLRoot buildXMLRootForText(org.w3c.dom.Node node,
                                      javax.xml.namespace.QName schemaTypeQName,
                                      XMLConverter converter,
                                      org.eclipse.persistence.internal.sessions.AbstractSession session,
                                      DOMRecord record)
Convenience method that takes a given node and checks the first child for TEXT_NODE. If the first child is a text node containing a non-empty String, the String value will be processed and wrapped in an XMLRoot. If schemaTypeQName represents a default XML type (boolean, dateTime, etc) the String value will be converted to that type. If a converter is provided it will be applied before wrapping in an XMLRoot.


buildXMLRoot

protected XMLRoot buildXMLRoot(org.w3c.dom.Node node,
                               java.lang.Object object)
Convenience method that builds an XMLRoot wrapping a given object. The local name and uri are set using the given Node.


isWriteOnly

public boolean isWriteOnly()
Description copied from class: DatabaseMapping
INTERNAL: Some mappings support no attribute (transformation and multitenant primary key).

Overrides:
isWriteOnly in class DatabaseMapping

setIsWriteOnly

public void setIsWriteOnly(boolean b)

setAttributeValueInObject

public void setAttributeValueInObject(java.lang.Object object,
                                      java.lang.Object value)
                               throws DescriptorException
Description copied from class: DatabaseMapping
INTERNAL: Set the value of the attribute mapped by this mapping.

Overrides:
setAttributeValueInObject in class DatabaseMapping
Throws:
DescriptorException

preInitialize

public void preInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
                   throws DescriptorException
Description copied from class: DatabaseMapping
INTERNAL: Allow for initialization of properties and validation.

Overrides:
preInitialize in class DatabaseMapping
Throws:
DescriptorException

EclipseLink 2.4.2, build 'v20130514-5956486' API Reference