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);

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,
java.lang.Object clone,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork)
INTERNAL:
Clone the attribute from the original and assign it to the clone.

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.

valueFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row,
org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
ObjectBuildingQuery sourceQuery,
org.eclipse.persistence.internal.sessions.AbstractSession executionSession)
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)
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.

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.

INTERNAL:
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.