|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.portals.gems.browser.DatabaseBrowserIterator
A class for iterating over the window. The window constitutes the selection of rows being displayed to the user from the List storing all the ResultSet.
| Field Summary | |
(package private) boolean |
ascendingOrder
|
(package private) int |
bottom
|
(package private) int |
index
|
protected org.apache.commons.logging.Log |
log
Static initialization of the logger for this class |
(package private) List |
rsList
|
(package private) int |
rsListSize
|
(package private) List |
rsTitleList
|
(package private) List |
rsTypeList
|
private static long |
serialVersionUID
|
(package private) String |
sortColumnName
|
(package private) int |
top
|
private static String |
VELOCITY_NULL_ENTRY
|
(package private) int |
windowSize
|
| Constructor Summary | |
DatabaseBrowserIterator(List result,
List columnTitles,
List columnTypes,
int pageSize)
Constructor for the database browser iterator |
|
| Method Summary | |
int |
compare(Object obj1,
Object obj2)
|
boolean |
getAscendingOrder()
|
int |
getBottom()
This method returns the last index of the row in the window displayed. |
List |
getResultSet()
This method returns the result set. |
int |
getResultSetSize()
This method returns the number of rows in the result set. |
List |
getResultSetTitleList()
This method returns the List containg the column labels of the result set. |
List |
getResultSetTypesList()
This method returns the List containg the column type names of the result set. |
int |
getTop()
This method returns the index of the row to which the cursor is pointing at. |
int |
getWindowSize()
This method returns the window size. |
boolean |
hasNext()
Returns true if the iteration has more elements |
Object |
next()
Returns the next element in the iteration |
void |
remove()
Logs as info - since remove operation is not supported by this Iterator. |
private void |
setBottom()
This method sets the bottom based on which index the cursor points to and the size of the result set. |
void |
setTop(int start)
This method points the cursor to the index provided. |
void |
sort(String columnName)
This method sorts the result set according to the value of the column as specified by the parameter column name. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Comparator |
equals |
| Field Detail |
private static final long serialVersionUID
protected transient org.apache.commons.logging.Log log
private static final String VELOCITY_NULL_ENTRY
int top
int index
int bottom
int windowSize
int rsListSize
boolean ascendingOrder
String sortColumnName
List rsList
List rsTitleList
List rsTypeList
| Constructor Detail |
public DatabaseBrowserIterator(List result,
List columnTitles,
List columnTypes,
int pageSize)
result - The List containg all the rows from the resultSet.columnTitles - The List containg all the columnLabels from a resultSet.pageSize - The number of rows to be displayed in a window configured by
the user.| Method Detail |
public List getResultSet()
getResultSet in interface BrowserIteratorpublic int getResultSetSize()
getResultSetSize in interface BrowserIteratorpublic List getResultSetTitleList()
getResultSetTitleList in interface BrowserIteratorpublic List getResultSetTypesList()
getResultSetTypesList in interface BrowserIteratorTypespublic int getTop()
getTop in interface BrowserIteratorpublic void setTop(int start)
setTop in interface BrowserIteratorstart - Index to which cursor should point topublic int getBottom()
getBottom in interface BrowserIteratorpublic int getWindowSize()
getWindowSize in interface BrowserIteratorprivate void setBottom()
public boolean hasNext()
hasNext in interface Iteratorpublic Object next()
next in interface Iteratorpublic void remove()
remove in interface Iteratorpublic void sort(String columnName)
sort in interface BrowserIterator
public int compare(Object obj1,
Object obj2)
compare in interface Comparatorpublic boolean getAscendingOrder()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||