Class XMLRootConverter
- java.lang.Object
-
- org.eclipse.persistence.oxm.mappings.converters.XMLRootConverter
-
- All Implemented Interfaces:
java.io.Serializable
,CoreConverter<DatabaseMapping,Session>
,Converter
,XMLConverter
public class XMLRootConverter extends java.lang.Object implements XMLConverter
Purpose: Provides an implementation of XMLConverter to wrap/unwrap objects in an XMLRoot in order to capture element name information.
Responsibilities
- Wrap an object in an XMLRoot on unmarshal. Do any required conversions based on type for simple mappings.
- Unwrap an XMLRoot from the object and pass it along to be marshalled.
- See Also:
XMLConverter
,Converter
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description XMLRootConverter(XMLField associatedField)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
convertDataValueToObjectValue(java.lang.Object dataValue, Session session)
PUBLIC: Convert the databases' data representation of the value to the object's representation.java.lang.Object
convertDataValueToObjectValue(java.lang.Object dataValue, Session session, XMLUnmarshaller unmarshaller)
java.lang.Object
convertObjectValueToDataValue(java.lang.Object objectValue, Session session)
PUBLIC: Convert the object's representation of the value to the databases' data representation.java.lang.Object
convertObjectValueToDataValue(java.lang.Object objectValue, Session session, XMLMarshaller marshaller)
void
initialize(DatabaseMapping mapping, Session session)
PUBLIC: Allow for any initialization.boolean
isMutable()
PUBLIC: If the converter converts the value to a mutable value, i.e.
-
-
-
Constructor Detail
-
XMLRootConverter
public XMLRootConverter(XMLField associatedField)
-
-
Method Detail
-
convertDataValueToObjectValue
public java.lang.Object convertDataValueToObjectValue(java.lang.Object dataValue, Session session, XMLUnmarshaller unmarshaller)
- Specified by:
convertDataValueToObjectValue
in interfaceXMLConverter
-
convertObjectValueToDataValue
public java.lang.Object convertObjectValueToDataValue(java.lang.Object objectValue, Session session, XMLMarshaller marshaller)
- Specified by:
convertObjectValueToDataValue
in interfaceXMLConverter
-
convertDataValueToObjectValue
public java.lang.Object convertDataValueToObjectValue(java.lang.Object dataValue, Session session)
Description copied from interface:Converter
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.- Specified by:
convertDataValueToObjectValue
in interfaceConverter
- Specified by:
convertDataValueToObjectValue
in interfaceCoreConverter<DatabaseMapping,Session>
-
convertObjectValueToDataValue
public java.lang.Object convertObjectValueToDataValue(java.lang.Object objectValue, Session session)
Description copied from interface:Converter
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.- Specified by:
convertObjectValueToDataValue
in interfaceConverter
- Specified by:
convertObjectValueToDataValue
in interfaceCoreConverter<DatabaseMapping,Session>
-
initialize
public void initialize(DatabaseMapping mapping, Session session)
Description copied from interface:Converter
PUBLIC: Allow for any initialization.- Specified by:
initialize
in interfaceConverter
- Specified by:
initialize
in interfaceCoreConverter<DatabaseMapping,Session>
-
isMutable
public boolean isMutable()
Description copied from interface:Converter
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.
-
-