T - The actual java type for this SQL type.E - The read java type for this SQL type.public interface SQLType<T,E>
| Modifier and Type | Field and Description |
|---|---|
static SQLType<Boolean,Boolean> |
BOOLEAN
A boolean SQL type.
|
static SQLType<Character,Character> |
CHAR
A char SQL type.
|
static SQLType<Integer,Integer> |
INTEGER
An integer SQL type.
|
static SQLType<Long,Long> |
LONG
A long SQL type.
|
static SQLType<Short,Short> |
SHORT
A short SQL type.
|
static SQLType<String,String> |
STRING
An string SQL type.
|
| Modifier and Type | Method and Description |
|---|---|
Expression<T,E> |
asParam()
Gets an SQL param out of this type.
|
Class<E> |
getJavaReadType()
The read java type.
|
Class<T> |
getJavaType()
The actual java type.
|
JDBCType |
getJDBCType()
The JDBC type.
|
int |
getLength()
The length for string and numerical types.
|
SQLValueParser<T,E> |
getParser()
Gets the parser used by this type.
|
int |
getPrecision()
The precision for numerical types.
|
SQLValueWriter<E,T> |
getWriter()
The writer used by this type.
|
T |
parse(E object)
Parses the given object to the final java type.
|
E |
read(Object object)
Reads the raw object given to the read object, so it can be parsed.
|
E |
write(T object)
Writes the given object to the database object.
|
JDBCType getJDBCType()
int getLength()
int getPrecision()
Expression<T,E> asParam()
SQLValueParser<T,E> getParser()
SQLValueWriter<E,T> getWriter()
T parse(E object) throws SQLException
object - The raw database object.SQLException - If any SQL error occursE read(Object object) throws SQLException
object - The raw object.SQLException - If any SQL error occursCopyright © 2015–2018 Bridje Framework. All rights reserved.