|
Enterprise Information Portal APIs |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.gcs.db.component.DB2Pool
DB2Pool is a view or abstract represention of a set of URLs in the url database table. These URL records satisfy a SQL query defined by extending classes
SELECT * FROM urlpoolstable WHERE <defined by extending classes>
When a URLContainer is added to a DB2Pool, the concrete class sets the fields in the URLContainer object to reflect the properties of the class. For example, DB2Queue sets hide=0 and state_id=1 for a DB2URLContainer. Hence, when the container is explicitly saved, it will be saved as a member of the corresponding DB2Pool.
The DB2Pool classes may be used by DB2Collection classes to get and put DB2URLContainers into the database.
Field Summary | |
static boolean |
debug
|
Constructor Summary | |
DB2Pool()
Default Constructor. |
Method Summary | |
abstract boolean |
contains(DB2URLContainer urlC,
Transaction t)
Checks to see if the specified URL is in the pool. |
abstract java.lang.String |
getSQLCount()
Return a SQL SELECT COUNT(*) statement. |
abstract java.lang.String |
getSQLSelect()
Return the SQL SELECT statement. |
java.util.Enumeration |
getURLContainers(int max,
Transaction t)
Returns an enumeration of the next urls from this pool as DB2URLContainers. |
abstract void |
insert(DB2URLContainer urlC)
Updates the state information of the java URL object to reflect a URL in this pool but does not save this information in the database. |
int |
num(Transaction t)
Returns the number of URLs in this pool. |
java.lang.String |
toString(Transaction t)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static boolean debug
Constructor Detail |
public DB2Pool()
Method Detail |
public java.util.Enumeration getURLContainers(int max, Transaction t) throws TransactionException
Returns an enumeration of the next urls from this pool as DB2URLContainers.
This method calls getSelectSQL()
to get the SQL SELECT statement from extending classes.
It constructs
the URLContainer using the URLContainerFactory and sets
the fields with values in the database record.
max
- The maximum number of URLs to return.t
- The transaction object for DB2 access.TransactionException
- on failed SQL
execution.public int num(Transaction t) throws TransactionException
This method calls
getSQLCount
to get the SELECT COUNT
statement from extending classes.
t
- The transaction object for DB2 access.TransactionException
- on failed SQL
execution.public abstract boolean contains(DB2URLContainer urlC, Transaction t) throws TransactionException
Extending classes check the urlC for a match and load the database record, if it has not already been loaded.
urlC
- The DB2URLContainer to check.t
- The transaction object for DB2 access.TransactionException
- on failed SQL
execution.public abstract void insert(DB2URLContainer urlC)
urlC
- The DB2URLContainer to check.public abstract java.lang.String getSQLSelect()
SELECT * FROM urlpoolstable WHERE <defined by extending class>
public abstract java.lang.String getSQLCount()
SELECT COUNT(*) FROM urlpoolstable WHERE <defined by extending class>
public java.lang.String toString(Transaction t) throws TransactionException
|
EIP Web Crawler APIs | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |