Top Description Fields Constructors Methods
org.eclipse.persistence.oxm

public Class XMLUnionField

extends XMLField
implements UnionField<XMLConversionManager, NamespaceResolver>
Class Inheritance
All Implemented Interfaces
org.eclipse.persistence.internal.oxm.mappings.UnionField, org.eclipse.persistence.internal.oxm.mappings.Field, org.eclipse.persistence.internal.core.helper.CoreField
Imports
java.util.ArrayList, .Iterator, javax.xml.namespace.QName, org.eclipse.persistence.exceptions.ConversionException, org.eclipse.persistence.internal.core.sessions.CoreAbstractSession, org.eclipse.persistence.internal.oxm.ConversionManager, .XMLConversionManager, org.eclipse.persistence.internal.oxm.mappings.UnionField, org.eclipse.persistence.internal.oxm.record.AbstractUnmarshalRecord

Subclass of XMLField for fields that are mapped to unions. Maintains a list of schema types instead of just one single schema type. Schema types can be added using the addSchemaType api. XMLConstants has a list of useful constants including a list of QNames for built-in schema types that can be used when adding schema types.

When reading and writing an element that is mapped with an XMLUnionField, a conversion to each of the schema types on the field (in the order they are specified ) is tried until a conversion is successful. The java type to convert to is based on the list of schema type to java conversion pairs specified on the field. These conversion pairs can be modified using the addXMLConversion api.

Code Sample
In this example the age field could be a date or an int.
XMLUnionField field = new XMLUnionField("age/text()");
field.addSchemaType(XMLConstants.DATE_QNAME);
field.addSchemaType(XMLConstants.INT_QNAME)

See Also
XMLField, XMLConstants

Field Summary

Modifier and TypeField and Description
private ArrayList<E>
Inherited from org.eclipse.persistence.oxm.XMLField:
isTypedTextFieldleafElementTypeuserJavaTypesuserXMLTypes

Constructor Summary

AccessConstructor and Description
public
XMLUnionField()

Constructs an XMLUnionField

public
XMLUnionField(String
The xpath expression for the field
xPath
)

Constructs an XMLUnionField with the xpath set to the specified xPath

Method Summary

Modifier and TypeMethod and Description
public void
addSchemaType(QName
QName to be added to the list of schema types
value
)

Implements org.eclipse.persistence.internal.oxm.mappings.UnionField.addSchemaType.

Adds the new type value to the list of types
private boolean

Returns:

true if 'value' exists in the list, false otherwise
contains
(ArrayList<E>
List of types
types
,
QName
the QName to look for in the list
value
)

Checks for existance of a schema type in the list.

public Object
convertValueBasedOnSchemaType(Object value, XMLConversionManager xmlConversionManager, AbstractUnmarshalRecord<ABSTRACT_SESSION extends CoreAbstractSession<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, PLATFORM extends CorePlatform<CONVERSION_MANAGER extends CoreConversionManager>, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION_EVENT_MANAGER extends CoreSessionEventManager<SESSION_EVENT_LISTENER extends CoreSessionEventListener>>, FIELD extends CoreField, UNMARSHALLER extends Unmarshaller<ABSTRACT_SESSION extends CoreAbstractSession<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, PLATFORM extends CorePlatform<CONVERSION_MANAGER extends CoreConversionManager>, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION_EVENT_MANAGER extends CoreSessionEventManager<SESSION_EVENT_LISTENER extends CoreSessionEventListener>>, CONTEXT extends Context<ABSTRACT_SESSION extends CoreAbstractSession<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, PLATFORM extends CorePlatform<CONVERSION_MANAGER extends CoreConversionManager>, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION_EVENT_MANAGER extends CoreSessionEventManager<SESSION_EVENT_LISTENER extends CoreSessionEventListener>>, DESCRIPTOR extends Descriptor<?, ?, ?, ?, ?, NAMESPACE_RESOLVER, ?, ?, ?, ?>, FIELD extends Field, NAMESPACE_RESOLVER extends NamespaceResolver, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION extends CoreSession<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, PLATFORM extends CorePlatform, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION_EVENT_MANAGER extends CoreSessionEventManager>, SESSION_EVENT_LISTENER extends CoreSessionEventListener>, DESCRIPTOR extends Descriptor, ID_RESOLVER extends IDResolver, MEDIA_TYPE extends MediaType, ROOT extends Root, UNMARSHALLER_HANDLER extends UnmarshallerHandler, UNMARSHALLER_LISTENER extends Unmarshaller.Listener>> record)

Overrides org.eclipse.persistence.oxm.XMLField.convertValueBasedOnSchemaType.

Implements org.eclipse.persistence.internal.oxm.mappings.Field.convertValueBasedOnSchemaType.

INTERNAL:
public Class<?>

Returns:

The class associated with the specified schema type, if no corresponding match found returns null
getJavaClass
(QName
The qualified name of the XML Schema type to use as a key in the lookup
qname
)

Overrides org.eclipse.persistence.oxm.XMLField.getJavaClass.

Return the class for a given qualified XML Schema type.
public Class<?>

Returns:

the class for a given qualified XML Schema type.
getJavaClass
(QName
The qualified name of the XML Schema type to use as a key in the lookup
qname
,
ConversionManager conversionManager)

Overrides org.eclipse.persistence.oxm.XMLField.getJavaClass.

Implements org.eclipse.persistence.internal.oxm.mappings.Field.getJavaClass.

INTERNAL
public QName

Returns:

the first item in the collection of schema types
getSchemaType
()

Overrides org.eclipse.persistence.oxm.XMLField.getSchemaType.

Implements org.eclipse.persistence.internal.oxm.mappings.Field.getSchemaType.

Return the first schema type in the list of schema types
public QName
getSchemaTypeForValue(Object value, CoreAbstractSession<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, PLATFORM extends CorePlatform<CONVERSION_MANAGER extends CoreConversionManager>, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION_EVENT_MANAGER extends CoreSessionEventManager<SESSION_EVENT_LISTENER extends CoreSessionEventListener>> session)

Overrides org.eclipse.persistence.oxm.XMLField.getSchemaTypeForValue.

Implements org.eclipse.persistence.internal.oxm.mappings.Field.getSchemaTypeForValue.

INTERNAL:
public ArrayList<E>

Returns:

the list of types
getSchemaTypes
()

Implements org.eclipse.persistence.internal.oxm.mappings.UnionField.getSchemaTypes.

Return the list of schema types
protected QName
getSingleValueToWriteForUnion(Object value, CoreAbstractSession<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, PLATFORM extends CorePlatform<CONVERSION_MANAGER extends CoreConversionManager>, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION_EVENT_MANAGER extends CoreSessionEventManager<SESSION_EVENT_LISTENER extends CoreSessionEventListener>> session)

public boolean
public boolean
public void
setSchemaType(QName
The value to be added to the list of schema types
value
)

Overrides org.eclipse.persistence.oxm.XMLField.setSchemaType.

Implements org.eclipse.persistence.internal.oxm.mappings.Field.setSchemaType.

Adds the new type value to the list of types
public void
setSchemaTypes(ArrayList<E>
An ArrayList containing the schema types.
value
)

Sets the schema types that this attribute can be mapped to Valid QName schema types can be found on org.eclipse.persistence.oxm.XMLConstants

Inherited from org.eclipse.persistence.oxm.XMLField:
addConversionaddJavaConversionaddXMLConversionequalsgetLastXPathFragmentgetLeafElementTypegetNamespaceResolvergetUserJavaTypesForDeploymentXMLgetUserXMLTypesForDeploymentXMLgetXMLTypegetXMLTypegetXPathgetXPathFragmenthashCodehasLastXPathFragmentinitializeisCDATAisNestedArrayisRequiredisSelfFieldisTypedTextFieldremoveConversionremoveJavaConversionremoveXMLConversionsetIsCDATAsetIsTypedTextFieldsetLastXPathFragmentsetLeafElementTypesetNamesetNamesetNamespaceResolversetNestedArraysetRequiredsetUserJavaTypesForDeploymentXMLsetUserXMLTypesForDeploymentXMLsetUsesSingleNodesetXPathsetXPathFragmentusesSingleNode

Field Detail

schemaTypesback to summary
private ArrayList<E> schemaTypes

Constructor Detail

XMLUnionFieldback to summary
public XMLUnionField()

Constructs an XMLUnionField

XMLUnionFieldback to summary
public XMLUnionField(String xPath)

Constructs an XMLUnionField with the xpath set to the specified xPath

Parameters
xPath:String

The xpath expression for the field

Method Detail

addSchemaTypeback to summary
public void addSchemaType(QName value)

Implements org.eclipse.persistence.internal.oxm.mappings.UnionField.addSchemaType.

Adds the new type value to the list of types

Parameters
value:QName

QName to be added to the list of schema types

Annotations
@Override
containsback to summary
private boolean contains(ArrayList<E> types, QName value)

Checks for existance of a schema type in the list.

Parameters
types:ArrayList<E>

List of types

value:QName

the QName to look for in the list

Returns:boolean

true if 'value' exists in the list, false otherwise

convertValueBasedOnSchemaTypeback to summary
public Object convertValueBasedOnSchemaType(Object value, XMLConversionManager xmlConversionManager, AbstractUnmarshalRecord<ABSTRACT_SESSION extends CoreAbstractSession<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, PLATFORM extends CorePlatform<CONVERSION_MANAGER extends CoreConversionManager>, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION_EVENT_MANAGER extends CoreSessionEventManager<SESSION_EVENT_LISTENER extends CoreSessionEventListener>>, FIELD extends CoreField, UNMARSHALLER extends Unmarshaller<ABSTRACT_SESSION extends CoreAbstractSession<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, PLATFORM extends CorePlatform<CONVERSION_MANAGER extends CoreConversionManager>, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION_EVENT_MANAGER extends CoreSessionEventManager<SESSION_EVENT_LISTENER extends CoreSessionEventListener>>, CONTEXT extends Context<ABSTRACT_SESSION extends CoreAbstractSession<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, PLATFORM extends CorePlatform<CONVERSION_MANAGER extends CoreConversionManager>, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION_EVENT_MANAGER extends CoreSessionEventManager<SESSION_EVENT_LISTENER extends CoreSessionEventListener>>, DESCRIPTOR extends Descriptor<?, ?, ?, ?, ?, NAMESPACE_RESOLVER, ?, ?, ?, ?>, FIELD extends Field, NAMESPACE_RESOLVER extends NamespaceResolver, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION extends CoreSession<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, PLATFORM extends CorePlatform, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION_EVENT_MANAGER extends CoreSessionEventManager>, SESSION_EVENT_LISTENER extends CoreSessionEventListener>, DESCRIPTOR extends Descriptor, ID_RESOLVER extends IDResolver, MEDIA_TYPE extends MediaType, ROOT extends Root, UNMARSHALLER_HANDLER extends UnmarshallerHandler, UNMARSHALLER_LISTENER extends Unmarshaller.Listener>> record)

Overrides org.eclipse.persistence.oxm.XMLField.convertValueBasedOnSchemaType.

Implements org.eclipse.persistence.internal.oxm.mappings.Field.convertValueBasedOnSchemaType.

INTERNAL:

Annotations
@Override
getJavaClassback to summary
public Class<?> getJavaClass(QName qname)

Overrides org.eclipse.persistence.oxm.XMLField.getJavaClass.

Return the class for a given qualified XML Schema type. If the class is a primitive the corresponding wrapper class is returned

Parameters
qname:QName

The qualified name of the XML Schema type to use as a key in the lookup

Returns:Class<?>

The class associated with the specified schema type, if no corresponding match found returns null

Annotations
@Override
getJavaClassback to summary
public Class<?> getJavaClass(QName qname, ConversionManager conversionManager)

Overrides org.eclipse.persistence.oxm.XMLField.getJavaClass.

Implements org.eclipse.persistence.internal.oxm.mappings.Field.getJavaClass.

INTERNAL

Parameters
qname:QName

Doc from org.eclipse.persistence.internal.oxm.mappings.Field.getJavaClass.

The qualified name of the XML Schema type to use as a key in the lookup

Returns:Class<?>

the class for a given qualified XML Schema type.

Annotations
@Override
Since
EclipseLink 2.6.0
getSchemaTypeback to summary
public QName getSchemaType()

Overrides org.eclipse.persistence.oxm.XMLField.getSchemaType.

Implements org.eclipse.persistence.internal.oxm.mappings.Field.getSchemaType.

Return the first schema type in the list of schema types

Returns:QName

the first item in the collection of schema types

Annotations
@Override
getSchemaTypeForValueback to summary
public QName getSchemaTypeForValue(Object value, CoreAbstractSession<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, PLATFORM extends CorePlatform<CONVERSION_MANAGER extends CoreConversionManager>, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION_EVENT_MANAGER extends CoreSessionEventManager<SESSION_EVENT_LISTENER extends CoreSessionEventListener>> session)

Overrides org.eclipse.persistence.oxm.XMLField.getSchemaTypeForValue.

Implements org.eclipse.persistence.internal.oxm.mappings.Field.getSchemaTypeForValue.

Doc from org.eclipse.persistence.internal.oxm.mappings.Field.getSchemaTypeForValue.

INTERNAL:

Annotations
@Override
getSchemaTypesback to summary
public ArrayList<E> getSchemaTypes()

Implements org.eclipse.persistence.internal.oxm.mappings.UnionField.getSchemaTypes.

Return the list of schema types

Returns:ArrayList<E>

the list of types

Annotations
@Override
getSingleValueToWriteForUnionback to summary
protected QName getSingleValueToWriteForUnion(Object value, CoreAbstractSession<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, PLATFORM extends CorePlatform<CONVERSION_MANAGER extends CoreConversionManager>, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION_EVENT_MANAGER extends CoreSessionEventManager<SESSION_EVENT_LISTENER extends CoreSessionEventListener>> session)
isSchemaTypeback to summary
public boolean isSchemaType(QName schemaType)

Overrides org.eclipse.persistence.oxm.XMLField.isSchemaType.

Implements org.eclipse.persistence.internal.oxm.mappings.Field.isSchemaType.

INTERNAL

Annotations
@Override
isUnionFieldback to summary
public boolean isUnionField()

Overrides org.eclipse.persistence.oxm.XMLField.isUnionField.

Implements org.eclipse.persistence.internal.oxm.mappings.Field.isUnionField.

INTERNAL: returns true since this is a union field

Annotations
@Override
setSchemaTypeback to summary
public void setSchemaType(QName value)

Overrides org.eclipse.persistence.oxm.XMLField.setSchemaType.

Implements org.eclipse.persistence.internal.oxm.mappings.Field.setSchemaType.

Adds the new type value to the list of types

Parameters
value:QName

The value to be added to the list of schema types

Annotations
@Override
setSchemaTypesback to summary
public void setSchemaTypes(ArrayList<E> value)

Sets the schema types that this attribute can be mapped to Valid QName schema types can be found on org.eclipse.persistence.oxm.XMLConstants

Parameters
value:ArrayList<E>

An ArrayList containing the schema types.

See Also
org.eclipse.persistence.oxm.XMLConstants