org.arch4j.dataaccess.visitors
Class IntResultSetAdapter
java.lang.Object
|
+--org.arch4j.dataaccess.visitors.ResultSetAdapter
|
+--org.arch4j.dataaccess.visitors.IntResultSetAdapter
- All Implemented Interfaces:
- ResultSetVisitor
- public class IntResultSetAdapter
- extends ResultSetAdapter
This class is a convenience result set adapter for when only one int
value will be returned.
Since there is no way to represent the equivalent of a null
value for a primitive,
an unset or error value will be represented by the infrequently used minimum integer value:
Integer.MIN_VALUE
.
- Version:
- 1.0
- Author:
- Ross E. Greinke
Method Summary |
int |
getResult()
Returns the result of the query. |
boolean |
isErrorValue()
Returns whether the result is the unset/error value. |
boolean |
processNextRow(ResultSet aResultSet)
Process the next row of the SQL query. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IntResultSetAdapter
public IntResultSetAdapter()
processNextRow
public boolean processNextRow(ResultSet aResultSet)
- Process the next row of the SQL query. The default is to just keep processing each row.
- Specified by:
processNextRow
in interface ResultSetVisitor
- Overrides:
processNextRow
in class ResultSetAdapter
- Parameters:
aResultSet
- The result set to process. The cursor is in the proper position.
- Returns:
- true if the processor should keep spinning through the result set.
getResult
public int getResult()
- Returns the result of the query.
- Returns:
- The result of the query, an
int
.
isErrorValue
public boolean isErrorValue()
- Returns whether the result is the unset/error value.
- Returns:
true
if the result is the unset/error value.
Copyright © 2000-2004 SpiderLogic, a service of Wipfli Ullrich Bertelson LLP.