com.agimatec.sql.query
Class ArrayResultBuilder
java.lang.Object
com.agimatec.sql.query.ArrayResultBuilder
- All Implemented Interfaces:
- JdbcResultBuilder
public class ArrayResultBuilder
- extends Object
- implements JdbcResultBuilder
Default QueryResultVisitor that creates Object[] with the row data.
This class is neither thread-safe, nor stateless.
|
Method Summary |
void |
afterExecute(ResultSetMetaData rsmData,
Object queryObject,
List resultList)
The init() method is called once after the SQL statement has been
executed and the result set is known. |
void |
close(boolean isComplete)
The close() method is invoked, just BEFORE all associated resources (e.g. resultSet)
are closed by the caller. |
void |
fetch(ResultSet resultSet)
create an Object[] with the data from the resultSet. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
numCols
protected int numCols
result
protected List result
colTypes
protected int[] colTypes
row
protected Object[] row
ArrayResultBuilder
public ArrayResultBuilder()
afterExecute
public void afterExecute(ResultSetMetaData rsmData,
Object queryObject,
List resultList)
throws SQLException
- Description copied from interface:
JdbcResultBuilder
- The init() method is called once after the SQL statement has been
executed and the result set is known.
- Specified by:
afterExecute in interface JdbcResultBuilder
- Parameters:
rsmData - JDBC result set meta data.resultList - The List where the result objects are added to.
- Throws:
SQLException
fetch
public void fetch(ResultSet resultSet)
throws SQLException
- create an Object[] with the data from the resultSet.
add one Object[] to the result List.
- Specified by:
fetch in interface JdbcResultBuilder
- Parameters:
resultSet - the ResultSet where the cursor is located on the current row
- Throws:
SQLException
close
public void close(boolean isComplete)
- Description copied from interface:
JdbcResultBuilder
- The close() method is invoked, just BEFORE all associated resources (e.g. resultSet)
are closed by the caller. The close() method is the last callback to the visitor
that allows to add pending results to the result list and to close own resources.
- Specified by:
close in interface JdbcResultBuilder
Copyright © 2008-2011. All Rights Reserved.