|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.Date
java.sql.Time
public class Time
This class is a wrapper around java.util.Date to allow the JDBC driver to identify the value as a SQL Time.
| Constructor Summary | |
|---|---|
Time(int hour,
int minute,
int second)
Deprecated. |
|
Time(long date)
This method initializes a new instance of this class with the specified time value representing the number of milliseconds since Jan 1, 1970 at 12:00 midnight GMT. |
|
| Method Summary | |
|---|---|
int |
getDate()
Deprecated. |
int |
getDay()
Deprecated. |
int |
getMonth()
Deprecated. |
int |
getYear()
Deprecated. |
void |
setDate(int newValue)
Deprecated. |
void |
setMonth(int newValue)
Deprecated. |
void |
setYear(int newValue)
Deprecated. |
String |
toString()
This method returns this date in JDBC format. |
static Time |
valueOf(String str)
This method returns a new instance of this class by parsing a date in JDBC format into a Java date. |
| Methods inherited from class java.util.Date |
|---|
after, before, clone, compareTo, equals, getHours, getMinutes, getSeconds, getTime, getTimezoneOffset, hashCode, parse, setHours, setMinutes, setSeconds, setTime, toGMTString, toLocaleString, UTC |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Time(int hour,
int minute,
int second)
hour - The hour for this Time (0-23)minute - The minute for this time (0-59)second - The second for this time (0-59)public Time(long date)
date - The time value to intialize this Time to.| Method Detail |
|---|
public int getDate()
throws IllegalArgumentException
getDate in class DateIllegalArgumentException - when it's called.Calendar,
Date.setDate(int)
public int getDay()
throws IllegalArgumentException
getDay in class DateIllegalArgumentException - when it's called.Calendar
public int getMonth()
throws IllegalArgumentException
getMonth in class DateIllegalArgumentException - when it's called.Date.setMonth(int),
Calendar
public int getYear()
throws IllegalArgumentException
getYear in class DateIllegalArgumentException - when it's called.Calendar,
Date.setYear(int)
public void setDate(int newValue)
throws IllegalArgumentException
setDate in class DatenewValue - the date.
IllegalArgumentException - when it's called.Calendar,
Date.getDate()
public void setMonth(int newValue)
throws IllegalArgumentException
setMonth in class DatenewValue - the month, with a zero-based index
from January.
IllegalArgumentException - when it's called.Date.getMonth(),
Calendar
public void setYear(int newValue)
throws IllegalArgumentException
setYear in class DatenewValue - the year minus 1900.
IllegalArgumentException - when it's called.Date.getYear(),
Calendarpublic static Time valueOf(String str)
str - The string to parse.
java.sql.Time value.public String toString()
toString in class DateDate.parse(String),
DateFormat
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||