Package com.saperion.common.sql
Interface ResultReader<E extends Exception>
- Type Parameters:
E- type of Business-Exceptions, thereadResult(ResultSet)-method may throw
public interface ResultReader<E extends Exception>
A ResultReader reads the results of a ResultSet during an
DataSource.executeQuery(String, ResultReader)-operation.
- Author:
- agz
-
Method Summary
Modifier and TypeMethodDescriptionintreadResult(ResultSet resultSet) Reads the results of aResultSetduring anDataSource.executeQuery(String, ResultReader)-operation, treats them or stores them somewhere and returns the count of rows.
-
Method Details
-
readResult
Reads the results of aResultSetduring anDataSource.executeQuery(String, ResultReader)-operation, treats them or stores them somewhere and returns the count of rows. The possibleSQLExceptions during read-operations on theResultSetneed not be catched. They will be treated by the enclosingDataSource.executeQuery(String, ResultReader)-operation.- Parameters:
resultSet- theResultSetto read the results from.- Returns:
- count of selected rows
- Throws:
SQLException- on errors reading theResultSetE- on other business-logic errors
-