Enterprise Information Portal APIs

com.ibm.gcs.db.component
Class DB2HiddenPool

java.lang.Object
  |
  +--com.ibm.gcs.db.component.DB2Pool
        |
        +--com.ibm.gcs.db.component.DB2HiddenPool

public class DB2HiddenPool
extends DB2Pool

DB2HiddenPool represents all the URLs in the database which have not been and should not be crawled. These are the URL records that satisfy the following SQL query:

      SELECT * 
      FROM urlpoolstable
      WHERE urlpoolstable.state_id=0 AND urlpoolstable.hide=1
 


Fields inherited from class com.ibm.gcs.db.component.DB2Pool
debug
 
Method Summary
 boolean contains(DB2URLContainer urlC, Transaction t)
          Checks to see if the specified URL is in the pool.
 java.lang.String getSQLCount()
          Return the SQL SELECT COUNT(*) statement.
 java.lang.String getSQLSelect()
          Return the SQL SELECT statement.
 void insert(DB2URLContainer urlC)
          Update the state information of the java URL object to reflect a URL in the DB2HiddenPool but does not save this information in the database.
static void main(java.lang.String[] args)
          Simple test.
 
Methods inherited from class com.ibm.gcs.db.component.DB2Pool
getURLContainers, num, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

contains

public boolean contains(DB2URLContainer urlC,
                        Transaction t)
                 throws TransactionException
Checks to see if the specified URL is in the pool.

Returns true if the URLContainer has state_id=0 and hide=1, false otherwise.

Overrides:
contains in class DB2Pool
Parameters:
urlC - The DB2URLContainer to check.
t - The transaction object for DB2 access.
Returns:
true if the URL container is in this pool, false otherwise.
Throws:
TransactionException - on failed SQL execution.

insert

public void insert(DB2URLContainer urlC)
Update the state information of the java URL object to reflect a URL in the DB2HiddenPool but does not save this information in the database. (The URL object must be saved explicitly.)

Sets state_id=0 and hide=1.

Overrides:
insert in class DB2Pool
Parameters:
urlC - The DB2URLContainer to check.

getSQLSelect

public java.lang.String getSQLSelect()
Return the SQL SELECT statement. The statement has the form:
      SELECT *
      	FROM urlpoolstable
      	WHERE state_id=0 AND hide=1
 
Overrides:
getSQLSelect in class DB2Pool
Returns:
the SQL select statement

getSQLCount

public java.lang.String getSQLCount()
Return the SQL SELECT COUNT(*) statement. The statement has the form:
      SELECT COUNT(*) 
      	FROM urlpoolstable
      	WHERE state_id=0 AND hide=1
 
Overrides:
getSQLCount in class DB2Pool

main

public static void main(java.lang.String[] args)
Simple test.

EIP Web Crawler APIs

(c) Copyright International Business Machines Corporation 1996, 2002. IBM Corp. All rights reserved.