com.hlcl.rql.util.as
Class PageInfoSet

java.lang.Object
  extended by com.hlcl.rql.util.as.PageInfoSet

public class PageInfoSet
extends java.lang.Object

Author:
lejafr This class maintain a big set of page information. It uses a database to collect paga id and headlines.

Constructor Summary
PageInfoSet(java.sql.Connection connection, java.lang.String name)
          Construct a page info set.
 
Method Summary
 void add(Page page)
          Adds this page to the set.
 void addWithoutCheck(Page page)
          Adds this page to the set.
 boolean containsPage(Page page)
          Returns true, if page is stored in set already.
 boolean containsPage(java.lang.String pageId)
          Returns true, if page id is stored in set already.
 java.lang.String getCurrentPageCreatedByUserName()
          Returns the page created by user name for the current row.
 java.lang.String getCurrentPageCreatedOn()
          Returns the page created on date (in yyyymmdd) for the current row.
 java.lang.String getCurrentPageGuid()
          Returns the page GUID for the current row.
 java.lang.String getCurrentPageHeadline()
          Returns the page headline for the current row.
 java.lang.String getCurrentPageId()
          Returns the page ID for the current row.
 java.lang.String getCurrentPageTemplateName()
          Returns the page template name for the current row.
 boolean nextPage()
          Forwards to next row of result set to get all information out of the set.
 boolean nextPageSortedByTemplateName()
          Forwards to next row of result set to get all information out of the set.
 int size()
          Returns the number of pages in this set.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageInfoSet

public PageInfoSet(java.sql.Connection connection,
                   java.lang.String name)
            throws RQLException
Construct a page info set.

Parameters:
connection - the database connection
name - the name of the database table used to collect the page information
Throws:
RQLException
Method Detail

add

public void add(Page page)
         throws RQLException
Adds this page to the set. Does nothing, if the page is already in the set.

Throws:
RQLException

addWithoutCheck

public void addWithoutCheck(Page page)
                     throws RQLException
Adds this page to the set. Make sure it is not in set already.

Throws:
RQLException

containsPage

public boolean containsPage(Page page)
                     throws RQLException
Returns true, if page is stored in set already. Checked by page ID.

Throws:
RQLException

containsPage

public boolean containsPage(java.lang.String pageId)
                     throws RQLException
Returns true, if page id is stored in set already.

Throws:
RQLException

getCurrentPageCreatedByUserName

public java.lang.String getCurrentPageCreatedByUserName()
                                                 throws RQLException
Returns the page created by user name for the current row.

Throws:
RQLException

getCurrentPageCreatedOn

public java.lang.String getCurrentPageCreatedOn()
                                         throws RQLException
Returns the page created on date (in yyyymmdd) for the current row.

Throws:
RQLException

getCurrentPageGuid

public java.lang.String getCurrentPageGuid()
                                    throws RQLException
Returns the page GUID for the current row.

Throws:
RQLException

getCurrentPageHeadline

public java.lang.String getCurrentPageHeadline()
                                        throws RQLException
Returns the page headline for the current row.

Throws:
RQLException

getCurrentPageId

public java.lang.String getCurrentPageId()
                                  throws RQLException
Returns the page ID for the current row.

Throws:
RQLException

getCurrentPageTemplateName

public java.lang.String getCurrentPageTemplateName()
                                            throws RQLException
Returns the page template name for the current row.

Throws:
RQLException

nextPage

public boolean nextPage()
                 throws RQLException
Forwards to next row of result set to get all information out of the set. Returns true, if next row is available.

Did not sort the pages in any kind.

Throws:
RQLException

nextPageSortedByTemplateName

public boolean nextPageSortedByTemplateName()
                                     throws RQLException
Forwards to next row of result set to get all information out of the set. Returns true, if next row is available.

Sort the returned pages by template name.

Throws:
RQLException

size

public int size()
         throws RQLException
Returns the number of pages in this set.

Throws:
RQLException