Class XMLChoiceCollectionMapping
- All Implemented Interfaces:
Serializable,Cloneable,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> 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> org.eclipse.persistence.internal.oxm.mappings.XMLContainerMapping,org.eclipse.persistence.internal.oxm.mappings.XMLConverterMapping<XMLMarshaller,,Session, XMLUnmarshaller> 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:
- Allow the user to specify XPath -> Type mappings
- Handle reading and writing of XML Documents containing a collection of choice or substitution group elements
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);
- See Also:
-
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, isInSopObject, isJPAId, isLazy, isMapKeyMapping, isOptional, isPrimaryKeyMapping, isReadOnly, isRemotelyInitialized, mapsIdValue, NO_FIELDS, NO_WEIGHT, properties, unconvertedProperties, weight, WEIGHT_AGGREGATE, WEIGHT_DIRECT, WEIGHT_TO_ONE, WEIGHT_TRANSFORMFields inherited from interface org.eclipse.persistence.internal.oxm.mappings.XMLContainerMapping
EMPTY_CONTAINER_DEFAULT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChoiceElement(String xpath, Class elementType) voidaddChoiceElement(String srcXPath, Class elementType, String tgtXPath) voidaddChoiceElement(String xpath, String elementTypeName) voidaddChoiceElement(String srcXpath, String elementTypeName, String tgtXpath) voidvoidvoidaddChoiceElement(XMLField xmlField, Class elementType) voidaddChoiceElement(XMLField sourceField, Class elementType, XMLField targetField) voidaddChoiceElement(XMLField field, String elementTypeName) voidaddConverter(XMLField field, Converter converter) voidbuildBackupClone(Object clone, Object backup, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork) INTERNAL: Clone the attribute from the clone and assign it to the backup.voidbuildClone(Object original, org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey, Object clone, Integer refreshCascade, org.eclipse.persistence.internal.sessions.AbstractSession cloningSession) INTERNAL: Clone the attribute from the original and assign it to the clone.voidbuildCloneFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, 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.voidcascadePerformRemoveIfRequired(Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, Map visitedObjects) INTERNAL: Cascade perform delete through mappings that require the cascadevoidcascadeRegisterNewIfRequired(Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, Map visitedObjects) INTERNAL: Cascade registerNew for Create through mappings that require the cascadeprotected Vector<org.eclipse.persistence.internal.helper.DatabaseField>This method must be overwritten in the subclasses to return a vector of all the fields this mapping represents.org.eclipse.persistence.internal.sessions.ChangeRecordcompareForChange(Object clone, Object backup, org.eclipse.persistence.internal.sessions.ObjectChangeSet owner, org.eclipse.persistence.internal.sessions.AbstractSession session) INTERNAL: This method was created in VisualAge.booleancompareObjects(Object firstObject, Object secondObject, org.eclipse.persistence.internal.sessions.AbstractSession session) INTERNAL: Compare the attributes belonging to this mapping for the objects.voidconvertClassNamesToClasses(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.convertDataValueToObjectValue(Object fieldValue, Session session, XMLUnmarshaller unmarshaller) INTERNALconvertObjectValueToDataValue(Object value, Session session, XMLMarshaller marshaller) INTERNALvoidfixObjectReferences(Object object, Map objectDescriptors, Map processedObjects, ObjectLevelReadQuery query, DistributedSession session) INTERNAL: An object has been serialized from the server to the client.org.eclipse.persistence.internal.queries.ContainerPolicyINTERNAL: Return the mapping's containerPolicy.Return the converter on the mapping.getConverter(XMLField field) Vector<org.eclipse.persistence.internal.helper.DatabaseField>INTERNAL: Returns a vector of all the fields this mapping represents.booleanReturn true if the original container on the object should be used if present.Get the Wrapper NullPolicy from the Mapping.voidinitialize(org.eclipse.persistence.internal.sessions.AbstractSession session) INTERNAL: Allow for initialization of properties and validation.booleanisAny()booleanINTERNAL Return true if an empty container should be set on the object if there is no presence of the collection in the XML document.booleanbooleanINTERNAL: Some mappings support no attribute (transformation and multitenant primary key).booleanINTERNAL: All relational mappings should implement this method to return true.voiditerate(org.eclipse.persistence.internal.descriptors.DescriptorIterator iterator) INTERNAL: Iterate on the appropriate attribute value.voidmergeChangesIntoObject(Object target, org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord, 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.voidmergeIntoObject(Object target, boolean isTargetUninitialized, 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.voidpreInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session) INTERNAL: Allow for initialization of properties and validation.voidsetAttributeValueInObject(Object object, Object value) INTERNAL: Set the value of the attribute mapped by this mapping.voidsetChoiceElementMappingsByClass(Map<Class, XMLMapping> choiceElementMappingsByClass) voidsetChoiceFieldToClassAssociations(ArrayList associations) voidsetContainerPolicy(org.eclipse.persistence.internal.queries.ContainerPolicy cp) voidsetConverter(Converter converter) Set the converter on the mapping.voidsetDefaultEmptyContainer(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.voidsetIsAny(boolean b) voidsetIsWriteOnly(boolean b) voidsetMixedContent(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.voidsetMixedContent(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.voidsetReuseContainer(boolean reuseContainer) Specify whether the original container on the object should be used if present.voidSet the Wrapper NullPolicy on the Mapping.voiduseCollectionClass(Class concreteContainerClass) voiduseCollectionClassName(String concreteContainerClassName) 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, Boolean[] wasCacheUsed) INTERNAL: A subclass should implement this method if it wants different behavior.voidwriteFromObjectIntoRow(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.voidwriteSingleValue(Object value, 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.Methods inherited from class org.eclipse.persistence.mappings.DatabaseMapping
addUnconvertedProperty, buildBackupCloneForPartObject, buildChangeRecord, buildCloneForPartObject, buildContainerClone, buildCopy, buildExpression, buildObjectJoinExpression, buildObjectJoinExpression, buildShallowOriginalFromRow, calculateDeferredChanges, cascadeDiscoverAndPersistUnregisteredNewObjects, cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired, clone, cloneFields, collectQueryParameters, convertConverterClassNamesToClasses, createCloneValueHolder, derivesId, earlyPreDelete, extractNestedExpressions, extractNestedNonAggregateExpressions, 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, postInitializeSourceAndTargetExpressions, 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, writeUpdateFieldsIntoRowMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.persistence.internal.oxm.mappings.Mapping
getAttributeAccessor, getAttributeClassification, getAttributeName, getAttributeValueFromObject, getDescriptor, getField, getReferenceDescriptor, isAbstractCompositeCollectionMapping, isAbstractCompositeDirectCollectionMapping, isAbstractCompositeObjectMapping, isAbstractDirectMapping, isCollectionMapping, isReadOnly, isReferenceMapping, isTransformationMapping, setAttributeAccessor, setAttributeName, setGetMethodName, setIsReadOnly, setProperties, setSetMethodName
-
Constructor Details
-
XMLChoiceCollectionMapping
public XMLChoiceCollectionMapping()
-
-
Method Details
-
getConverter
Return the converter on the mapping. A converter can be used to convert between the object's value and database value of the attribute.- Specified by:
getConverterin interfaceorg.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>
-
setConverter
Set the converter on the mapping. A converter can be used to convert between the object's value and database value of the attribute.- Specified by:
setConverterin interfaceorg.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>
-
buildBackupClone
public void buildBackupClone(Object clone, Object backup, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork) INTERNAL: Clone the attribute from the clone and assign it to the backup.- Specified by:
buildBackupClonein classDatabaseMapping
-
buildClone
public void buildClone(Object original, org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey, Object clone, Integer refreshCascade, org.eclipse.persistence.internal.sessions.AbstractSession cloningSession) INTERNAL: Clone the attribute from the original and assign it to the clone.- Specified by:
buildClonein classDatabaseMapping
-
buildCloneFromRow
public void buildCloneFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, 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) Description copied from class:DatabaseMappingINTERNAL: A combination of readFromRowIntoObject and buildClone.buildClone 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.
- Specified by:
buildCloneFromRowin classDatabaseMapping
-
cascadePerformRemoveIfRequired
public void cascadePerformRemoveIfRequired(Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, Map visitedObjects) INTERNAL: Cascade perform delete through mappings that require the cascade- Specified by:
cascadePerformRemoveIfRequiredin classDatabaseMapping
-
cascadeRegisterNewIfRequired
public void cascadeRegisterNewIfRequired(Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, Map visitedObjects) INTERNAL: Cascade registerNew for Create through mappings that require the cascade- Specified by:
cascadeRegisterNewIfRequiredin classDatabaseMapping
-
compareForChange
public org.eclipse.persistence.internal.sessions.ChangeRecord compareForChange(Object clone, Object backup, org.eclipse.persistence.internal.sessions.ObjectChangeSet owner, org.eclipse.persistence.internal.sessions.AbstractSession session) INTERNAL: This method was created in VisualAge.- Specified by:
compareForChangein classDatabaseMapping- Returns:
- prototype.changeset.ChangeRecord
-
compareObjects
public boolean compareObjects(Object firstObject, Object secondObject, org.eclipse.persistence.internal.sessions.AbstractSession session) INTERNAL: Compare the attributes belonging to this mapping for the objects.- Specified by:
compareObjectsin classDatabaseMapping
-
fixObjectReferences
public void fixObjectReferences(Object object, Map objectDescriptors, Map processedObjects, ObjectLevelReadQuery query, DistributedSession session) INTERNAL: An object has been serialized from the server to the client. Replace the transient attributes of the remote value holders with client-side objects.- Specified by:
fixObjectReferencesin classDatabaseMapping
-
iterate
public void iterate(org.eclipse.persistence.internal.descriptors.DescriptorIterator iterator) INTERNAL: Iterate on the appropriate attribute value.- Specified by:
iteratein classDatabaseMapping
-
mergeChangesIntoObject
public void mergeChangesIntoObject(Object target, org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord, 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.- Specified by:
mergeChangesIntoObjectin classDatabaseMapping
-
mergeIntoObject
public void mergeIntoObject(Object target, boolean isTargetUninitialized, 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.- Specified by:
mergeIntoObjectin classDatabaseMapping
-
valueFromRow
public 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, Boolean[] wasCacheUsed) throws DatabaseException Description copied from class:DatabaseMappingINTERNAL: A subclass should implement this method if it wants different behavior. Returns the value for the mapping from the database row. The execution session is the session the query was executed on, and its platform should be used for data conversion.- Overrides:
valueFromRowin classDatabaseMapping- Throws:
DatabaseException
-
writeFromObjectIntoRow
public void writeFromObjectIntoRow(Object object, org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session, DatabaseMapping.WriteType writeType) throws DescriptorException Description copied from class:DatabaseMappingINTERNAL: A subclass should implement this method if it wants different behavior. Write the attribute value from the object to the row.- Overrides:
writeFromObjectIntoRowin classDatabaseMapping- Throws:
DescriptorException
-
writeSingleValue
public void writeSingleValue(Object value, Object parent, XMLRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session) Description copied from interface:XMLMappingINTERNAL: A method that marshals a single value to the provided Record based on this mapping's XPath. Used for Sequenced marshalling.- Specified by:
writeSingleValuein interfaceorg.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> - Specified by:
writeSingleValuein interfaceXMLMapping- Parameters:
value- - The value to be marshalledrow- - The Record the value is being marshalled too.
-
isXMLMapping
public boolean isXMLMapping()Description copied from class:DatabaseMappingINTERNAL: All relational mappings should implement this method to return true.- Overrides:
isXMLMappingin classDatabaseMapping
-
getFields
Description copied from class:DatabaseMappingINTERNAL: Returns a vector of all the fields this mapping represents.- Overrides:
getFieldsin classDatabaseMapping
-
collectFields
Description copied from class:DatabaseMappingThis method must be overwritten in the subclasses to return a vector of all the fields this mapping represents.- Overrides:
collectFieldsin classDatabaseMapping
-
addChoiceElement
-
addChoiceElement
- Specified by:
addChoiceElementin interfaceorg.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>
-
addChoiceElement
-
addChoiceElement
-
addChoiceElement
public void addChoiceElement(List<XMLField> srcFields, String elementTypeName, List<XMLField> tgtFields) - Specified by:
addChoiceElementin interfaceorg.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>
-
addChoiceElement
-
addChoiceElement
- Specified by:
addChoiceElementin interfaceorg.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>
-
addChoiceElement
-
addChoiceElement
- Specified by:
addChoiceElementin interfaceorg.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>
-
getFieldToClassMappings
- Specified by:
getFieldToClassMappingsin interfaceorg.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>
-
initialize
public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException Description copied from class:DatabaseMappingINTERNAL: Allow for initialization of properties and validation.- Overrides:
initializein classDatabaseMapping- Throws:
DescriptorException
-
getClassToFieldMappings
- Specified by:
getClassToFieldMappingsin interfaceorg.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>
-
getChoiceElementMappings
- Specified by:
getChoiceElementMappingsin interfaceorg.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>
-
getContainerPolicy
public org.eclipse.persistence.internal.queries.ContainerPolicy getContainerPolicy()Description copied from class:DatabaseMappingINTERNAL: Return the mapping's containerPolicy.- Specified by:
getContainerPolicyin interfaceorg.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> - Overrides:
getContainerPolicyin classDatabaseMapping
-
setContainerPolicy
public void setContainerPolicy(org.eclipse.persistence.internal.queries.ContainerPolicy cp) -
useCollectionClass
-
useCollectionClassName
- Specified by:
useCollectionClassNamein interfaceorg.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>
-
convertClassNamesToClasses
Description copied from class:DatabaseMappingINTERNAL: Convert all the class-name-based settings in this mapping to actual class-based settings This method is implemented by subclasses as necessary.- Specified by:
convertClassNamesToClassesin interfaceorg.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> - Specified by:
convertClassNamesToClassesin interfaceXMLMapping- Overrides:
convertClassNamesToClassesin classDatabaseMapping
-
addConverter
- Specified by:
addConverterin interfaceorg.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>
-
getConverter
- Specified by:
getConverterin interfaceorg.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>
-
getChoiceFieldToClassAssociations
- Specified by:
getChoiceFieldToClassAssociationsin interfaceorg.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>
-
setChoiceFieldToClassAssociations
-
isWriteOnly
public boolean isWriteOnly()Description copied from class:DatabaseMappingINTERNAL: Some mappings support no attribute (transformation and multitenant primary key).- Specified by:
isWriteOnlyin interfaceXMLMapping- Overrides:
isWriteOnlyin classDatabaseMapping
-
setIsWriteOnly
public void setIsWriteOnly(boolean b) - Specified by:
setIsWriteOnlyin interfaceorg.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> - Specified by:
setIsWriteOnlyin interfaceXMLMapping
-
isAny
public boolean isAny()- Specified by:
isAnyin interfaceorg.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>
-
setIsAny
public void setIsAny(boolean b) -
preInitialize
public void preInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException Description copied from class:DatabaseMappingINTERNAL: Allow for initialization of properties and validation.- Overrides:
preInitializein classDatabaseMapping- Throws:
DescriptorException
-
setAttributeValueInObject
Description copied from class:DatabaseMappingINTERNAL: Set the value of the attribute mapped by this mapping.- Specified by:
setAttributeValueInObjectin interfaceorg.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> - Overrides:
setAttributeValueInObjectin classDatabaseMapping- Throws:
DescriptorException
-
getReuseContainer
public boolean getReuseContainer()Return true if the original container on the object should be used if present. If it is not present then the container policy will be used to create the container.- Specified by:
getReuseContainerin interfaceorg.eclipse.persistence.internal.oxm.mappings.XMLContainerMapping
-
setReuseContainer
public void setReuseContainer(boolean reuseContainer) Specify whether the original container on the object should be used if present. If it is not present then the container policy will be used to create the container.- Specified by:
setReuseContainerin interfaceorg.eclipse.persistence.internal.oxm.mappings.XMLContainerMapping
-
getClassToSourceFieldsMappings
- Specified by:
getClassToSourceFieldsMappingsin interfaceorg.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>
-
getClassNameToFieldMappings
- Specified by:
getClassNameToFieldMappingsin interfaceorg.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>
-
isMixedContent
public boolean isMixedContent()- Specified by:
isMixedContentin interfaceorg.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>
-
setMixedContent
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. The grouping element parameter is used in the case that there is a common grouping element to all the other elements in this choice. If so, that grouping element can be specified here to allow the mixed content to be written/detected inside the wrapper element.- Specified by:
setMixedContentin interfaceorg.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>
-
setMixedContent
public 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.- Specified by:
setMixedContentin interfaceorg.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>
-
getMixedContentMapping
- Specified by:
getMixedContentMappingin interfaceorg.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>
-
getAnyMapping
- Specified by:
getAnyMappingin interfaceorg.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>
-
isDefaultEmptyContainer
public 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.- Specified by:
isDefaultEmptyContainerin interfaceorg.eclipse.persistence.internal.oxm.mappings.XMLContainerMapping
-
setDefaultEmptyContainer
public 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.- Specified by:
setDefaultEmptyContainerin interfaceorg.eclipse.persistence.internal.oxm.mappings.XMLContainerMapping
-
getWrapperNullPolicy
Description copied from interface:org.eclipse.persistence.internal.oxm.mappings.XMLContainerMappingGet the Wrapper NullPolicy from the Mapping.- Specified by:
getWrapperNullPolicyin interfaceorg.eclipse.persistence.internal.oxm.mappings.XMLContainerMapping
-
setWrapperNullPolicy
Description copied from interface:org.eclipse.persistence.internal.oxm.mappings.XMLContainerMappingSet the Wrapper NullPolicy on the Mapping.- Specified by:
setWrapperNullPolicyin interfaceorg.eclipse.persistence.internal.oxm.mappings.XMLContainerMapping
-
getChoiceElementMappingsByClass
- Specified by:
getChoiceElementMappingsByClassin interfaceorg.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>
-
setChoiceElementMappingsByClass
-
convertObjectValueToDataValue
public Object convertObjectValueToDataValue(Object value, Session session, XMLMarshaller marshaller) INTERNAL- Specified by:
convertObjectValueToDataValuein interfaceorg.eclipse.persistence.internal.oxm.mappings.XMLConverterMapping<XMLMarshaller,Session, XMLUnmarshaller>
-
convertDataValueToObjectValue
public Object convertDataValueToObjectValue(Object fieldValue, Session session, XMLUnmarshaller unmarshaller) INTERNAL- Specified by:
convertDataValueToObjectValuein interfaceorg.eclipse.persistence.internal.oxm.mappings.XMLConverterMapping<XMLMarshaller,Session, XMLUnmarshaller>
-