public class SerializedObjectConverter extends 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 |
---|---|
Object |
convertDataValueToObjectValue(Object fieldValue,
Session session)
INTERNAL:
The fieldValue will be a byte array.
|
Object |
convertObjectValueToDataValue(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 Object convertDataValueToObjectValue(Object fieldValue, Session session) throws DescriptorException
convertDataValueToObjectValue
in interface CoreConverter<DatabaseMapping,Session>
convertDataValueToObjectValue
in interface Converter
DescriptorException
public Object convertObjectValueToDataValue(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