com.agimatec.sql.query
Class StringResultBuilder
java.lang.Object
com.agimatec.sql.query.StringResultBuilder
- All Implemented Interfaces:
- JdbcResultBuilder
public class StringResultBuilder
- extends Object
- implements JdbcResultBuilder
Description: QueryResultVisitor that can be used
for queries that return an answer set with one String column, e.g.
useful for SELECT Name ... statements with one or multiple result rows.
- Author:
- Roman Stumm
|
Method Summary |
void |
afterExecute(ResultSetMetaData data,
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 row)
fetch the next row that contains one String column. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
result
protected List<String> result
StringResultBuilder
public StringResultBuilder()
afterExecute
public void afterExecute(ResultSetMetaData data,
Object queryObject,
List resultList)
- 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:
data - JDBC result set meta data.resultList - The List where the result objects are added to.
fetch
public void fetch(ResultSet row)
throws SQLException
- fetch the next row that contains one String column.
- Specified by:
fetch in interface JdbcResultBuilder
- Parameters:
row - 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-2012. All Rights Reserved.