com.raritantechnologies.searchApp.browse
Class DBBrowseDirectoryEntry

java.lang.Object
  extended bycom.raritantechnologies.searchApp.browse.DBBrowseDirectoryEntry
All Implemented Interfaces:
IBrowseDirectoryEntry

public class DBBrowseDirectoryEntry
extends java.lang.Object
implements IBrowseDirectoryEntry

Implementation of IBrowseDirectoryEntry that uses a relational database to store the browse list entries.


Developed by Raritan Technologies .

Author:
Kepler Gelotte

Constructor Summary
DBBrowseDirectoryEntry()
           
 
Method Summary
 void addIndexRow(java.lang.String display, java.lang.String search, int page)
          Callback to add row to index lookup table
 int getMaxPage()
          Get the maximum page number for the field's browse list
 int getMinPage()
          Get the minimum page number for the field's browse list
 int getPageNumber(java.lang.String term)
          this function figures out which page the search term should be in
 java.lang.String getTableName()
          returns the table name (uses field name if not set )
 void initialize(org.w3c.dom.Element elem)
           
 void initialize(java.lang.String field)
          Use this method to initialize a DBBrowseDirectoryEntry instance for a single field.
 boolean isRefreshRequired()
          Use this method to see if the master list has been updated.
 boolean isValid()
           
 void prime(java.lang.String table)
          It will load the ArrayList of pages used for the binary lookup of the correct browse page.
 void setTableName(java.lang.String table)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBBrowseDirectoryEntry

public DBBrowseDirectoryEntry()
Method Detail

initialize

public void initialize(org.w3c.dom.Element elem)
Specified by:
initialize in interface IBrowseDirectoryEntry

initialize

public void initialize(java.lang.String field)
Use this method to initialize a DBBrowseDirectoryEntry instance for a single field.

Specified by:
initialize in interface IBrowseDirectoryEntry

prime

public void prime(java.lang.String table)
It will load the ArrayList of pages used for the binary lookup of the correct browse page.


setTableName

public void setTableName(java.lang.String table)

getTableName

public java.lang.String getTableName()
returns the table name (uses field name if not set )


addIndexRow

public void addIndexRow(java.lang.String display,
                        java.lang.String search,
                        int page)
Callback to add row to index lookup table


isRefreshRequired

public boolean isRefreshRequired()
Use this method to see if the master list has been updated.

Specified by:
isRefreshRequired in interface IBrowseDirectoryEntry

getPageNumber

public int getPageNumber(java.lang.String term)
this function figures out which page the search term should be in

Specified by:
getPageNumber in interface IBrowseDirectoryEntry

getMaxPage

public int getMaxPage()
Get the maximum page number for the field's browse list

Specified by:
getMaxPage in interface IBrowseDirectoryEntry

getMinPage

public int getMinPage()
Get the minimum page number for the field's browse list

Specified by:
getMinPage in interface IBrowseDirectoryEntry

isValid

public boolean isValid()
Specified by:
isValid in interface IBrowseDirectoryEntry