Package io.ebeaninternal.server.type
Class LongToTimestampConverter
- java.lang.Object
-
- io.ebeaninternal.server.type.LongToTimestampConverter
-
- All Implemented Interfaces:
ScalarTypeConverter<Long,Timestamp>
public class LongToTimestampConverter extends Object implements ScalarTypeConverter<Long,Timestamp>
-
-
Constructor Summary
Constructors Constructor Description LongToTimestampConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Long
getNullValue()
Return the value to represent null.Timestamp
unwrapValue(Long beanType)
Convert the value object into a scalar value that Ebean knows how to persist.Long
wrapValue(Timestamp scalarType)
Convert the scalar type value into the value object.
-
-
-
Constructor Detail
-
LongToTimestampConverter
public LongToTimestampConverter()
-
-
Method Detail
-
getNullValue
public Long getNullValue()
Description copied from interface:ScalarTypeConverter
Return the value to represent null. Typically this is actually null but for scala.Option and similar type converters this actually returns an instance representing "None".- Specified by:
getNullValue
in interfaceScalarTypeConverter<Long,Timestamp>
-
unwrapValue
public Timestamp unwrapValue(Long beanType)
Description copied from interface:ScalarTypeConverter
Convert the value object into a scalar value that Ebean knows how to persist.This typically occurs when Ebean is persisting the value object to the data store.
- Specified by:
unwrapValue
in interfaceScalarTypeConverter<Long,Timestamp>
- Parameters:
beanType
- the value object
-
wrapValue
public Long wrapValue(Timestamp scalarType)
Description copied from interface:ScalarTypeConverter
Convert the scalar type value into the value object.This typically occurs when Ebean reads the value from a resultSet or other data source.
- Specified by:
wrapValue
in interfaceScalarTypeConverter<Long,Timestamp>
- Parameters:
scalarType
- the value from the data source
-
-