|Apache Tuscany > Home > DAS Overview > DAS Java > DAS Java Documentation Menu > DAS Java Developer Guide > RDB DAS Java > RDB DAS - User Guide > WorkingWithPaging||User List | Dev List | Issue Tracker|
The RDB DAS provides a mechanism for working with the result of large queries one chunk (page) at a time. This capability is modeled after the behavior of web search engines. For example, if I Google "RDB DAS" I am presented with a page representing the first ten references. I am also told that there were close to 500,000 matches and I am given the opportunity to go to the next page or directly to pages two through ten. After moving from the first page I am also provided the opportunity to move back to some previous page.
The DAS "Pager" is a wrapper around a provided read command and provides the APIs for paging. Here is the Pager interface:
A Pager is instantiated on a given read Command and the constructor is used to specify the desired page size (number of database rows per page). The following example illustrates construction and use of a pager:
The current Pager specification and implementation are very preliminary and will likely change in significant ways! For instance, the pager is intended to work in completely disconnected scenarios so there should be no connection context maintained between invocations of the pager. Currently the Pager references a Command that, in turn, references a connection (oops!). Some work must be done to make the pager lightweight as it will likely be stored in session.
We probably should also create a Factory rather than using the impl constructor.