jodd.db.type
Class NullAwareSqlType<T>
java.lang.Object
jodd.db.type.SqlType<T>
jodd.db.type.NullAwareSqlType<T>
- Direct Known Subclasses:
- BooleanSqlType, ByteSqlType, CharacterSqlType, DoubleSqlType, FloatSqlType, IntegerSqlType, LongSqlType, ShortSqlType
public abstract class NullAwareSqlType<T>
- extends SqlType<T>
Null-aware sql types.
|
Method Summary |
|
readValue(java.sql.ResultSet rs,
int index,
java.lang.Class<E> destinationType,
int dbSqlType)
Detects if there was a null reading, never less the real value. |
void |
storeValue(java.sql.PreparedStatement st,
int index,
java.lang.Object value,
int dbSqlType)
Detects null while storing value into the database. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NullAwareSqlType
public NullAwareSqlType()
readValue
public <E> E readValue(java.sql.ResultSet rs,
int index,
java.lang.Class<E> destinationType,
int dbSqlType)
throws java.sql.SQLException
- Detects if there was a
null reading, never less the real value.
- Overrides:
readValue in class SqlType<T>
- Parameters:
rs - result setindex - database column indexdestinationType - property typedbSqlType - hint for column sql type value
- Throws:
java.sql.SQLException
storeValue
public void storeValue(java.sql.PreparedStatement st,
int index,
java.lang.Object value,
int dbSqlType)
throws java.sql.SQLException
- Detects
null while storing value into the database.
- Overrides:
storeValue in class SqlType<T>
- Throws:
java.sql.SQLException
Copyright © 2003-2010 Jodd Team