Enterprise Information Portal APIs

com.ibm.mm.sdk.common
Class DKTime

java.lang.Object
  |
  +--java.util.Date
        |
        +--java.sql.Time
              |
              +--com.ibm.mm.sdk.common.DKTime
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable, java.io.Serializable

public class DKTime
extends java.sql.Time
implements java.io.Serializable

DKTime defines a generic time class to represents time data-type retrieved from back-end datastores. When represented as a string, the default format of DKTime is hh-mm-ss, as required by the majority of datastores.

DKDDO supports DKTime objects; that is, it can send an attribute with DKTime type, in and out of a datastore.

See Also:
Serialized Form

Constructor Summary
DKTime(int hour, int minute, int second)
          Constructs a DKTime object from a given hour, minute, and second.
DKTime(long time)
          Constructs a DKTime from a given long integer value.
DKTime(java.sql.Time time)
          Constructs a DKTime from a given java.sql.Time
 
Method Summary
 java.lang.String toString()
          Gets the string representation of this time object.
static java.sql.Time valueOf(java.lang.String s)
          Contructs a DKTime object using the string value of a given time in hh.mm.ss format.
 
Methods inherited from class java.sql.Time
getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getYear, setDate, setMonth, setTime, setYear
 
Methods inherited from class java.util.Date
after, before, clone, compareTo, compareTo, equals, getTime, getTimezoneOffset, hashCode, parse, setHours, setMinutes, setSeconds, toGMTString, toLocaleString, UTC
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DKTime

public DKTime(int hour,
              int minute,
              int second)
Constructs a DKTime object from a given hour, minute, and second.
Parameters:
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.

DKTime

public DKTime(long time)
Constructs a DKTime from a given long integer value. The long integer represents the number of milliseconds since January 1, 1970, 00:00:00 GMT.
Parameters:
time - a long integer representing the time.

DKTime

public DKTime(java.sql.Time time)
Constructs a DKTime from a given java.sql.Time
Parameters:
date - a java.sql.Time
Method Detail

valueOf

public static java.sql.Time valueOf(java.lang.String s)
Contructs a DKTime object using the string value of a given time in hh.mm.ss format.
Parameters:
s - time in string format.
Returns:
a time object.

toString

public java.lang.String toString()
Gets the string representation of this time object. The default format is hh.mm.ss, as required by the majority of datastores.
Overrides:
toString in class java.sql.Time
Returns:
string representation of time

EIP Java APIs

(c) Copyright International Business Machines Corporation 1996, 2002. IBM Corp. All rights reserved.