|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jcorporate.expresso.core.misc.RecordPaginator
Copyright: Copyright (c) 2001-2002 JCorporate Ltd.
This class takes care of the low-level logic for when dealing
with "e;pages"e; of data. It is used in the Download Controller
to allow paging through masses of download files, as well as in DBMaint for
paging through the data records.
| Constructor Summary | |
RecordPaginator()
|
|
| Method Summary | |
int |
getEndRecordNumber()
Returns the end record number for a particular page. |
int |
getPageCount()
Get the number of pages [using recorg pagination] that exist for this record. |
int |
getPageNumber()
|
int |
getStartRecordNumber()
Modified code based upon xin lee. |
long |
getTotalRecordCount()
Returns the total record count retrieved for this database search |
boolean |
isCountRecords()
Returns true if the system is expected to get the total record count. |
boolean |
isMoreRecords()
|
boolean |
isPreviousRecords()
|
ArrayList |
searchAndRetrieve(DataObject searchCriteria,
String sortKey)
Returns a search and retrieve list from the DBObject who's criteria you have set. |
List |
searchAndRetrieve(MultiDBObject searchCriteria,
String sortKey)
Returns a search and retrieve list from the DBObject who's criteria you have set. |
void |
setCountRecords(boolean newCountRecords)
Sets whether or not the total record count should be used or not. |
void |
setEndRecordNumber(int newEndRecordNumber)
Sets the ending record number |
void |
setMoreRecords(boolean newMoreRecords)
|
protected void |
setPageLimitAttribute(DataObject dbObj)
Sets the size of the page limit. |
protected void |
setPageLimitAttribute(MultiDBObject dbObj)
Sets the size of the page limit. |
void |
setPageNumber(ControllerRequest request)
Sets the page number based upon the controller request object. |
void |
setPageNumber(int newPageNumber)
|
void |
setPreviousRecords(boolean newPreviousRecords)
|
void |
setStartRecordNumber(int newStartRecordNumber)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public RecordPaginator()
| Method Detail |
public void setMoreRecords(boolean newMoreRecords)
public boolean isMoreRecords()
public void setPreviousRecords(boolean newPreviousRecords)
public boolean isPreviousRecords()
public void setPageNumber(int newPageNumber)
public int getPageNumber()
public void setStartRecordNumber(int newStartRecordNumber)
public int getStartRecordNumber()
public void setEndRecordNumber(int newEndRecordNumber)
newEndRecordNumber - int for the new end record numberpublic int getEndRecordNumber()
public void setCountRecords(boolean newCountRecords)
newCountRecords - true if you wish for the recordset to retrieve
a total record count.public boolean isCountRecords()
public long getTotalRecordCount()
public int getPageCount()
public ArrayList searchAndRetrieve(DataObject searchCriteria,
String sortKey)
throws DBException
searchCriteria - The DBObject to search againstsortKey - the field to search against.
DBException
public List searchAndRetrieve(MultiDBObject searchCriteria,
String sortKey)
throws DBException
searchCriteria - The DBObject to search againstsortKey - the field to search against.
DBException
protected void setPageLimitAttribute(DataObject dbObj)
throws DBException
dbObj - The dbobject to set for.
DBException
protected void setPageLimitAttribute(MultiDBObject dbObj)
throws DBException
dbObj - The dbobject to set for.
DBException
public void setPageNumber(ControllerRequest request)
throws ControllerException
request - The controller request fed to the controller from which the
function can extract the page= controller parameter.
ControllerException - if page= is not a number.
|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||