public class XMLChoiceCollectionMapping extends DatabaseMapping implements org.eclipse.persistence.internal.oxm.mappings.ChoiceCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLField,XMLMapping,XMLRecord>, XMLMapping
Purpose:Provide a mapping that can map a single attribute to a number of different elements in an XML Document. This will be used to map to Choices or Substitution Groups in an XML Schema
Responsibilities:
The XMLChoiceCollectionMapping is the collection version of the XMLChoiceMapping. This mapping allows the user to specify a number of different xpaths, and types associated with those xpaths. When any of these elements are encountered in the XML Document, they are read in as the correct type and added to the collection.
Setting up XPath mappings:Unlike other OXM Mappings, instead of setting a single xpath,
the addChoiceElement method is used to specify an xpath and the type associated with this xpath.
xmlChoiceCollectionMapping.addChoiceElement("mystring/text()", String.class);
xmlChoiceCollectionMapping.addChoiceElement("myaddress", Address.class);
DatabaseMapping.WriteTypeattributeAccessor, 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 and Description |
|---|
XMLChoiceCollectionMapping() |
| Modifier and Type | Method and Description |
|---|---|
void |
addChoiceElement(java.util.List<XMLField> srcFields,
java.lang.Class elementType,
java.util.List<XMLField> tgtFields) |
void |
addChoiceElement(java.util.List<XMLField> srcFields,
java.lang.String elementTypeName,
java.util.List<XMLField> tgtFields) |
void |
addChoiceElement(java.lang.String xpath,
java.lang.Class elementType) |
void |
addChoiceElement(java.lang.String srcXPath,
java.lang.Class elementType,
java.lang.String tgtXPath) |
void |
addChoiceElement(java.lang.String xpath,
java.lang.String elementTypeName) |
void |
addChoiceElement(java.lang.String srcXpath,
java.lang.String elementTypeName,
java.lang.String tgtXpath) |
void |
addChoiceElement(XMLField xmlField,
java.lang.Class elementType) |
void |
addChoiceElement(XMLField sourceField,
java.lang.Class elementType,
XMLField targetField) |
void |
addChoiceElement(XMLField field,
java.lang.String elementTypeName) |
void |
addConverter(XMLField field,
Converter converter) |
void |
buildBackupClone(java.lang.Object clone,
java.lang.Object backup,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork)
INTERNAL:
Clone the attribute from the clone and assign it to the backup.
|
void |
buildClone(java.lang.Object original,
org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey,
java.lang.Object clone,
java.lang.Integer refreshCascade,
org.eclipse.persistence.internal.sessions.AbstractSession cloningSession)
INTERNAL:
Clone the attribute from the original and assign it to the clone.
|
void |
buildCloneFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow,
org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
java.lang.Object clone,
org.eclipse.persistence.internal.identitymaps.CacheKey sharedCacheKey,
ObjectBuildingQuery sourceQuery,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork,
org.eclipse.persistence.internal.sessions.AbstractSession executionSession)
INTERNAL:
A combination of readFromRowIntoObject and buildClone.
|
void |
cascadePerformRemoveIfRequired(java.lang.Object object,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
java.util.Map visitedObjects)
INTERNAL:
Cascade perform delete through mappings that require the cascade
|
void |
cascadeRegisterNewIfRequired(java.lang.Object object,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
java.util.Map visitedObjects)
INTERNAL:
Cascade registerNew for Create through mappings that require the cascade
|
protected java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField> |
collectFields()
This method must be overwritten in the subclasses to return a vector of all the
fields this mapping represents.
|
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:
This method was created in VisualAge.
|
boolean |
compareObjects(java.lang.Object firstObject,
java.lang.Object secondObject,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Compare the attributes belonging to this mapping for the objects.
|
void |
convertClassNamesToClasses(java.lang.ClassLoader classLoader)
INTERNAL:
Convert all the class-name-based settings in this mapping to actual class-based
settings
This method is implemented by subclasses as necessary.
|
java.lang.Object |
convertDataValueToObjectValue(java.lang.Object fieldValue,
Session session,
XMLUnmarshaller unmarshaller)
INTERNAL
|
java.lang.Object |
convertObjectValueToDataValue(java.lang.Object value,
Session session,
XMLMarshaller marshaller)
INTERNAL
|
void |
fixObjectReferences(java.lang.Object object,
java.util.Map objectDescriptors,
java.util.Map processedObjects,
ObjectLevelReadQuery query,
DistributedSession session)
INTERNAL:
An object has been serialized from the server to the client.
|
XMLAnyCollectionMapping |
getAnyMapping() |
java.util.Map<XMLField,XMLMapping> |
getChoiceElementMappings() |
java.util.Map<java.lang.Class,XMLMapping> |
getChoiceElementMappingsByClass() |
java.util.ArrayList |
getChoiceFieldToClassAssociations() |
java.util.Map<java.lang.String,XMLField> |
getClassNameToFieldMappings() |
java.util.Map<java.lang.Class,XMLField> |
getClassToFieldMappings() |
java.util.Map<java.lang.Class,java.util.List<XMLField>> |
getClassToSourceFieldsMappings() |
org.eclipse.persistence.internal.queries.ContainerPolicy |
getContainerPolicy()
INTERNAL:
Return the mapping's containerPolicy.
|
Converter |
getConverter()
Return the converter on the mapping.
|
Converter |
getConverter(XMLField field) |
java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField> |
getFields()
INTERNAL:
Returns a vector of all the fields this mapping represents.
|
java.util.Map<XMLField,java.lang.Class> |
getFieldToClassMappings() |
XMLCompositeDirectCollectionMapping |
getMixedContentMapping() |
boolean |
getReuseContainer()
Return true if the original container on the object should be used if
present.
|
AbstractNullPolicy |
getWrapperNullPolicy() |
void |
initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Allow for initialization of properties and validation.
|
boolean |
isAny() |
boolean |
isDefaultEmptyContainer()
INTERNAL
Return true if an empty container should be set on the object if there
is no presence of the collection in the XML document.
|
boolean |
isMixedContent() |
boolean |
isWriteOnly()
INTERNAL:
Some mappings support no attribute (transformation and multitenant primary key).
|
boolean |
isXMLMapping()
INTERNAL:
All relational mappings should implement this method to return true.
|
void |
iterate(org.eclipse.persistence.internal.descriptors.DescriptorIterator iterator)
INTERNAL:
Iterate on the appropriate attribute value.
|
void |
mergeChangesIntoObject(java.lang.Object target,
org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord,
java.lang.Object source,
org.eclipse.persistence.internal.sessions.MergeManager mergeManager,
org.eclipse.persistence.internal.sessions.AbstractSession targetSession)
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,
org.eclipse.persistence.internal.sessions.AbstractSession targetSession)
INTERNAL:
Merge changes from the source to the target object.
|
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 |
setChoiceElementMappingsByClass(java.util.Map<java.lang.Class,XMLMapping> choiceElementMappingsByClass) |
void |
setChoiceFieldToClassAssociations(java.util.ArrayList associations) |
void |
setContainerPolicy(org.eclipse.persistence.internal.queries.ContainerPolicy cp) |
void |
setConverter(Converter converter)
Set the converter on the mapping.
|
void |
setDefaultEmptyContainer(boolean defaultEmptyContainer)
INTERNAL
Indicate whether by default an empty container should be set on the
field/property if the collection is not present in the XML document.
|
void |
setIsAny(boolean b) |
void |
setIsWriteOnly(boolean b) |
void |
setMixedContent(boolean mixed)
PUBLIC:
Allows the user to indicate that this mapping should also allow for mixed content in addition to
any of the elements in the choice.
|
void |
setMixedContent(java.lang.String groupingElement)
PUBLIC:
Allows the user to indicate that this mapping should also allow for mixed content in addition to
any of the elements in the choice.
|
void |
setReuseContainer(boolean reuseContainer)
Specify whether the original container on the object should be used if
present.
|
void |
setWrapperNullPolicy(AbstractNullPolicy policy) |
void |
useCollectionClass(java.lang.Class concreteContainerClass) |
void |
useCollectionClassName(java.lang.String concreteContainerClassName) |
java.lang.Object |
valueFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row,
org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
ObjectBuildingQuery sourceQuery,
org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey,
org.eclipse.persistence.internal.sessions.AbstractSession executionSession,
boolean isTargetProtected,
java.lang.Boolean[] wasCacheUsed)
INTERNAL:
A subclass should implement this method if it wants different behavior.
|
void |
writeFromObjectIntoRow(java.lang.Object object,
org.eclipse.persistence.internal.sessions.AbstractRecord row,
org.eclipse.persistence.internal.sessions.AbstractSession session,
DatabaseMapping.WriteType writeType)
INTERNAL:
A subclass should implement this method if it wants different behavior.
|
void |
writeSingleValue(java.lang.Object value,
java.lang.Object parent,
XMLRecord row,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
A method that marshals a single value to the provided Record based on this mapping's
XPath.
|
addUnconvertedProperty, buildBackupCloneForPartObject, buildChangeRecord, buildCloneForPartObject, buildContainerClone, buildCopy, buildExpression, buildObjectJoinExpression, buildObjectJoinExpression, buildShallowOriginalFromRow, calculateDeferredChanges, cascadeDiscoverAndPersistUnregisteredNewObjects, cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired, clone, cloneFields, collectQueryParameters, convertConverterClassNamesToClasses, createCloneValueHolder, derivesId, earlyPreDelete, extractNestedExpressions, fixRealObjectReferences, getAttributeAccessor, getAttributeClassification, getAttributeName, getAttributeValueFromObject, getDerivedIdMapping, getDescriptor, getField, getFieldClassification, getGetMethodName, getMapsIdValue, getObjectCorrespondingTo, getOrderByNormalizedExpressions, getProperties, getProperty, getRealAttributeValueFromAttribute, getRealAttributeValueFromObject, getRealCollectionAttributeValueFromObject, getReferenceDescriptor, getRelationshipPartner, getSelectFields, getSelectTables, getSetMethodName, getUnconvertedProperties, getValueFromRemoteValueHolder, getWeight, hasConstraintDependency, hasDependency, hasInverseConstraintDependency, hasMapsIdValue, hasNestedIdentityReference, hasRootExpressionThatShouldUseOuterJoin, hasUnconvertedProperties, instantiateAttribute, isAbstractColumnMapping, isAbstractCompositeCollectionMapping, isAbstractCompositeDirectCollectionMapping, isAbstractCompositeObjectMapping, isAbstractDirectMapping, isAggregateCollectionMapping, isAggregateMapping, isAggregateObjectMapping, isAttributeValueFromObjectInstantiated, isCacheable, isCandidateForPrivateOwnedRemoval, isCascadedLockingSupported, isChangeTrackingSupported, isCloningRequired, isCollectionMapping, isDatabaseMapping, isDirectCollectionMapping, isDirectMapMapping, isDirectToFieldMapping, isDirectToXMLTypeMapping, 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, isRelationalMapping, isRemotelyInitialized, isStructureMapping, isTransformationMapping, isUnidirectionalOneToManyMapping, isUsingMethodAccess, isVariableOneToOneMapping, iterateOnRealAttributeValue, load, loadAll, 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, setIsInAndOutSopObject, setIsInSopObject, setIsJPAId, setIsLazy, setIsMapKeyMapping, setIsOptional, setIsOutSopObject, setIsPrimaryKeyMapping, setIsReadOnly, setMapsIdValue, setProperties, setProperty, setRealAttributeValueInObject, setSetMethodName, setWeight, simpleAddToCollectionChangeRecord, simpleRemoveFromCollectionChangeRecord, toString, updateChangeRecord, updateCollectionChangeRecord, validateAfterInitialization, validateBeforeInitialization, valueFromObject, valueFromResultSet, valueFromRow, verifyDelete, writeFromAttributeIntoRow, writeFromObjectIntoRowForShallowInsert, writeFromObjectIntoRowForShallowInsertWithChangeRecord, writeFromObjectIntoRowForUpdate, writeFromObjectIntoRowForUpdateAfterShallowInsert, writeFromObjectIntoRowForUpdateBeforeShallowDelete, writeFromObjectIntoRowForWhereClause, writeFromObjectIntoRowWithChangeRecord, writeInsertFieldsIntoRow, writeUpdateFieldsIntoRowequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAttributeAccessor, getAttributeClassification, getAttributeName, getAttributeValueFromObject, getDescriptor, getField, getReferenceDescriptor, isAbstractCompositeCollectionMapping, isAbstractCompositeDirectCollectionMapping, isAbstractCompositeObjectMapping, isAbstractDirectMapping, isCollectionMapping, isReadOnly, isReferenceMapping, isTransformationMapping, setAttributeAccessor, setAttributeName, setGetMethodName, setIsReadOnly, setProperties, setSetMethodNamepublic Converter getConverter()
getConverter in interface org.eclipse.persistence.internal.oxm.mappings.ChoiceCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLField,XMLMapping,XMLRecord>public void setConverter(Converter converter)
setConverter in interface org.eclipse.persistence.internal.oxm.mappings.ChoiceCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLField,XMLMapping,XMLRecord>public void buildBackupClone(java.lang.Object clone,
java.lang.Object backup,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork)
buildBackupClone in class DatabaseMappingpublic void buildClone(java.lang.Object original,
org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey,
java.lang.Object clone,
java.lang.Integer refreshCascade,
org.eclipse.persistence.internal.sessions.AbstractSession cloningSession)
buildClone in class DatabaseMappingpublic void buildCloneFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow,
org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
java.lang.Object clone,
org.eclipse.persistence.internal.identitymaps.CacheKey sharedCacheKey,
ObjectBuildingQuery sourceQuery,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork,
org.eclipse.persistence.internal.sessions.AbstractSession executionSession)
DatabaseMappingbuildClone assumes the attribute value exists on the original and can simply be copied.
readFromRowIntoObject assumes that one is building an original.
Both of the above assumptions are false in this method, and actually attempts to do both at the same time.
Extract value from the row and set the attribute to this value in the working copy clone. In order to bypass the shared cache when in transaction a UnitOfWork must be able to populate working copies directly from the row.
buildCloneFromRow in class DatabaseMappingpublic void cascadePerformRemoveIfRequired(java.lang.Object object,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
java.util.Map visitedObjects)
cascadePerformRemoveIfRequired in class DatabaseMappingpublic void cascadeRegisterNewIfRequired(java.lang.Object object,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
java.util.Map visitedObjects)
cascadeRegisterNewIfRequired in class DatabaseMappingpublic 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)
compareForChange in class DatabaseMappingpublic boolean compareObjects(java.lang.Object firstObject,
java.lang.Object secondObject,
org.eclipse.persistence.internal.sessions.AbstractSession session)
compareObjects in class DatabaseMappingpublic void fixObjectReferences(java.lang.Object object,
java.util.Map objectDescriptors,
java.util.Map processedObjects,
ObjectLevelReadQuery query,
DistributedSession session)
fixObjectReferences in class DatabaseMappingpublic void iterate(org.eclipse.persistence.internal.descriptors.DescriptorIterator iterator)
iterate in class DatabaseMappingpublic void mergeChangesIntoObject(java.lang.Object target,
org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord,
java.lang.Object source,
org.eclipse.persistence.internal.sessions.MergeManager mergeManager,
org.eclipse.persistence.internal.sessions.AbstractSession targetSession)
mergeChangesIntoObject in class DatabaseMappingpublic void mergeIntoObject(java.lang.Object target,
boolean isTargetUninitialized,
java.lang.Object source,
org.eclipse.persistence.internal.sessions.MergeManager mergeManager,
org.eclipse.persistence.internal.sessions.AbstractSession targetSession)
mergeIntoObject in class DatabaseMappingpublic java.lang.Object valueFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row,
org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
ObjectBuildingQuery sourceQuery,
org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey,
org.eclipse.persistence.internal.sessions.AbstractSession executionSession,
boolean isTargetProtected,
java.lang.Boolean[] wasCacheUsed)
throws DatabaseException
DatabaseMappingvalueFromRow in class DatabaseMappingDatabaseExceptionpublic void writeFromObjectIntoRow(java.lang.Object object,
org.eclipse.persistence.internal.sessions.AbstractRecord row,
org.eclipse.persistence.internal.sessions.AbstractSession session,
DatabaseMapping.WriteType writeType)
throws DescriptorException
DatabaseMappingwriteFromObjectIntoRow in class DatabaseMappingDescriptorExceptionpublic void writeSingleValue(java.lang.Object value,
java.lang.Object parent,
XMLRecord row,
org.eclipse.persistence.internal.sessions.AbstractSession session)
XMLMappingwriteSingleValue in interface org.eclipse.persistence.internal.oxm.mappings.Mapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLRecord>writeSingleValue in interface XMLMappingvalue - - The value to be marshalledrow - - The Record the value is being marshalled too.public boolean isXMLMapping()
DatabaseMappingisXMLMapping in class DatabaseMappingpublic java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField> getFields()
DatabaseMappinggetFields in class DatabaseMappingprotected java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField> collectFields()
DatabaseMappingcollectFields in class DatabaseMappingpublic void addChoiceElement(java.lang.String xpath,
java.lang.Class elementType)
public void addChoiceElement(java.lang.String xpath,
java.lang.String elementTypeName)
addChoiceElement in interface org.eclipse.persistence.internal.oxm.mappings.ChoiceCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLField,XMLMapping,XMLRecord>public void addChoiceElement(XMLField xmlField, java.lang.Class elementType)
public void addChoiceElement(java.util.List<XMLField> srcFields, java.lang.Class elementType, java.util.List<XMLField> tgtFields)
public void addChoiceElement(java.util.List<XMLField> srcFields, java.lang.String elementTypeName, java.util.List<XMLField> tgtFields)
addChoiceElement in interface org.eclipse.persistence.internal.oxm.mappings.ChoiceCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLField,XMLMapping,XMLRecord>public void addChoiceElement(java.lang.String srcXPath,
java.lang.Class elementType,
java.lang.String tgtXPath)
public void addChoiceElement(java.lang.String srcXpath,
java.lang.String elementTypeName,
java.lang.String tgtXpath)
addChoiceElement in interface org.eclipse.persistence.internal.oxm.mappings.ChoiceCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLField,XMLMapping,XMLRecord>public void addChoiceElement(XMLField sourceField, java.lang.Class elementType, XMLField targetField)
public void addChoiceElement(XMLField field, java.lang.String elementTypeName)
addChoiceElement in interface org.eclipse.persistence.internal.oxm.mappings.ChoiceCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLField,XMLMapping,XMLRecord>public java.util.Map<XMLField,java.lang.Class> getFieldToClassMappings()
getFieldToClassMappings in interface org.eclipse.persistence.internal.oxm.mappings.ChoiceCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLField,XMLMapping,XMLRecord>public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
throws DescriptorException
DatabaseMappinginitialize in class DatabaseMappingDescriptorExceptionpublic java.util.Map<java.lang.Class,XMLField> getClassToFieldMappings()
getClassToFieldMappings in interface org.eclipse.persistence.internal.oxm.mappings.ChoiceCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLField,XMLMapping,XMLRecord>public java.util.Map<XMLField,XMLMapping> getChoiceElementMappings()
getChoiceElementMappings in interface org.eclipse.persistence.internal.oxm.mappings.ChoiceCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLField,XMLMapping,XMLRecord>public org.eclipse.persistence.internal.queries.ContainerPolicy getContainerPolicy()
DatabaseMappinggetContainerPolicy in interface org.eclipse.persistence.internal.oxm.mappings.Mapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLRecord>getContainerPolicy in class DatabaseMappingpublic void setContainerPolicy(org.eclipse.persistence.internal.queries.ContainerPolicy cp)
public void useCollectionClass(java.lang.Class concreteContainerClass)
public void useCollectionClassName(java.lang.String concreteContainerClassName)
useCollectionClassName in interface org.eclipse.persistence.internal.oxm.mappings.ChoiceCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLField,XMLMapping,XMLRecord>public void convertClassNamesToClasses(java.lang.ClassLoader classLoader)
DatabaseMappingconvertClassNamesToClasses in interface org.eclipse.persistence.internal.oxm.mappings.Mapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLRecord>convertClassNamesToClasses in interface XMLMappingconvertClassNamesToClasses in class DatabaseMappingpublic void addConverter(XMLField field, Converter converter)
addConverter in interface org.eclipse.persistence.internal.oxm.mappings.ChoiceCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLField,XMLMapping,XMLRecord>public Converter getConverter(XMLField field)
getConverter in interface org.eclipse.persistence.internal.oxm.mappings.ChoiceCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLField,XMLMapping,XMLRecord>public java.util.ArrayList getChoiceFieldToClassAssociations()
getChoiceFieldToClassAssociations in interface org.eclipse.persistence.internal.oxm.mappings.ChoiceCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLField,XMLMapping,XMLRecord>public void setChoiceFieldToClassAssociations(java.util.ArrayList associations)
public boolean isWriteOnly()
DatabaseMappingisWriteOnly in interface XMLMappingisWriteOnly in class DatabaseMappingpublic void setIsWriteOnly(boolean b)
setIsWriteOnly in interface org.eclipse.persistence.internal.oxm.mappings.ChoiceCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLField,XMLMapping,XMLRecord>setIsWriteOnly in interface XMLMappingpublic boolean isAny()
isAny in interface org.eclipse.persistence.internal.oxm.mappings.ChoiceCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLField,XMLMapping,XMLRecord>public void setIsAny(boolean b)
public void preInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
throws DescriptorException
DatabaseMappingpreInitialize in class DatabaseMappingDescriptorExceptionpublic void setAttributeValueInObject(java.lang.Object object,
java.lang.Object value)
throws DescriptorException
DatabaseMappingsetAttributeValueInObject in interface org.eclipse.persistence.internal.oxm.mappings.Mapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLRecord>setAttributeValueInObject in class DatabaseMappingDescriptorExceptionpublic boolean getReuseContainer()
getReuseContainer in interface org.eclipse.persistence.internal.oxm.mappings.XMLContainerMappingpublic void setReuseContainer(boolean reuseContainer)
setReuseContainer in interface org.eclipse.persistence.internal.oxm.mappings.XMLContainerMappingpublic java.util.Map<java.lang.Class,java.util.List<XMLField>> getClassToSourceFieldsMappings()
getClassToSourceFieldsMappings in interface org.eclipse.persistence.internal.oxm.mappings.ChoiceCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLField,XMLMapping,XMLRecord>public java.util.Map<java.lang.String,XMLField> getClassNameToFieldMappings()
getClassNameToFieldMappings in interface org.eclipse.persistence.internal.oxm.mappings.ChoiceCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLField,XMLMapping,XMLRecord>public boolean isMixedContent()
isMixedContent in interface org.eclipse.persistence.internal.oxm.mappings.ChoiceCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLField,XMLMapping,XMLRecord>public void setMixedContent(java.lang.String groupingElement)
setMixedContent in interface org.eclipse.persistence.internal.oxm.mappings.ChoiceCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLField,XMLMapping,XMLRecord>public void setMixedContent(boolean mixed)
setMixedContent in interface org.eclipse.persistence.internal.oxm.mappings.ChoiceCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLField,XMLMapping,XMLRecord>public XMLCompositeDirectCollectionMapping getMixedContentMapping()
getMixedContentMapping in interface org.eclipse.persistence.internal.oxm.mappings.ChoiceCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLField,XMLMapping,XMLRecord>public XMLAnyCollectionMapping getAnyMapping()
getAnyMapping in interface org.eclipse.persistence.internal.oxm.mappings.ChoiceCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLField,XMLMapping,XMLRecord>public boolean isDefaultEmptyContainer()
isDefaultEmptyContainer in interface org.eclipse.persistence.internal.oxm.mappings.XMLContainerMappingpublic void setDefaultEmptyContainer(boolean defaultEmptyContainer)
setDefaultEmptyContainer in interface org.eclipse.persistence.internal.oxm.mappings.XMLContainerMappingpublic AbstractNullPolicy getWrapperNullPolicy()
getWrapperNullPolicy in interface org.eclipse.persistence.internal.oxm.mappings.XMLContainerMappingpublic void setWrapperNullPolicy(AbstractNullPolicy policy)
setWrapperNullPolicy in interface org.eclipse.persistence.internal.oxm.mappings.XMLContainerMappingpublic java.util.Map<java.lang.Class,XMLMapping> getChoiceElementMappingsByClass()
getChoiceElementMappingsByClass in interface org.eclipse.persistence.internal.oxm.mappings.ChoiceCollectionMapping<org.eclipse.persistence.internal.sessions.AbstractSession,AttributeAccessor,org.eclipse.persistence.internal.queries.ContainerPolicy,Converter,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField,XMLMarshaller,Session,XMLUnmarshaller,XMLField,XMLMapping,XMLRecord>public void setChoiceElementMappingsByClass(java.util.Map<java.lang.Class,XMLMapping> choiceElementMappingsByClass)
public java.lang.Object convertObjectValueToDataValue(java.lang.Object value,
Session session,
XMLMarshaller marshaller)
convertObjectValueToDataValue in interface org.eclipse.persistence.internal.oxm.mappings.XMLConverterMapping<XMLMarshaller,Session,XMLUnmarshaller>public java.lang.Object convertDataValueToObjectValue(java.lang.Object fieldValue,
Session session,
XMLUnmarshaller unmarshaller)
convertDataValueToObjectValue in interface org.eclipse.persistence.internal.oxm.mappings.XMLConverterMapping<XMLMarshaller,Session,XMLUnmarshaller>