|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IResultSetProcessor
Represents a processor capable of initializing and processing a
ResultSet, and returning a result afterwards.
In most cases it is easiest to extend the ResultSetProcessorBase
which has empty implementations for all methods. Then you only
have to override the methods you need special behaviour in.
Typically that will be the process method.
Method Summary | |
---|---|
java.lang.Object |
getResult()
Returns the result of the total processing. |
void |
init(java.sql.ResultSet result)
Initializes the ResultSet. |
void |
process(java.sql.ResultSet result,
IDaos daos)
Processes a record in the ResultSet. |
Method Detail |
---|
void init(java.sql.ResultSet result) throws java.sql.SQLException, PersistenceException
result
- The ResultSet to initialize.
java.sql.SQLException
- If the intialization fails.
PersistenceException
- If something else fails during initialization.void process(java.sql.ResultSet result, IDaos daos) throws java.sql.SQLException, PersistenceException
result
- The ResultSet to process the record of.daos
- The IDaos instance where the IJdbcDao that called this method belongs to.
Use it to, for instance, read an object from the current record using
the IGenericDao.read(objectMappingKey, ResultSet).
java.sql.SQLException
- If something fails in the driver during the processing of the current record.
PersistenceException
- If something else fails during the processing.java.lang.Object getResult() throws PersistenceException
PersistenceException
- If for some reason the returning of the result fails.
This could be if the getResult() method builds a complex object from
records read, and that this somehow fails (missing records, or invalid values).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |