public class XMLJavaTypeConverter
extends org.eclipse.persistence.oxm.mappings.converters.XMLConverterAdapter
XmlAdapter| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Class<?> |
boundType |
protected DatabaseMapping |
mapping |
protected <any> |
nestedConverter |
protected javax.xml.namespace.QName |
schemaType |
protected java.lang.Class<?> |
valueType |
protected javax.xml.bind.annotation.adapters.XmlAdapter<?,?> |
xmlAdapter |
protected java.lang.Class<? extends javax.xml.bind.annotation.adapters.XmlAdapter<?,?>> |
xmlAdapterClass |
protected java.lang.String |
xmlAdapterClassName |
| Constructor and Description |
|---|
XMLJavaTypeConverter()
The default constructor.
|
XMLJavaTypeConverter(java.lang.Class<?> xmlAdapterClass)
This constructor takes the XmlAdapter class to be used with this
converter.
|
XMLJavaTypeConverter(java.lang.Class<?> xmlAdapterClass,
javax.xml.namespace.QName schemaType)
This constructor takes the XmlAdapter class to be used with this
converter, as well as a schema type to be used during the conversion
operation.
|
XMLJavaTypeConverter(java.lang.String xmlAdapterClassName)
This constructor takes an adapter class name.
|
XMLJavaTypeConverter(java.lang.String xmlAdapterClassName,
javax.xml.namespace.QName schemaType)
This constructor takes the XmlAdapter class name to be used with this
converter (loaded during initialization), as well as a schema type to
be used during the conversion operation.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
convertDataValueToObjectValue(java.lang.Object dataValue,
Session session,
XMLUnmarshaller unmarshaller)
Wraps the XmlAdapter unmarshal method.
|
java.lang.Object |
convertObjectValueToDataValue(java.lang.Object objectValue,
Session session,
XMLMarshaller marshaller)
Wraps the XmlAdapter marshal method.
|
<any> |
getNestedConverter()
Get the nested converter to that is used in conjunction with the adapter.
|
javax.xml.namespace.QName |
getSchemaType()
Get the schema type to be used during conversion.
|
java.lang.Class<? extends javax.xml.bind.annotation.adapters.XmlAdapter<?,?>> |
getXmlAdapterClass()
Return the XmlAdapter class for this converter.
|
java.lang.String |
getXmlAdapterClassName()
Return the XmlAdapter class name for this converter.
|
void |
initialize(DatabaseMapping mapping,
Session session)
Figure out the BoundType and ValueType for the XmlAdapter class, then
either create an instance of the XmlAdapter, or if an instance is set
on the marshaller, use it.
|
boolean |
isMutable()
Satisfy the interface.
|
void |
setNestedConverter(<any> nestedConverter)
Set a nested converter to be used in conjunction with the adapter.
|
void |
setSchemaType(javax.xml.namespace.QName qname)
Set the schema type to be used during conversion - if one is
required.
|
void |
setXmlAdapterClass(java.lang.Class<? extends javax.xml.bind.annotation.adapters.XmlAdapter<?,?>> xmlAdapterClass)
Set the XmlAdapter class to be used with this converter.
|
void |
setXmlAdapterClassName(java.lang.String xmlAdapterClassName)
Set the XmlAdapter class to be used with this converter.
|
protected java.lang.Class<?> boundType
protected java.lang.Class<?> valueType
protected java.lang.Class<? extends javax.xml.bind.annotation.adapters.XmlAdapter<?,?>> xmlAdapterClass
protected java.lang.String xmlAdapterClassName
protected javax.xml.bind.annotation.adapters.XmlAdapter<?,?> xmlAdapter
protected javax.xml.namespace.QName schemaType
protected DatabaseMapping mapping
protected <any> nestedConverter
public XMLJavaTypeConverter()
public XMLJavaTypeConverter(java.lang.Class<?> xmlAdapterClass)
xmlAdapterClass - public XMLJavaTypeConverter(java.lang.String xmlAdapterClassName)
xmlAdapterClassName - public XMLJavaTypeConverter(java.lang.Class<?> xmlAdapterClass,
javax.xml.namespace.QName schemaType)
xmlAdapterClass - schemaType - public XMLJavaTypeConverter(java.lang.String xmlAdapterClassName,
javax.xml.namespace.QName schemaType)
xmlAdapterClassName - schemaType - public java.lang.Object convertDataValueToObjectValue(java.lang.Object dataValue,
Session session,
XMLUnmarshaller unmarshaller)
public java.lang.Object convertObjectValueToDataValue(java.lang.Object objectValue,
Session session,
XMLMarshaller marshaller)
public javax.xml.namespace.QName getSchemaType()
public java.lang.Class<? extends javax.xml.bind.annotation.adapters.XmlAdapter<?,?>> getXmlAdapterClass()
public java.lang.String getXmlAdapterClassName()
public void initialize(DatabaseMapping mapping,
Session session)
mapping - session - public boolean isMutable()
public void setSchemaType(javax.xml.namespace.QName qname)
public void setXmlAdapterClass(java.lang.Class<? extends javax.xml.bind.annotation.adapters.XmlAdapter<?,?>> xmlAdapterClass)
xmlAdapterClass - public void setXmlAdapterClassName(java.lang.String xmlAdapterClassName)
xmlAdapterClassName - public <any> getNestedConverter()
public void setNestedConverter(<any> nestedConverter)