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

public Class XMLRootConverter

extends Object
implements XMLConverter
Class Inheritance
All Implemented Interfaces
org.eclipse.persistence.oxm.mappings.converters.XMLConverter, org.eclipse.persistence.mappings.converters.Converter, java.io.Serializable, org.eclipse.persistence.core.mappings.converters.CoreConverter
Imports
org.eclipse.persistence.mappings.DatabaseMapping, org.eclipse.persistence.oxm.XMLMarshaller, .XMLUnmarshaller, .XMLRoot, .XMLField, org.eclipse.persistence.exceptions.ConversionException, org.eclipse.persistence.internal.oxm.XPathFragment, org.eclipse.persistence.sessions.Session

Purpose: Provides an implementation of XMLConverter to wrap/unwrap objects in an XMLRoot in order to capture element name information.

Responsibilities

See Also
XMLConverter, Converter

Field Summary

Modifier and TypeField and Description
private XMLField
private DatabaseMapping
private XPathFragment<XML_FIELD extends Field>

Constructor Summary

AccessConstructor and Description
public
XMLRootConverter(XMLField associatedField)

Method Summary

Modifier and TypeMethod and Description
public Object
public Object
convertDataValueToObjectValue(Object dataValue, Session session)

Implements org.eclipse.persistence.mappings.converters.Converter.convertDataValueToObjectValue.

PUBLIC: Convert the databases' data representation of the value to the object's representation.
public Object
public Object
convertObjectValueToDataValue(Object objectValue, Session session)

Implements org.eclipse.persistence.mappings.converters.Converter.convertObjectValueToDataValue.

PUBLIC: Convert the object's representation of the value to the databases' data representation.
public void
initialize(DatabaseMapping mapping, Session session)

Implements org.eclipse.persistence.mappings.converters.Converter.initialize.

PUBLIC: Allow for any initialization.
public boolean
isMutable()

Implements org.eclipse.persistence.mappings.converters.Converter.isMutable.

PUBLIC: If the converter converts the value to a mutable value, i.e. a value that can have its' parts changed without being replaced, then it must return true.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

associatedFieldback to summary
private XMLField associatedField
mappingback to summary
private DatabaseMapping mapping
rootFragmentback to summary
private XPathFragment<XML_FIELD extends Field> rootFragment

Constructor Detail

XMLRootConverterback to summary
public XMLRootConverter(XMLField associatedField)

Method Detail

convertDataValueToObjectValueback to summary
public Object convertDataValueToObjectValue(Object dataValue, Session session, XMLUnmarshaller unmarshaller)

Implements org.eclipse.persistence.oxm.mappings.converters.XMLConverter.convertDataValueToObjectValue.

Annotations
@Override
convertDataValueToObjectValueback to summary
public Object convertDataValueToObjectValue(Object dataValue, Session session)

Implements org.eclipse.persistence.mappings.converters.Converter.convertDataValueToObjectValue.

Doc from org.eclipse.persistence.mappings.converters.Converter.convertDataValueToObjectValue.

PUBLIC: Convert the databases' data representation of the value to the object's representation. For example this could convert between an sql.Time datatype and the Java Calendar type.

Annotations
@Override
convertObjectValueToDataValueback to summary
public Object convertObjectValueToDataValue(Object objectValue, Session session, XMLMarshaller marshaller)

Implements org.eclipse.persistence.oxm.mappings.converters.XMLConverter.convertObjectValueToDataValue.

Annotations
@Override
convertObjectValueToDataValueback to summary
public Object convertObjectValueToDataValue(Object objectValue, Session session)

Implements org.eclipse.persistence.mappings.converters.Converter.convertObjectValueToDataValue.

Doc from org.eclipse.persistence.mappings.converters.Converter.convertObjectValueToDataValue.

PUBLIC: Convert the object's representation of the value to the databases' data representation. For example this could convert between a Calendar Java type and the sql.Time datatype.

Annotations
@Override
initializeback to summary
public void initialize(DatabaseMapping mapping, Session session)

Implements org.eclipse.persistence.mappings.converters.Converter.initialize.

Doc from org.eclipse.persistence.mappings.converters.Converter.initialize.

PUBLIC: Allow for any initialization.

Annotations
@Override
isMutableback to summary
public boolean isMutable()

Implements org.eclipse.persistence.mappings.converters.Converter.isMutable.

Doc from org.eclipse.persistence.mappings.converters.Converter.isMutable.

PUBLIC: If the converter converts the value to a mutable value, i.e. a value that can have its' parts changed without being replaced, then it must return true. If the value is not mutable, cannot be changed without replacing the whole value then false must be returned. This is used within the UnitOfWork to determine how to clone.

Annotations
@Override