Class SerializableStringConverter
- java.lang.Object
-
- org.datanucleus.store.types.converters.SerializableStringConverter
-
- All Implemented Interfaces:
java.io.Serializable,TypeConverter<java.io.Serializable,java.lang.String>
public class SerializableStringConverter extends java.lang.Object implements TypeConverter<java.io.Serializable,java.lang.String>
Convenience class to handle Java serialisation of a Serializable object to/from String. Of use where a datastore allows persistence of String types, but not serialised types.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description SerializableStringConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringtoDatastoreType(java.io.Serializable memberValue)Method to convert the passed member value to the datastore type.java.io.SerializabletoMemberType(java.lang.String datastoreValue)Method to convert the passed datastore value to the member type.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Method Detail
-
toDatastoreType
public java.lang.String toDatastoreType(java.io.Serializable memberValue)
Description copied from interface:TypeConverterMethod to convert the passed member value to the datastore type.- Specified by:
toDatastoreTypein interfaceTypeConverter<java.io.Serializable,java.lang.String>- Parameters:
memberValue- Value from the member- Returns:
- Value for the datastore
-
toMemberType
public java.io.Serializable toMemberType(java.lang.String datastoreValue)
Description copied from interface:TypeConverterMethod to convert the passed datastore value to the member type.- Specified by:
toMemberTypein interfaceTypeConverter<java.io.Serializable,java.lang.String>- Parameters:
datastoreValue- Value from the datastore- Returns:
- Value for the member
-
-