|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.cjdbc.controller.virtualdatabase.ControllerResultSet
A ControllerResultSet
is a lightweight ResultSet for the
controller side. It only contains row data and column metadata. The real
ResultSet is constructed on by the driver on the client side from the
ControllerResultSet information.
DriverResultSet
,
Serialized FormField Summary | |
private java.lang.String |
cursorName
Cursor name for this ResultSet (not used yet) |
private java.util.ArrayList |
data
The results |
private java.sql.ResultSet |
dbResultSet
Database ResultSet if we need to fetch data later on |
private boolean |
dbResultSetClosed
True if the underlying database ResultSet is closed |
private int |
fetchSize
Fetch size if we need to fetch only a subset of the ResultSet |
private Field[] |
fields
The fields |
private boolean |
hasMoreData
True if there is still more data to fetch from dbResultSet |
private int |
maxRows
Maximum number of rows remaining to fetch |
private java.sql.Statement |
owningStatement
Optional statement dbResultSet is attached to if in streaming mode |
Constructor Summary | |
ControllerResultSet(AbstractRequest request,
java.sql.ResultSet rs,
MetadataCache metadataCache,
java.sql.Statement s)
Build a C-JDBC ResultSet from a database specific ResultSet. |
Method Summary | |
void |
closeResultSet()
Closes the database ResultSet to release the resource and garbage collect data. |
java.util.ArrayList |
fetchData()
Fetch the next rows of data from dbResultSet according to fetchSize and maxRows parameters. |
java.util.ArrayList |
fetchData(int fetchSize)
Sets the fetch size and calls fetchData() |
java.lang.String |
getCursorName()
Get the name of the SQL cursor used by this ResultSet |
java.util.ArrayList |
getData()
Returns the data value. |
Field[] |
getFields()
Returns the fields value. |
boolean |
hasMoreData()
Returns the hasMoreData value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.util.ArrayList data
private Field[] fields
private java.lang.String cursorName
private int fetchSize
private java.sql.ResultSet dbResultSet
private java.sql.Statement owningStatement
private boolean dbResultSetClosed
private boolean hasMoreData
private int maxRows
Constructor Detail |
public ControllerResultSet(AbstractRequest request, java.sql.ResultSet rs, MetadataCache metadataCache, java.sql.Statement s) throws java.sql.SQLException
The statement used to execute the query will be closed when the ResultSet has been completely copied or when the ResultSet is closed while in streaming mode.
request
- Request to which this ResultSet belongsrs
- The database specific ResultSetmetadataCache
- MetadataCache (null if none)s
- Statement used to get rs
java.sql.SQLException
- if an error occursMethod Detail |
public java.util.ArrayList fetchData(int fetchSize) throws java.sql.SQLException
fetchSize
- the number of rows to fetch
java.sql.SQLException
- if an error occursfetchData()
public java.util.ArrayList fetchData() throws java.sql.SQLException
java.sql.SQLException
- if an error occurspublic java.util.ArrayList getData()
public Field[] getFields()
public java.lang.String getCursorName()
public boolean hasMoreData()
public void closeResultSet()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |