|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsqlwrapper.QueryResult
public class QueryResult
Implementation of the query ResultSet that supports pageable query for handling large data sets that does not fit into the memory.
Field Summary | |
---|---|
private java.sql.ResultSet |
currentPage
|
private int |
currentPageInd
|
private java.util.ArrayList |
currentRecord
|
private int |
currentRecordInd
|
private int |
numberOfPages
|
private int |
numCols
|
private boolean |
pageLoaded
|
private int |
pageSize
|
private java.lang.String |
query
|
private int |
recordCount
|
private java.sql.Statement |
stat
|
Constructor Summary | |
---|---|
QueryResult(java.sql.Statement stat,
java.lang.String sql)
Class constructor |
Method Summary | |
---|---|
boolean |
hasNext()
Returns false if resutSet pointer reaches the end of the set, returns true otherwise. |
java.lang.Object |
next()
Extract the next data from the resultSet. |
void |
nextPage()
Next page is retrieved from disk to memory |
void |
remove()
|
void |
setPageSize(int pageSize)
Set the maximum number of tuples that resides in a page |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.lang.String query
private java.sql.Statement stat
private int currentRecordInd
private int currentPageInd
private java.util.ArrayList currentRecord
private int recordCount
private int numCols
private int pageSize
private int numberOfPages
private boolean pageLoaded
private java.sql.ResultSet currentPage
Constructor Detail |
---|
public QueryResult(java.sql.Statement stat, java.lang.String sql) throws java.sql.SQLException
stat
- Statement object for executing sql querysql
- SQL query
java.sql.SQLException
Method Detail |
---|
public boolean hasNext()
hasNext
in interface java.util.Iterator
public java.lang.Object next()
next
in interface java.util.Iterator
public void nextPage() throws java.sql.SQLException
java.sql.SQLException
public void setPageSize(int pageSize)
pageSize
- number of tuplespublic void remove()
remove
in interface java.util.Iterator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |