public class SerializedObjectConverter extends java.lang.Object implements Converter
Purpose: The serialized object converter can be used to store an arbitrary object or set of objects into a database blob field. It uses the Java serializer so the target must be serializable.
Constructor and Description |
---|
SerializedObjectConverter()
PUBLIC: Default constructor.
|
SerializedObjectConverter(DatabaseMapping mapping)
PUBLIC: Default constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
convertDataValueToObjectValue(java.lang.Object fieldValue, Session session)
INTERNAL: The fieldValue will be a byte array.
|
java.lang.Object |
convertObjectValueToDataValue(java.lang.Object attributeValue, Session session)
INTERNAL: Convert the object to a byte array through serialize.
|
void |
initialize(DatabaseMapping mapping, Session session)
INTERNAL: Set the mapping.
|
boolean |
isMutable()
INTERNAL: If the converter converts the value to a non-atomic value, i.e.
|
public SerializedObjectConverter()
public SerializedObjectConverter(DatabaseMapping mapping)
public java.lang.Object convertDataValueToObjectValue(java.lang.Object fieldValue, Session session) throws DescriptorException
convertDataValueToObjectValue
in interface Converter
DescriptorException
public java.lang.Object convertObjectValueToDataValue(java.lang.Object attributeValue, Session session)
convertObjectValueToDataValue
in interface Converter
public void initialize(DatabaseMapping mapping, Session session)
initialize
in interface Converter