Class LocalTimeStringConverter
java.lang.Object
org.datanucleus.store.types.converters.LocalTimeStringConverter
- All Implemented Interfaces:
Serializable
,ColumnLengthDefiningTypeConverter
,TypeConverter<LocalTime,
String>
public class LocalTimeStringConverter
extends Object
implements TypeConverter<LocalTime,String>, ColumnLengthDefiningTypeConverter
Class to handle the conversion between java.time.LocalTime and a String form.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getDefaultColumnLength
(int columnPosition) Accessor for the default column length to use for the datastore column at the specified position.toDatastoreType
(LocalTime date) Method to convert the passed member value to the datastore type.toMemberType
(String str) Method to convert the passed datastore value to the member type.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
-
Constructor Details
-
LocalTimeStringConverter
public LocalTimeStringConverter()
-
-
Method Details
-
toMemberType
Description copied from interface:TypeConverter
Method to convert the passed datastore value to the member type.- Specified by:
toMemberType
in interfaceTypeConverter<LocalTime,
String> - Parameters:
str
- Value from the datastore- Returns:
- Value for the member
-
toDatastoreType
Description copied from interface:TypeConverter
Method to convert the passed member value to the datastore type.- Specified by:
toDatastoreType
in interfaceTypeConverter<LocalTime,
String> - Parameters:
date
- 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)
-