|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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
Backend ResultSet. |
private boolean |
dbResultSetClosed
True if the underlying database ResultSet is closed |
(package private) DriverResultSet |
driverResultSet
When streaming, hold a reference to the DriverResultSet we built so we don't have to re-compute everything. |
private static java.util.ArrayList |
EMPTY_LIST
|
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. |
void |
fetchData()
Fetch the next rows of data from dbResultSet according to fetchSize and maxRows parameters. |
void |
fetchData(int fetchSizeParam)
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 static final java.util.ArrayList EMPTY_LIST
private java.util.ArrayList data
private Field[] fields
private java.lang.String cursorName
private int fetchSize
private transient java.sql.ResultSet dbResultSet
private transient java.sql.Statement owningStatement
private boolean dbResultSetClosed
private boolean hasMoreData
private int maxRows
DriverResultSet driverResultSet
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 void fetchData(int fetchSizeParam) throws java.sql.SQLException
fetchSizeParam
- the number of rows to fetch
java.sql.SQLException
- if an error occursfetchData()
public void fetchData() throws java.sql.SQLException
java.sql.SQLException
- from the backend or if dbResultSet is closed. Maybe
we should use a different type internally.public 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 |