public final class IntEpochDaysToLocalDateMapper extends Object implements TypeMapper<Integer,LocalDate>
TypeMapper
that takes a date specified as a number
of days since the unix epoch start.TypeMapper.Category, TypeMapper.Ordering
COMPARATOR
Constructor and Description |
---|
IntEpochDaysToLocalDateMapper() |
Modifier and Type | Method and Description |
---|---|
Type |
getJavaType(Column column)
Returns a type describing the resulting java type when this mapper is
applied to a database result.
|
String |
getLabel()
Returns the label for this mapper that should appear to the end user.
|
TypeMapper.Ordering |
getOrdering()
Returns how the
TypeMapper.Ordering of mapped and un-mapped types relate
to each other. |
Integer |
toDatabaseType(LocalDate value)
Converts a value from the java domain to the database domain.
|
LocalDate |
toJavaType(Column column,
Class<?> entityType,
Integer value)
Converts a value from the database domain to the java domain.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getJavaTypeCategory, identity, primitive
public String getLabel()
TypeMapper
getLabel
in interface TypeMapper<Integer,LocalDate>
public Type getJavaType(Column column)
TypeMapper
getJavaType
in interface TypeMapper<Integer,LocalDate>
column
- the column that is being mappedpublic LocalDate toJavaType(Column column, Class<?> entityType, Integer value)
TypeMapper
toJavaType
in interface TypeMapper<Integer,LocalDate>
column
- the column that is being mappedentityType
- the entity type that the mapping is forvalue
- the value to convertpublic Integer toDatabaseType(LocalDate value)
TypeMapper
toDatabaseType
in interface TypeMapper<Integer,LocalDate>
value
- the value to convertpublic TypeMapper.Ordering getOrdering()
TypeMapper
TypeMapper.Ordering
of mapped and un-mapped types relate
to each other.
Speedment is using this method to determine if certain optimizations of streams can be made. Make sure to implicitly specify the Ordering in any custom TypeMapper to allow maximum execution speed.
Specifying TypeMapper.Ordering.UNSPECIFIED
prevents some optimizations so
if possible, write a TypeMapper that RETAINS ordering.
getOrdering
in interface TypeMapper<Integer,LocalDate>
TypeMapper.Ordering.RETAIN
,
TypeMapper.Ordering.INVERT
,
TypeMapper.Ordering.UNSPECIFIED
Copyright © 2018 Speedment, Inc.. All rights reserved.