com.linxpda.dbaware
Class Entry

java.lang.Object
  |
  +--com.linxpda.dbaware.Entry
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable

public class Entry
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable

This class represents a single row of data within a PJODe database. It stores the data in an internal Hashtable, using the table column names as an index.

See Also:
Serialized Form

Constructor Summary
Entry()
          Creates and initializes a new empty row.
Entry(java.util.Hashtable values)
          Creates a new Entry, using the supplied Hashtable as key/value pairs.
 
Method Summary
 int compareTo(java.lang.Object o)
          Compares this Entry to another Entry for sorting purposes.
 boolean equals(java.lang.Object query)
          Checks this Entry against another object for equality.
 java.util.Enumeration getColumns()
          Returns an enumeration of all the keys (column labels) referenced in this Entry.
 java.lang.Object getValue(java.lang.String column)
          Returns the value (as an object) that is referenced by the supplied column name.
 int hashCode()
          Returns a unique identifier for this Entry object.
 void setValue(java.lang.String column, java.lang.Object value)
          Stores the value object using the column label as a key.
 void setValues(java.util.Hashtable values)
          Resets the value of an Entry to use the supplied Hashtable as key/value pairs.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Entry

public Entry()
Creates and initializes a new empty row.

Entry

public Entry(java.util.Hashtable values)
Creates a new Entry, using the supplied Hashtable as key/value pairs.
Method Detail

getValue

public java.lang.Object getValue(java.lang.String column)
Returns the value (as an object) that is referenced by the supplied column name.

setValues

public void setValues(java.util.Hashtable values)
Resets the value of an Entry to use the supplied Hashtable as key/value pairs.

setValue

public void setValue(java.lang.String column,
                     java.lang.Object value)
Stores the value object using the column label as a key.

getColumns

public java.util.Enumeration getColumns()
Returns an enumeration of all the keys (column labels) referenced in this Entry.

equals

public boolean equals(java.lang.Object query)
Checks this Entry against another object for equality. This search algorithm uses a fuzzy search technique, whereas '*' characters are used as wildcards.

The following logic applies:


hashCode

public int hashCode()
Returns a unique identifier for this Entry object.
Overrides:
hashCode in class java.lang.Object

compareTo

public int compareTo(java.lang.Object o)
Compares this Entry to another Entry for sorting purposes.
Specified by:
compareTo in interface java.lang.Comparable