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