java.sql.Date, java.sql.Time and
java.sql.Timestamp, which are based on java.util.Date, this
class does not represent the time as an offset from midnight,
January 1, 1970 GMT. Instead, it holds each component (year, month, day,
hour, minute, second, nanosecond) as it would have been represented in a
given calendar. Since it does not hold information about the time zone for
the time it represents, it does not point to a well-defined point in time
without being used together with a java.util.Calendar object.
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private final int | |
| private final int | |
| private final int | |
| private final int | |
| private final int | |
| private final int |
| Access | Constructor and Description |
|---|---|
| private | DateTimeValue(Calendar
the calendar from which to get the values of the fields cal, int the nano second fraction of a second (the
milliseconds will be taken from nanoFraction)cal, so only the six least
significant digits of this value are used)Construct a |
| pack-priv | DateTimeValue(Date date, Calendar cal)
Create an instance from a |
| pack-priv | DateTimeValue(Time time, Calendar cal)
Create an instance from a |
| pack-priv | DateTimeValue(Timestamp ts, Calendar cal)
Create an instance from a |
| public | DateTimeValue(Date
The wrapped date date)Create an instance from a |
| public | DateTimeValue(Time
The wrapped time value time)Create an instance from a |
| public | DateTimeValue(Timestamp
The wrapped timestamp value ts)Create an instance from a |
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| public int | |
| public int | |
| public int | |
| public int | |
| public int | |
| public int | |
| private static Calendar | Returns: the calendar (same ascal)the calendar cal, Date an object representing the new time of the calendar date)Set the time of a calendar. |
| day | back to summary |
|---|---|
| private final int day | |
| hours | back to summary |
|---|---|
| private final int hours | |
| minutes | back to summary |
|---|---|
| private final int minutes | |
| month | back to summary |
|---|---|
| private final int month | |
| nanos | back to summary |
|---|---|
| private final int nanos | |
| seconds | back to summary |
|---|---|
| private final int seconds | |
| year | back to summary |
|---|---|
| private final int year | |
| DateTimeValue | back to summary |
|---|---|
| private DateTimeValue(Calendar cal, int nanoFraction) Construct a
| |
| DateTimeValue | back to summary |
|---|---|
| pack-priv DateTimeValue(Date date, Calendar cal) Create an instance from a | |
| DateTimeValue | back to summary |
|---|---|
| pack-priv DateTimeValue(Time time, Calendar cal) Create an instance from a | |
| DateTimeValue | back to summary |
|---|---|
| pack-priv DateTimeValue(Timestamp ts, Calendar cal) Create an instance from a | |
| DateTimeValue | back to summary |
|---|---|
| public DateTimeValue(Date date) Create an instance from a
| |
| DateTimeValue | back to summary |
|---|---|
| public DateTimeValue(Time time) Create an instance from a
| |
| DateTimeValue | back to summary |
|---|---|
| public DateTimeValue(Timestamp ts) Create an instance from a
| |
| getDayOfMonth | back to summary |
|---|---|
| public int getDayOfMonth() Get day of month component. First day of the month is 1.
| |
| getHours | back to summary |
|---|---|
| public int getHours() Get hour of day component (24 hour clock).
| |
| getMinutes | back to summary |
|---|---|
| public int getMinutes() Get minute component.
| |
| getMonth | back to summary |
|---|---|
| public int getMonth() Get the month component. First month is 0 (
| |
| getNanos | back to summary |
|---|---|
| public int getNanos() Get nanosecond component.
| |
| getSeconds | back to summary |
|---|---|
| public int getSeconds() Get second component.
| |
| getYear | back to summary |
|---|---|
| public int getYear() Get the year component.
| |
| initCalendar | back to summary |
|---|---|
| private static Calendar initCalendar(Calendar cal, Date date) Set the time of a calendar. | |