| java.lang.Object org.apache.torque.om.ObjectKey
All known Subclasses: org.apache.torque.om.SimpleKey, org.apache.torque.om.ComboKey,
ObjectKey | abstract public class ObjectKey implements Serializable,Comparable(Code) | | This class can be used to uniquely identify an object within
an application. There are four subclasses: StringKey, NumberKey,
and DateKey, and ComboKey which is a Key made up of a combination
ofthe first three.
author: John McNally version: $Id: ObjectKey.java 473821 2006-11-11 22:37:25Z tv $ |
Field Summary | |
protected Object | key The underlying key value. |
Constructor Summary | |
protected | ObjectKey() Initializes the internal key value to null . |
Method Summary | |
public void | appendTo(StringBuffer sb) Appends a String representation of the key to a buffer. | public int | compareTo(Object obj) Implements the compareTo method. | public Object | getValue() Get the underlying object. | public int | hashCode() Returns the hashcode of the underlying value (key), if key is
not null. | abstract public void | setValue(String s) Reset the underlying object using a String. |
ObjectKey | protected ObjectKey()(Code) | | Initializes the internal key value to null .
|
appendTo | public void appendTo(StringBuffer sb)(Code) | | Appends a String representation of the key to a buffer.
Parameters: sb - a StringBuffer |
compareTo | public int compareTo(Object obj)(Code) | | Implements the compareTo method.
Parameters: obj - the object to compare to this object a numeric comparison of the two values |
getValue | public Object getValue()(Code) | | Get the underlying object.
the underlying object |
hashCode | public int hashCode()(Code) | | Returns the hashcode of the underlying value (key), if key is
not null. Otherwise calls Object.hashCode()
an int value |
|
|