- java.lang.Object
-
- org.datanucleus.store.types.converters.TimeZoneStringConverter
-
- All Implemented Interfaces:
Serializable
,ColumnLengthDefiningTypeConverter
,TypeConverter<TimeZone,String>
public class TimeZoneStringConverter extends Object implements TypeConverter<TimeZone,String>, ColumnLengthDefiningTypeConverter
Class to handle the conversion between java.util.TimeZone and a String form.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TimeZoneStringConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getDefaultColumnLength(int columnPosition)
Accessor for the default column length to use for the datastore column at the specified position.String
toDatastoreType(TimeZone tz)
Method to convert the passed member value to the datastore type.TimeZone
toMemberType(String str)
Method to convert the passed datastore value to the member type.
-
-
-
Method Detail
-
toMemberType
public TimeZone toMemberType(String str)
Description copied from interface:TypeConverter
Method to convert the passed datastore value to the member type.- Specified by:
toMemberType
in interfaceTypeConverter<TimeZone,String>
- Parameters:
str
- Value from the datastore- Returns:
- Value for the member
-
toDatastoreType
public String toDatastoreType(TimeZone tz)
Description copied from interface:TypeConverter
Method to convert the passed member value to the datastore type.- Specified by:
toDatastoreType
in interfaceTypeConverter<TimeZone,String>
- Parameters:
tz
- Value from the member- Returns:
- Value for the datastore
-
getDefaultColumnLength
public int getDefaultColumnLength(int columnPosition)
Description copied from interface:ColumnLengthDefiningTypeConverter
Accessor for the default column length to use for the datastore column at the specified position.- Specified by:
getDefaultColumnLength
in interfaceColumnLengthDefiningTypeConverter
- Parameters:
columnPosition
- Position of the column being enquired about (0 = first)- Returns:
- The column length (-1 if no preference)
-
-