Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Class java.sql.Time

java.lang.Object
    |
    +----java.util.Date
            |
            +----java.sql.Time

public class Time
extends Date

This class is a thin wrapper around java.util.Date that allows JDBC to identify this as a SQL TIME value. It adds formatting and parsing operations to support the JDBC escape syntax for time values.


Constructor Summary
 Time(int hour, int minute, int second)
Construct a Time Object
 Time(long time)
Construct a Time using a milliseconds time value
 

Method Summary
int  getDate()
  Deprecated
int  getDay()
  Deprecated
int  getMonth()
  Deprecated
int  getYear()
  Deprecated
void  setDate(int i)
  Deprecated
void  setMonth(int i)
  Deprecated
void  setTime(long time)
Set a Time using a milliseconds time value
void  setYear(int i)
  Deprecated
String  toString()
Format a time in JDBC date escape format
static Time  valueOf(String s)
Convert a string in JDBC time escape format to a Time value
 
Methods inherited from class java.util.Date
 after, before, compareTo, compareTo, equals, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTime, getTimezoneOffset, getYear, hashCode, parse, setDate, setHours, setMinutes, setMonth, setSeconds, setTime, setYear, toGMTString, toLocaleString, toString, UTC
 
Methods inherited from class java.lang.Object
 clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Time

public Time(int hour,
            int minute,
            int second)
Construct a Time Object
Parameters:
hour - 0 to 23
minute - 0 to 59
second - 0 to 59

Time

public Time(long time)
Construct a Time using a milliseconds time value
Parameters:
time - milliseconds since January 1, 1970, 00:00:00 GMT
Method Detail

setTime

public void setTime(long time)
Set a Time using a milliseconds time value
Parameters:
time - milliseconds since January 1, 1970, 00:00:00 GMT
Overrides:
setTime in class Date

valueOf

public static Time valueOf(String s)
Convert a string in JDBC time escape format to a Time value
Parameters:
s - time in format "hh:mm:ss"
Returns:
corresponding Time

toString

public String toString()
Format a time in JDBC date escape format
Returns:
a String in hh:mm:ss format
Overrides:
toString in class Date

getYear

public int getYear()
Note: getYear() is deprecated.

Overrides:
getYear in class Date

getMonth

public int getMonth()
Note: getMonth() is deprecated.

Overrides:
getMonth in class Date

getDay

public int getDay()
Note: getDay() is deprecated.

Overrides:
getDay in class Date

getDate

public int getDate()
Note: getDate() is deprecated.

Overrides:
getDate in class Date

setYear

public void setYear(int i)
Note: setYear() is deprecated.

Overrides:
setYear in class Date

setMonth

public void setMonth(int i)
Note: setMonth() is deprecated.

Overrides:
setMonth in class Date

setDate

public void setDate(int i)
Note: setDate() is deprecated.

Overrides:
setDate in class Date

Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Submit a bug or feature
Submit comments/suggestions about new javadoc look.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.