| |
|
| java.lang.Object org.apache.torque.om.ObjectKey org.apache.torque.om.SimpleKey org.apache.torque.om.DateKey
DateKey | public class DateKey extends SimpleKey (Code) | | This class can be used as an ObjectKey to uniquely identify an
object within an application where the id is a Date.
author: John McNally version: $Id: DateKey.java 476550 2006-11-18 16:08:37Z tfischer $ |
Method Summary | |
public boolean | equals(Object keyObj) keyObj is equal to this DateKey if keyObj is a DateKey or String
that contains the same information this key contains. | public Date | getDate() Access the underlying Date object. | public void | setValue(String key) | public void | setValue(DateKey key) Sets the internal representation to the same object used by key. | public String | toString() |
DateKey | public DateKey()(Code) | | Creates an DateKey whose internal representation will be
set later, through a set method
|
DateKey | public DateKey(String key)(Code) | | Creates a DateKey whose internal representation is a Date
given by the long number given by the String
Parameters: key - the key value throws: NumberFormatException - if key is not valid |
DateKey | public DateKey(Date key)(Code) | | Creates a DateKey
Parameters: key - the key value |
DateKey | public DateKey(DateKey key)(Code) | | Creates a DateKey that is equivalent to key.
Parameters: key - the key value |
equals | public boolean equals(Object keyObj)(Code) | | keyObj is equal to this DateKey if keyObj is a DateKey or String
that contains the same information this key contains. Two ObjectKeys
that both contain null values are not considered equal.
Parameters: keyObj - the comparison value whether the two objects are equal |
getDate | public Date getDate()(Code) | | Access the underlying Date object.
a Date value |
setValue | public void setValue(String key)(Code) | | Sets the internal representation to a String
Parameters: key - the key value |
setValue | public void setValue(DateKey key)(Code) | | Sets the internal representation to the same object used by key.
Parameters: key - the key value |
toString | public String toString()(Code) | | get a String representation
a String representation of the Date or an empty String if theDate is null |
|
|
|