public class ResultImpl
extends java.lang.Object
implements javax.servlet.jsp.jstl.sql.Result
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.
Note -- this is a private copy for the RI to avoid making the corresponding class in javax.servlet.* public.
Constructor and Description |
---|
ResultImpl(java.sql.ResultSet rs)
Build a
Result object from a ResultSet object. |
ResultImpl(java.sql.ResultSet rs,
int maxRows)
Build a
Result object from a ResultSet object. |
ResultImpl(java.sql.ResultSet rs,
int startRow,
int maxRows)
This constructor reads the ResultSet and saves a cached
copy.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
getColumnNames()
Returns an array of String objects.
|
int |
getRowCount()
Returns the number of rows in the cached ResultSet
|
java.util.SortedMap[] |
getRows()
Returns an array of SortedMap objects.
|
java.lang.Object[][] |
getRowsByIndex()
Returns an array of Object[] objects.
|
boolean |
isLimitedByMaxRows()
Returns true of the query was limited by a maximum row setting
|
public ResultImpl(java.sql.ResultSet rs) throws java.sql.SQLException
Result
object from a ResultSet
object.rs
- an open ResultSet, positioned before the first rowjava.sql.SQLException
- if a database error occurspublic ResultImpl(java.sql.ResultSet rs, int maxRows) throws java.sql.SQLException
Result
object from a ResultSet
object.rs
- an open ResultSet, positioned before the first rowmaxRows
- query maximum rows limitjava.sql.SQLException
- if a database error occurspublic ResultImpl(java.sql.ResultSet rs, int startRow, int maxRows) throws java.sql.SQLException
rs
- an open ResultSet, positioned before the first
rowstartRow
- beginning row to be cachedmaxRows
- query maximum rows limitjava.sql.SQLException
- if a database error occurspublic java.util.SortedMap[] getRows()
getRows
in interface javax.servlet.jsp.jstl.sql.Result
public java.lang.Object[][] getRowsByIndex()
getRowsByIndex
in interface javax.servlet.jsp.jstl.sql.Result
public java.lang.String[] getColumnNames()
getColumnNames
in interface javax.servlet.jsp.jstl.sql.Result
public int getRowCount()
getRowCount
in interface javax.servlet.jsp.jstl.sql.Result
public boolean isLimitedByMaxRows()
isLimitedByMaxRows
in interface javax.servlet.jsp.jstl.sql.Result
Copyright © 2014–2020. All rights reserved.