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
XMLCompositeDirectCollectionMapping, XMLConverter, Converter
| Modifier and Type | Field and Description |
|---|---|
| private XMLConversionManager | |
| private XMLCompositeDirectCollectionMapping | |
| private Class | |
| private String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Object | convertDataValueToObjectValue(Object dataValue, Session session)
Implements org. |
| public Object | convertObjectValueToDataValue(Object objectValue, Session session)
Implements org. |
| public Class | Returns: Class the Class of the elements of this collection's "sub-collection"Get the Class of the elements of this collection's "sub-collection". |
| public String | Returns: String the name of the Class of the elements of this collection's "sub-collection"Get the Class name of the elements of this collection's "sub-collection". |
| public void | initialize(DatabaseMapping mapping, Session session)
Implements org. |
| public boolean | isMutable()
Implements org. |
| public void | setObjectClass(Class<?>
the Class of the elements of this collection's "sub-collection" aClass)Set the Class of the elements of this collection's "sub-collection". |
| public void | setObjectClassName(String
the name of the Class of the elements of this collection's "sub-collection" aClassName)Set the Class name of the elements of this collection's "sub-collection". |
| conversionManager | back to summary |
|---|---|
| private XMLConversionManager conversionManager | |
| mapping | back to summary |
|---|---|
| private XMLCompositeDirectCollectionMapping mapping | |
| objectClass | back to summary |
|---|---|
| private Class<?> objectClass | |
| objectClassName | back to summary |
|---|---|
| private String objectClassName | |
| XMLListConverter | back to summary |
|---|---|
| public XMLListConverter() | |
| convertDataValueToObjectValue | back to summary |
|---|---|
| public Object convertDataValueToObjectValue(Object dataValue, Session session) Implements org. Doc from org. 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.
| |
| convertObjectValueToDataValue | back to summary |
|---|---|
| public Object convertObjectValueToDataValue(Object objectValue, Session session) Implements org. Doc from org. 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.
| |
| getObjectClass | back to summary |
|---|---|
| public Class 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).
| |
| getObjectClassName | back to summary |
|---|---|
| public 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").
| |
| initialize | back to summary |
|---|---|
| public void initialize(DatabaseMapping mapping, Session session) Implements org. Doc from org. PUBLIC: Allow for any initialization.
| |
| isMutable | back to summary |
|---|---|
| public boolean isMutable() Implements org. Doc from org. 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.
| |
| setObjectClass | back to summary |
|---|---|
| public void setObjectClass(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).
| |
| setObjectClassName | back to summary |
|---|---|
| public void setObjectClassName(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").
| |