java.lang.Object | ||
↳ | java.util.Date | |
↳ | java.sql.Time |
A thin wrapper around the java.util.Date
class that allows the JDBC
API to identify this as an SQL TIME
value. The Time
class adds formatting and
parsing operations to support the JDBC escape syntax for time
values.
The date components should be set to the "zero epoch" value of January 1, 1970 and should not be accessed.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This constructor is deprecated.
Use the constructor that takes a milliseconds value
in place of this constructor
| |||||||||||
Constructs a
Time object using a milliseconds time value. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method is deprecated.
As of JDK version 1.1,
replaced by
Calendar.get(Calendar.DAY_OF_MONTH) .No replacement. | |||||||||||
This method is deprecated.
As of JDK version 1.1,
replaced by
Calendar.get(Calendar.DAY_OF_WEEK) .
| |||||||||||
This method is deprecated.
As of JDK version 1.1,
replaced by
Calendar.get(Calendar.MONTH) .
| |||||||||||
This method is deprecated.
As of JDK version 1.1,
replaced by
Calendar.get(Calendar.YEAR) - 1900 .
| |||||||||||
This method is deprecated.
As of JDK version 1.1,
replaced by
Calendar.set(Calendar.DAY_OF_MONTH, int date) .
| |||||||||||
This method is deprecated.
As of JDK version 1.1,
replaced by
Calendar.set(Calendar.MONTH, int month) .
| |||||||||||
Sets a
Time object using a milliseconds time value. | |||||||||||
This method is deprecated.
As of JDK version 1.1,
replaced by
Calendar.set(Calendar.YEAR, year + 1900) .
| |||||||||||
Formats a time in JDBC time escape format.
| |||||||||||
Converts a string in JDBC time escape format to a
Time value. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.util.Date
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
java.lang.Comparable
|
This constructor is deprecated.
Use the constructor that takes a milliseconds value
in place of this constructor
Constructs a Time
object initialized with the
given values for the hour, minute, and second.
The driver sets the date components to January 1, 1970.
Any method that attempts to access the date components of a
Time
object will throw a
java.lang.IllegalArgumentException
.
The result is undefined if a given argument is out of bounds.
hour | 0 to 23 |
---|---|
minute | 0 to 59 |
second | 0 to 59 |
Constructs a Time
object using a milliseconds time value.
time | milliseconds since January 1, 1970, 00:00:00 GMT; a negative number is milliseconds before January 1, 1970, 00:00:00 GMT |
---|
This method is deprecated.
As of JDK version 1.1,
replaced by Calendar.get(Calendar.DAY_OF_MONTH)
.No replacement.
This method is deprecated and should not be used because SQL TIME
values do not have a date component.@deprecated
IllegalArgumentException | if this method is invoked |
---|
This method is deprecated.
As of JDK version 1.1,
replaced by Calendar.get(Calendar.DAY_OF_WEEK)
.
This method is deprecated and should not be used because SQL TIME
values do not have a day component.@deprecated
IllegalArgumentException | if this method is invoked |
---|
This method is deprecated.
As of JDK version 1.1,
replaced by Calendar.get(Calendar.MONTH)
.
This method is deprecated and should not be used because SQL TIME
values do not have a month component.@deprecated
IllegalArgumentException | if this method is invoked |
---|
This method is deprecated.
As of JDK version 1.1,
replaced by Calendar.get(Calendar.YEAR) - 1900
.
This method is deprecated and should not be used because SQL TIME
values do not have a year component.@deprecated
IllegalArgumentException | if this method is invoked |
---|
This method is deprecated.
As of JDK version 1.1,
replaced by Calendar.set(Calendar.DAY_OF_MONTH, int date)
.
This method is deprecated and should not be used because SQL TIME
values do not have a date component.@deprecated
i | the day of the month value between 1-31. |
---|
IllegalArgumentException | if this method is invoked |
---|
This method is deprecated.
As of JDK version 1.1,
replaced by Calendar.set(Calendar.MONTH, int month)
.
This method is deprecated and should not be used because SQL TIME
values do not have a month component.@deprecated
i | the month value between 0-11. |
---|
IllegalArgumentException | if this method is invoked |
---|
Sets a Time
object using a milliseconds time value.
time | milliseconds since January 1, 1970, 00:00:00 GMT; a negative number is milliseconds before January 1, 1970, 00:00:00 GMT |
---|
This method is deprecated.
As of JDK version 1.1,
replaced by Calendar.set(Calendar.YEAR, year + 1900)
.
This method is deprecated and should not be used because SQL TIME
values do not have a year component.@deprecated
i | the year value. |
---|
IllegalArgumentException | if this method is invoked |
---|
Formats a time in JDBC time escape format.
String
in hh:mm:ss format
Converts a string in JDBC time escape format to a Time
value.
s | time in format "hh:mm:ss" |
---|
Time
object