Class PeriodComponentsConverter
- java.lang.Object
-
- org.datanucleus.store.types.converters.PeriodComponentsConverter
-
- All Implemented Interfaces:
Serializable,MultiColumnConverter,TypeConverter<Period,int[]>
public class PeriodComponentsConverter extends Object implements TypeConverter<Period,int[]>, MultiColumnConverter
Class to handle the conversion between java.time.Period and int[] (year, month and day).- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PeriodComponentsConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class[]getDatastoreColumnTypes()Accessor for the java types of the datastore columns.int[]toDatastoreType(Period p)Method to convert the passed member value to the datastore type.PeriodtoMemberType(int[] vals)Method to convert the passed datastore value to the member type.
-
-
-
Method Detail
-
toMemberType
public Period toMemberType(int[] vals)
Description copied from interface:TypeConverterMethod to convert the passed datastore value to the member type.- Specified by:
toMemberTypein interfaceTypeConverter<Period,int[]>- Parameters:
vals- Value from the datastore- Returns:
- Value for the member
-
toDatastoreType
public int[] toDatastoreType(Period p)
Description copied from interface:TypeConverterMethod to convert the passed member value to the datastore type.- Specified by:
toDatastoreTypein interfaceTypeConverter<Period,int[]>- Parameters:
p- Value from the member- Returns:
- Value for the datastore
-
getDatastoreColumnTypes
public Class[] getDatastoreColumnTypes()
Description copied from interface:MultiColumnConverterAccessor for the java types of the datastore columns.- Specified by:
getDatastoreColumnTypesin interfaceMultiColumnConverter- Returns:
- The java types of the columns
-
-