com.knowgate.dataobjs
Class DBKeySet

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractSet
          extended byjava.util.TreeSet
              extended bycom.knowgate.dataobjs.DBKeySet
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.io.Serializable, java.util.Set, java.util.SortedSet

public class DBKeySet
extends java.util.TreeSet

Load a primary keys set from the database into a java.util.TreeSet

Version:
1.0
See Also:
Serialized Form

Constructor Summary
DBKeySet(java.lang.String sTableName, java.lang.String sColumnName, java.lang.String sWhereClause, int iLimit)
           
 
Method Summary
 int count(JDCConnection oConn)
           
 int load(JDCConnection oConn)
          Load primary keys from the database to this TreeSet
 int load(JDCConnection oConn, java.lang.Object[] aParams)
          Load primary keys from the database to this TreeSet
 
Methods inherited from class java.util.TreeSet
add, addAll, clear, clone, comparator, contains, first, headSet, isEmpty, iterator, last, remove, size, subSet, tailSet
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
containsAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray
 

Constructor Detail

DBKeySet

public DBKeySet(java.lang.String sTableName,
                java.lang.String sColumnName,
                java.lang.String sWhereClause,
                int iLimit)
Parameters:
sTableName - Table Name
sColumnName - Column Name
sWhereClause - SQL WHERE clause
iLimit - Absolute maximum number of primary key to be loaded
Method Detail

load

public int load(JDCConnection oConn)
         throws java.sql.SQLException
Load primary keys from the database to this TreeSet

Parameters:
oConn - JDBC Database Connection
Returns:
Number of keys actually readed
Throws:
java.sql.SQLException

load

public int load(JDCConnection oConn,
                java.lang.Object[] aParams)
         throws java.sql.SQLException
Load primary keys from the database to this TreeSet

Parameters:
oConn - JDBC Database Connection
aParams - Parameters to be binded to prepared SQL
Returns:
Number of keys actually readed
Throws:
java.sql.SQLException

count

public int count(JDCConnection oConn)
          throws java.sql.SQLException
Throws:
java.sql.SQLException