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