| java.lang.Object javax.servlet.jsp.jstl.sql.ResultImpl
ResultImpl | class ResultImpl implements Result,Serializable(Code) | | This class creates a cached version of a ResultSet.
It's represented as a Result implementation, capable of
returing an array of Row objects containing a Column
instance for each column in the row. It is not part of the JSTL
API; it serves merely as a back-end to ResultSupport's static methods.
Thus, we scope its access to the package.
author: Hans Bergsten author: Justyna Horwat |
Constructor Summary | |
public | ResultImpl(ResultSet rs, int startRow, int maxRows) This constructor reads the ResultSet and saves a cached
copy. |
ResultImpl | public ResultImpl(ResultSet rs, int startRow, int maxRows) throws SQLException(Code) | | This constructor reads the ResultSet and saves a cached
copy.
It's important to note that this object will be serializable only
if the objects returned by the ResultSet are serializable too.
Parameters: rs - an open ResultSet, positioned before the firstrow Parameters: startRow - beginning row to be cached Parameters: maxRows - query maximum rows limit exception: java.sql.SQLException - if a database error occurs |
getColumnNames | public String[] getColumnNames()(Code) | | Returns an array of String objects. The array represents
the names of the columns arranged in the same order as in
the getRowsByIndex() method.
an array of String[] |
getRowCount | public int getRowCount()(Code) | | Returns the number of rows in the cached ResultSet
the number of cached rows, or -1 if the Result couldnot be initialized due to SQLExceptions |
getRows | public SortedMap[] getRows()(Code) | | Returns an array of SortedMap objects. The SortedMap
object key is the ColumnName and the value is the ColumnValue.
SortedMap was created using the CASE_INSENSITIVE_ORDER
Comparator so the key is the case insensitive representation
of the ColumnName.
an array of Map, or null if there are no rows |
getRowsByIndex | public Object[][] getRowsByIndex()(Code) | | Returns an array of Object[] objects. The first index
designates the Row, the second the Column. The array
stores the value at the specified row and column.
an array of Object[], or null if there are no rows |
isLimitedByMaxRows | public boolean isLimitedByMaxRows()(Code) | | Returns true if the query was limited by a maximum row setting
true if the query was limited by a MaxRows attribute |
|
|