|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjodd.db.type.SqlType<T>
public abstract class SqlType<T>
SQL type.
| Field Summary | |
|---|---|
protected java.lang.Class<T> |
sqlType
|
| Constructor Summary | |
|---|---|
protected |
SqlType()
|
| Method Summary | ||
|---|---|---|
abstract T |
get(java.sql.ResultSet rs,
int index,
int dbSqlType)
Returns value from result set. |
|
protected
|
prepareGetValue(T t,
java.lang.Class<E> destinationType)
Once when value is read from result set, prepare it to match destination type. |
|
|
readValue(java.sql.ResultSet rs,
int index,
java.lang.Class<E> destinationType,
int dbSqlType)
Reads value from database. |
|
abstract void |
set(java.sql.PreparedStatement st,
int index,
T value,
int dbSqlType)
Sets prepared statement value. |
|
void |
storeValue(java.sql.PreparedStatement st,
int index,
java.lang.Object value,
int dbSqlType)
Stores value in database. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.Class<T> sqlType
| Constructor Detail |
|---|
protected SqlType()
| Method Detail |
|---|
public abstract void set(java.sql.PreparedStatement st,
int index,
T value,
int dbSqlType)
throws java.sql.SQLException
java.sql.SQLException
public abstract T get(java.sql.ResultSet rs,
int index,
int dbSqlType)
throws java.sql.SQLException
rs - result setindex - column indexdbSqlType - java.sql.Types hint
java.sql.SQLException
public void storeValue(java.sql.PreparedStatement st,
int index,
java.lang.Object value,
int dbSqlType)
throws java.sql.SQLException
java.sql.SQLException
public <E> E readValue(java.sql.ResultSet rs,
int index,
java.lang.Class<E> destinationType,
int dbSqlType)
throws java.sql.SQLException
rs - result setindex - database column indexdestinationType - property typedbSqlType - hint for column sql type value
java.sql.SQLException
protected <E> E prepareGetValue(T t,
java.lang.Class<E> destinationType)
t - get valuedestinationType - destination type
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||