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