com.ibm.mm.sdk.common
Class DKDate
java.lang.Object
|
+--java.util.Date
|
+--java.sql.Date
|
+--com.ibm.mm.sdk.common.DKDate
- All Implemented Interfaces:
- java.lang.Cloneable, java.lang.Comparable, java.io.Serializable
- public class DKDate
- extends java.sql.Date
- implements java.io.Serializable
DKDate defines a generic date class to represents date data-type retrieved from
back-end datastores.
When represented as a string, the default format of DKDate is yyy-mm-dd
,
as required by the majority of datastores.
DKDDO supports DKDate objects; that is, it can send an attribute with DKDate type,
in and out of a datastore.
- See Also:
- Serialized Form
Constructor Summary |
DKDate(java.sql.Date date)
Constructs a DKDate from a given java.sql.Date |
DKDate(int year,
int month,
int day)
Constructs a DKDate object from a given year, month, and day. |
DKDate(long date)
Constructs a DKDate from a given long integer value. |
Method Summary |
java.lang.String |
toString()
Gets the string representation of this date object. |
static java.sql.Date |
valueOf(java.lang.String s)
Contructs a DKDate object using the string value of a given date in
yyyy-mm-dd format. |
Methods inherited from class java.sql.Date |
getDate, getHours, getMinutes, getMonth, getSeconds, getYear, setHours, setMinutes, setSeconds, setTime |
Methods inherited from class java.util.Date |
after, before, clone, compareTo, compareTo, equals, getDay, getTime, getTimezoneOffset, hashCode, parse, setDate, setMonth, setYear, toGMTString, toLocaleString, UTC |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
DKDate
public DKDate(int year,
int month,
int day)
- Constructs a DKDate object from a given year, month, and day.
- Parameters:
year
- year
is an integer offset from 1900.month
- month
is a value between 0 and 11, where 0 represents January.day
- day
is day of the month, which is an integer between 1 and 31.
DKDate
public DKDate(long date)
- Constructs a DKDate from a given long integer value.
The long integer represents the number of milliseconds since January 1, 1970, 00:00:00 GMT.
- Parameters:
date
- a long integer representing the date.
DKDate
public DKDate(java.sql.Date date)
- Constructs a DKDate from a given java.sql.Date
- Parameters:
date
- a java.sql.Date
valueOf
public static java.sql.Date valueOf(java.lang.String s)
- Contructs a DKDate object using the string value of a given date in
yyyy-mm-dd
format.
- Parameters:
s
- the date in string format.- Returns:
- the date object.
toString
public java.lang.String toString()
- Gets the string representation of this date object.
The default format is
yyyy-mm-dd
, as required by the majority of datastores.
- Overrides:
toString
in class java.sql.Date
- Returns:
- string representation of date.
(c) Copyright International Business Machines Corporation 1996, 2002. IBM Corp. All rights reserved.