public final class PrimitiveLongToIntegerMapper extends Object implements TypeMapper<Long,Integer>
Long
and int
values by simply casting to
lower precision.COMPARATOR
Constructor and Description |
---|
PrimitiveLongToIntegerMapper() |
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.
|
Long |
toDatabaseType(Integer value)
Converts a value from the java domain to the database domain.
|
Integer |
toJavaType(Column column,
Class<?> entityType,
Long value)
Converts a value from the database domain to the java domain.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
identity, primitive
public String getLabel()
TypeMapper
getLabel
in interface TypeMapper<Long,Integer>
public Type getJavaType(Column column)
TypeMapper
getJavaType
in interface TypeMapper<Long,Integer>
column
- the column that is being mappedpublic Integer toJavaType(Column column, Class<?> entityType, Long value)
TypeMapper
toJavaType
in interface TypeMapper<Long,Integer>
column
- the column that is being mappedentityType
- the entity type that the mapping is forvalue
- the value to convertpublic Long toDatabaseType(Integer value)
TypeMapper
toDatabaseType
in interface TypeMapper<Long,Integer>
value
- the value to convertCopyright © 2017 Speedment, Inc.. All rights reserved.