public abstract class NullAwareSqlType<T> extends SqlType<T>
sql types.DB_SQLTYPE_NOT_AVAILABLE, DB_SQLTYPE_UNKNOWN, sqlType| Constructor and Description |
|---|
NullAwareSqlType() |
| Modifier and Type | Method and Description |
|---|---|
<E> E |
readValue(java.sql.ResultSet rs,
int index,
java.lang.Class<E> destinationType,
int dbSqlType)
Detects if there was a
null reading and returns null if it was. |
void |
storeValue(java.sql.PreparedStatement st,
int index,
java.lang.Object value,
int dbSqlType)
Detects
null before storing the value into the database. |
get, prepareGetValue, setpublic <E> E readValue(java.sql.ResultSet rs,
int index,
java.lang.Class<E> destinationType,
int dbSqlType)
throws java.sql.SQLException
null reading and returns null if it was.
Result set returns default value (e.g. 0) for many getters, therefore it detects if it was
a null reading or it is a real value.public void storeValue(java.sql.PreparedStatement st,
int index,
java.lang.Object value,
int dbSqlType)
throws java.sql.SQLException
null before storing the value into the database.storeValue in class SqlType<T>java.sql.SQLExceptionCopyright © 2003-present Jodd Team