Package org.apache.torque.om
Class DateKey
- java.lang.Object
-
- org.apache.torque.om.ObjectKey<T>
-
- org.apache.torque.om.SimpleKey<Date>
-
- org.apache.torque.om.DateKey
-
- All Implemented Interfaces:
Serializable,Comparable<Object>
public class DateKey extends SimpleKey<Date>
This class can be used as an ObjectKey to uniquely identify an object within an application where the id is a Date.- Version:
- $Id: DateKey.java 1849379 2018-12-20 12:33:43Z tv $
- Author:
- John McNally
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DateKey()Initializes the internal key value tonull.DateKey(String key)Creates an DateKey and set its internal representationDateKey(Date key)Creates an DateKey and set its internal representationDateKey(DateKey key)Creates a DateKey that is equivalent to key.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetJdbcType()Returns the JDBC type of the key as defined injava.sql.Types.voidsetValue(String key)Sets the internal representation to a StringStringtoString()Get a String representation for this key.-
Methods inherited from class org.apache.torque.om.SimpleKey
keyFor, keyFor, keyFor, keyFor, keyFor, keyFor, keyFor, keyFor, keyFor, keyFor, keyFor
-
-
-
-
Constructor Detail
-
DateKey
public DateKey()
Initializes the internal key value tonull.
-
DateKey
public DateKey(String key)
Creates an DateKey and set its internal representation- Parameters:
key- the key value as String
-
DateKey
public DateKey(Date key)
Creates an DateKey and set its internal representation- Parameters:
key- the key value
-
DateKey
public DateKey(DateKey key)
Creates a DateKey that is equivalent to key.- Parameters:
key- the key value
-
-
Method Detail
-
setValue
public void setValue(String key)
Sets the internal representation to a String- Parameters:
key- the key value
-
getJdbcType
public int getJdbcType()
Returns the JDBC type of the key as defined injava.sql.Types.- Specified by:
getJdbcTypein classObjectKey<Date>- Returns:
Types.TIMESTAMP.
-
-