|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ExecuteResultHandler
This interface is used to handle results when executing custom SQL code. It
is passed in to an SQLExecutor and when as the executor runs the SQL, it will
call the methods on this handler as results are coming in.
If you don't need all methods of this interface, you can extend the
ExecuteResultHandlerAdapter instead.
ExecuteResultHandlerAdapter| Method Summary | |
|---|---|
int |
getMaxRowsToFetch()
This method is called just before the query is sent to the database, setting the property on the Statement which limits the number of rows we want back. |
boolean |
nextResultSet()
This method is called in a multi result set query after one result set have been read and another one is coming. |
boolean |
nextRow(Object[] row)
The callback is called once for every row returned by a result set. |
void |
onDone()
This method is called when all processing of the query is done and the statement is about to be closed. |
void |
onGeneratedKey(Object object)
When a key has been generated on the server by the query, this callback is called with that value |
void |
onResultSet(List<String> columnNames,
List<Integer> columnTypes)
This callback is invoked when a new result set is read from the server, if the result set contains any rows they will appear in subsequent calls to the nextRow(Object[] row) callback. |
void |
onUpdateCount(int updateCount)
Callback called for queries that updated rows |
void |
onWarning(SQLWarning warning)
Callback called for every SQLWarning the server sent for the query |
| Method Detail |
|---|
int getMaxRowsToFetch()
void onResultSet(List<String> columnNames,
List<Integer> columnTypes)
columnNames - List of all column namescolumnTypes - List of all column types (see java.sql.Types)boolean nextRow(Object[] row)
row - All the values of the row
boolean nextResultSet()
void onUpdateCount(int updateCount)
updateCount - Number of rows affected by the query, as reported by
the servervoid onGeneratedKey(Object object)
object - Generated key valuevoid onWarning(SQLWarning warning)
warning - SQLWarning from the servervoid onDone()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||