Class XMLListConverter
java.lang.Object
org.eclipse.persistence.oxm.mappings.converters.XMLListConverter
- All Implemented Interfaces:
Serializable
,CoreConverter<DatabaseMapping,
,Session> 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
-
Method Summary
Modifier and TypeMethodDescriptionconvertDataValueToObjectValue
(Object dataValue, Session session) PUBLIC: Convert the databases' data representation of the value to the object's representation.convertObjectValueToDataValue
(Object objectValue, Session session) PUBLIC: Convert the object's representation of the value to the databases' data representation.Get the Class of the elements of this collection's "sub-collection".Get the Class name of the elements of this collection's "sub-collection".void
initialize
(DatabaseMapping mapping, Session session) PUBLIC: Allow for any initialization.boolean
PUBLIC: If the converter converts the value to a mutable value, i.e.void
setObjectClass
(Class aClass) Set the Class of the elements of this collection's "sub-collection".void
setObjectClassName
(String aClassName) Set the Class name of the elements of this collection's "sub-collection".
-
Constructor Details
-
XMLListConverter
public XMLListConverter()
-
-
Method Details
-
convertDataValueToObjectValue
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
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
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. -
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
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
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
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"
-