|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Table
A backend friendly wrapper around a JDBM BTree that transparent enables duplicates when the BTree does not support them. TODO Need to rewrite the Javadocs in this interface.
Method Summary | |
---|---|
void |
close()
Closes the underlying Db of this Table. |
int |
count()
Gets the count of the number of records in this Table. |
int |
count(java.lang.Object key)
Gets the count of the number of records in this Table with a specific key: returns the number of duplicates for a key. |
int |
count(java.lang.Object key,
boolean isGreaterThan)
Returns the number of records greater than or less than a key value. |
java.lang.Object |
get(java.lang.Object key)
Gets the value of a record by key if the key exists. |
TupleComparator |
getComparator()
Gets the comparator used by this Table: may be null if this Table was not initialized with one. |
java.lang.String |
getName()
Gets the name of this Table. |
TupleRenderer |
getRenderer()
Gets the data renderer used by this Table to display or log records keys and values. |
boolean |
has(java.lang.Object key)
Checks to see if this table has a key: same as a get call with a check to see if the returned value is null or not. |
boolean |
has(java.lang.Object key,
boolean isGreaterThan)
Checks to see if this table has a record with a key greater/less than or equal to the key argument. |
boolean |
has(java.lang.Object key,
java.lang.Object value)
Checks to see if this table has a key with a specific value. |
boolean |
has(java.lang.Object key,
java.lang.Object val,
boolean isGreaterThan)
Checks to see if this table has a record with a key equal to the argument key with a value greater/less than or equal to the value argument provided. |
boolean |
isDupsEnabled()
Checks to see if this Table has enabled the use of duplicate keys. |
boolean |
isSortedDupsEnabled()
Checks to see if this Table has enabled sorting on the values of duplicate keys. |
javax.naming.NamingEnumeration |
listTuples()
Sets a cursor to the first record in the Table and enables single next steps across all records. |
javax.naming.NamingEnumeration |
listTuples(java.lang.Object key)
Sets a cursor to the first record in the Table with a key value of key and enables single next steps across all duplicate records with this key. |
javax.naming.NamingEnumeration |
listTuples(java.lang.Object key,
boolean isGreaterThan)
Sets a cursor to the first record in the Table with a key value greater/less than or equal to key and enables single next steps across all records with key values equal to or less/greater than key. |
javax.naming.NamingEnumeration |
listTuples(java.lang.Object key,
java.lang.Object val,
boolean isGreaterThan)
Sets a cursor to the first record in the Table with a key equal to the key argument whose value is greater/less than or equal to val and enables single next steps across all records with key equal to key. |
javax.naming.NamingEnumeration |
listValues(java.lang.Object key)
Sets a enumeration to the first record in the Table with a key value of key and enables single next steps across all duplicate records with this key. |
java.lang.Object |
put(java.lang.Object key,
javax.naming.NamingEnumeration values)
Efficiently puts a set of values into the Table. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Puts a record into this Table. |
java.lang.Object |
remove(java.lang.Object key)
Removes all records with key from this Table. |
java.lang.Object |
remove(java.lang.Object key,
javax.naming.NamingEnumeration values)
Removes a set of values with the same key from this Table. |
java.lang.Object |
remove(java.lang.Object key,
java.lang.Object value)
Removes a single specific record with key and value from this Table. |
void |
setRenderer(TupleRenderer renderer)
Sets the data renderer to by used by this Table to display or log record keys and values. |
Method Detail |
---|
TupleComparator getComparator()
TupleRenderer getRenderer()
void setRenderer(TupleRenderer renderer)
renderer
- the DataRenderer instance to used as the renderer.java.lang.String getName()
boolean isDupsEnabled()
boolean isSortedDupsEnabled()
boolean has(java.lang.Object key) throws javax.naming.NamingException
key
- the Object of the key to check for
javax.naming.NamingException
- if there is a failure to read the underlying Dbboolean has(java.lang.Object key, java.lang.Object value) throws javax.naming.NamingException
key
- the key Object to check forvalue
- the value Object to check for
javax.naming.NamingException
- if there is a failure to read the underlying Dbboolean has(java.lang.Object key, boolean isGreaterThan) throws javax.naming.NamingException
key
- the key Object to compare keys toisGreaterThan
- boolean for greater than or less then comparison
javax.naming.NamingException
- if there is a failure to read the underlying Db,
or if the underlying Db is not a Btree.boolean has(java.lang.Object key, java.lang.Object val, boolean isGreaterThan) throws javax.naming.NamingException
key
- the key Objectval
- the value Object to compare values toisGreaterThan
- boolean for greater than or less then comparison
javax.naming.NamingException
- if there is a failure to read the underlying Db
or if the underlying Db is not of the Btree type that allows sorted
duplicate values.java.lang.Object get(java.lang.Object key) throws javax.naming.NamingException
key
- the key of the record
javax.naming.NamingException
- if there is a failure to read the underlying Dbjava.lang.Object put(java.lang.Object key, java.lang.Object value) throws javax.naming.NamingException
key
- the key of the recordvalue
- the value of the record.
javax.naming.NamingException
- if there is a failure to read or write to
the underlying Dbjava.lang.Object put(java.lang.Object key, javax.naming.NamingEnumeration values) throws javax.naming.NamingException
key
- the key to use for the valuesvalues
- the values supplied as an enumeration
javax.naming.NamingException
- if something goes wrongjava.lang.Object remove(java.lang.Object key) throws javax.naming.NamingException
key
- the key of the records to remove
javax.naming.NamingException
- if there is a failure to read or write to
the underlying Dbjava.lang.Object remove(java.lang.Object key, java.lang.Object value) throws javax.naming.NamingException
key
- the key of the record to removevalue
- the value of the record to remove
javax.naming.NamingException
- if there is a failure to read or write to
the underlying Dbjava.lang.Object remove(java.lang.Object key, javax.naming.NamingEnumeration values) throws javax.naming.NamingException
key
- the key of the records to remove
javax.naming.NamingException
- if there is a failure to read or write to
the underlying Dbjavax.naming.NamingEnumeration listValues(java.lang.Object key) throws javax.naming.NamingException
key
- the key to iterate over
javax.naming.NamingException
- if the underlying browser could not be setjavax.naming.NamingEnumeration listTuples() throws javax.naming.NamingException
javax.naming.NamingException
- if the underlying cursor could not be set.javax.naming.NamingEnumeration listTuples(java.lang.Object key) throws javax.naming.NamingException
key
- the key to iterate over
javax.naming.NamingException
- if the underlying cursor could not be setjavax.naming.NamingEnumeration listTuples(java.lang.Object key, boolean isGreaterThan) throws javax.naming.NamingException
key
- the key to use to position this cursor to record with a key
greater/less than or equal to itisGreaterThan
- if true the cursor iterates up over ascending keys
greater than or equal to the key argument, but if false this cursor
iterates down over descending keys less than or equal to key argument
javax.naming.NamingException
- if the underlying cursor could not be setjavax.naming.NamingEnumeration listTuples(java.lang.Object key, java.lang.Object val, boolean isGreaterThan) throws javax.naming.NamingException
key
- the key to use to position this cursor to record with a key
equal to it.val
- the value to use to position this cursor to record with a
value greater/less than or equal to it.isGreaterThan
- if true the cursor iterates up over ascending
values greater than or equal to the val argument, but if false this
cursor iterates down over descending values less than or equal to val
argument starting from the largest value going down
javax.naming.NamingException
- if the underlying cursor could not be set or
this method is called over a cursor on a table that does not have sorted
duplicates enabled.int count() throws javax.naming.NamingException
javax.naming.NamingException
- if there is a failure to read the underlying Dbint count(java.lang.Object key) throws javax.naming.NamingException
key
- the Object key to count.
javax.naming.NamingException
- if there is a failure to read the underlying Dbint count(java.lang.Object key, boolean isGreaterThan) throws javax.naming.NamingException
key
- the Object key to count.isGreaterThan
- boolean set to true to count for greater than and
equal to record keys, or false for less than or equal to keys.
javax.naming.NamingException
- if there is a failure to read the underlying Dbvoid close() throws javax.naming.NamingException
javax.naming.NamingException
- on any failures
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |