Class XMLListConverter
- java.lang.Object
-
- org.eclipse.persistence.oxm.mappings.converters.XMLListConverter
-
- All Implemented Interfaces:
java.io.Serializable,CoreConverter<DatabaseMapping,Session>,Converter
public class XMLListConverter extends java.lang.Object implements Converter
Purpose: Provides an implementation of Converter that can be used to convert a collection of Objects into a space separated list of Strings and back. Used with XMLCompositeDirectCollectionMapping to implement the behaviour of the XmlList annotation
-
-
Constructor Summary
Constructors Constructor Description XMLListConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectconvertDataValueToObjectValue(java.lang.Object dataValue, Session session)PUBLIC: Convert the databases' data representation of the value to the object's representation.java.lang.ObjectconvertObjectValueToDataValue(java.lang.Object objectValue, Session session)PUBLIC: Convert the object's representation of the value to the databases' data representation.java.lang.ClassgetObjectClass()Get the Class of the elements of this collection's "sub-collection".java.lang.StringgetObjectClassName()Get the Class name of the elements of this collection's "sub-collection".voidinitialize(DatabaseMapping mapping, Session session)PUBLIC: Allow for any initialization.booleanisMutable()PUBLIC: If the converter converts the value to a mutable value, i.e.voidsetObjectClass(java.lang.Class aClass)Set the Class of the elements of this collection's "sub-collection".voidsetObjectClassName(java.lang.String aClassName)Set the Class name of the elements of this collection's "sub-collection".
-
-
-
Method Detail
-
convertDataValueToObjectValue
public java.lang.Object convertDataValueToObjectValue(java.lang.Object dataValue, Session session)Description copied from interface:ConverterPUBLIC: 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:
convertDataValueToObjectValuein interfaceConverter- Specified by:
convertDataValueToObjectValuein interfaceCoreConverter<DatabaseMapping,Session>
-
convertObjectValueToDataValue
public java.lang.Object convertObjectValueToDataValue(java.lang.Object objectValue, Session session)Description copied from interface:ConverterPUBLIC: 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:
convertObjectValueToDataValuein interfaceConverter- Specified by:
convertObjectValueToDataValuein interfaceCoreConverter<DatabaseMapping,Session>
-
initialize
public void initialize(DatabaseMapping mapping, Session session)
Description copied from interface:ConverterPUBLIC: Allow for any initialization.- Specified by:
initializein interfaceConverter- Specified by:
initializein interfaceCoreConverter<DatabaseMapping,Session>
-
isMutable
public boolean isMutable()
Description copied from interface:ConverterPUBLIC: 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.
-
getObjectClassName
public java.lang.String getObjectClassName()
Get the Class name of the elements of this collection's "sub-collection". Only applicable for DirectCollections of Lists (for example, for an ArrayList<ArrayList<Double>>, FieldSubElementClassName would be "java.lang.Double").- Returns:
- String the name of the Class of the elements of this collection's "sub-collection"
-
setObjectClassName
public void setObjectClassName(java.lang.String aClassName)
Set the Class name of the elements of this collection's "sub-collection". Only applicable for DirectCollections of Lists (for example, for an ArrayList<ArrayList<Double>>, FieldSubElementClassName would be "java.lang.Double").- Parameters:
aClassName- the name of the Class of the elements of this collection's "sub-collection"
-
getObjectClass
public java.lang.Class getObjectClass()
Get the Class of the elements of this collection's "sub-collection". Only applicable for DirectCollections of Lists (for example, for an ArrayList<ArrayList<Double>>, FieldSubElementClass would be java.lang.Double.class).- Returns:
- Class the Class of the elements of this collection's "sub-collection"
-
setObjectClass
public void setObjectClass(java.lang.Class aClass)
Set the Class of the elements of this collection's "sub-collection". Only applicable for DirectCollections of Lists (for example, for an ArrayList<ArrayList<Double>>, FieldSubElementClass would be java.lang.Double.class).- Parameters:
aClass- the Class of the elements of this collection's "sub-collection"
-
-