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.
Modifier and Type | Field and Description |
---|---|
protected DatabaseMapping |
mapping |
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.
|
protected DatabaseMapping |
getMapping()
INTERNAL:
Return the mapping.
|
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.
|
protected DatabaseMapping mapping
public SerializedObjectConverter()
public SerializedObjectConverter(DatabaseMapping mapping)
public java.lang.Object convertDataValueToObjectValue(java.lang.Object fieldValue, Session session) throws DescriptorException
convertDataValueToObjectValue
in interface CoreConverter<DatabaseMapping,Session>
convertDataValueToObjectValue
in interface Converter
DescriptorException
public java.lang.Object convertObjectValueToDataValue(java.lang.Object attributeValue, Session session)
convertObjectValueToDataValue
in interface CoreConverter<DatabaseMapping,Session>
convertObjectValueToDataValue
in interface Converter
public void initialize(DatabaseMapping mapping, Session session)
initialize
in interface CoreConverter<DatabaseMapping,Session>
initialize
in interface Converter
protected DatabaseMapping getMapping()