|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ObjectRowMapper<T extends Resource>
provides methods to convert an object to a RowItem and vice versa to facilitate persistent storage with JDBC for simple objects.
JDBCRowProxy,
BaseRowMapper| Method Summary | |
|---|---|
Object |
generateNewID()
|
String |
getIDColumnName()
|
ResultSet |
getResultSet(Filter<T> filter)
constructs the ResultSet that corresponds closesd to the filter; note that the filter may be null, in which case the select statement should return all rows. |
String |
getTableName()
generates a (blank) RowItem that tells the caller in what table to look for what value in what field to find the object. |
T |
instanciate(RowItem row)
instanciates the Resource based on the properties in the given row |
RowItem |
mapToRow(T object)
generates a RowItem containing all relevant properties, so that it can be used to store the object into the database |
| Method Detail |
|---|
Object generateNewID()
throws DatabaseException
DatabaseExceptionDBClassStore.generateNewID()
T instanciate(RowItem row)
throws InstantiationException
InstantiationExceptionString getTableName()
IllegalArgumentException - for IDs that are not allowed for a T resource.String getIDColumnName()
ResultSet getResultSet(Filter<T> filter)
throws SQLException
SQLExceptionRowItem mapToRow(T object)
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||