DB_TYPE
- the type as it is represented in the JDBC driverJAVA_TYPE
- the type as it should be represented in generated codepublic interface TypeMapper<DB_TYPE,JAVA_TYPE>
TypeMapperComponent
.Modifier and Type | Field and Description |
---|---|
static Comparator<TypeMapper<?,?>> |
COMPARATOR
The standard comparator to use for instances of the
TypeMapper
interface. |
Modifier and Type | Method and Description |
---|---|
Class<DB_TYPE> |
getDatabaseType()
Returns the type as it is represented in the JDBC driver.
|
Class<JAVA_TYPE> |
getJavaType()
Returns the type as it should be represented in generated code.
|
default String |
getLabel()
Returns the label for this mapper that should appear to the end user.
|
default boolean |
isApproximation()
Returns if this mapper may use an approximation when converting from one
form to the other.
|
boolean |
isIdentityMapper()
Returns if this is an identity mapper.
|
DB_TYPE |
toDatabaseType(JAVA_TYPE value)
Converts a value from the java domain to the database domain.
|
JAVA_TYPE |
toJavaType(DB_TYPE value)
Converts a value from the database domain to the java domain.
|
static final Comparator<TypeMapper<?,?>> COMPARATOR
TypeMapper
interface. This comparator will use the name of the database type as
comparison index and if two mappers share the same database type, it will
use the label in alphabetical order.default String getLabel()
Class<JAVA_TYPE> getJavaType()
Class<DB_TYPE> getDatabaseType()
JAVA_TYPE toJavaType(DB_TYPE value)
value
- the value to convertDB_TYPE toDatabaseType(JAVA_TYPE value)
value
- the value to convertboolean isIdentityMapper()
String
to String
is an indentity mapper.true
if identity mapper, else false
default boolean isApproximation()
Copyright © 2016 Speedment, Inc.. All rights reserved.