|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eigenbase.util14.ZonelessDatetime
public abstract class ZonelessDatetime
ZonelessDatetime is an abstract class for dates, times, or timestamps that contain a zoneless time value.
Field Summary | |
---|---|
long |
internalTime
Treat this as a protected field. |
protected String |
lastFormat
|
private static long |
serialVersionUID
SerialVersionUID created with JDK 1.5 serialver tool. |
protected Calendar |
tempCal
|
protected DateFormat |
tempFormatter
|
Constructor Summary | |
---|---|
ZonelessDatetime()
|
Method Summary | |
---|---|
void |
clearDate()
Clears the date component of this datetime |
void |
clearTime()
Clears the time component of this datetime |
protected Calendar |
getCalendar(TimeZone zone)
Gets a temporary Calendar set to the specified time zone. |
long |
getDateValue()
Gets the date portion of this zoneless datetime. |
protected DateFormat |
getFormatter(String format)
Gets a temporary formatter for a zoneless date time. |
long |
getJdbcDate(TimeZone zone)
Gets the value of this datetime as a milliseconds value for Date . |
long |
getJdbcTime(TimeZone zone)
Gets the value of this datetime as a milliseconds value for Time . |
long |
getJdbcTimestamp(TimeZone zone)
Gets the value of this datetime as a milliseconds value for Timestamp . |
long |
getTime()
Gets the internal value of this datetime |
long |
getTimeValue()
Gets the time portion of this zoneless datetime. |
void |
setZonedTime(long value,
TimeZone zone)
Sets this datetime via a zoned time value. |
void |
setZonelessTime(long value)
Sets this datetime via a zoneless time value. |
abstract Object |
toJdbcObject()
Returns this datetime as a Jdbc object |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
public long internalTime
protected transient Calendar tempCal
protected transient DateFormat tempFormatter
protected transient String lastFormat
Constructor Detail |
---|
public ZonelessDatetime()
Method Detail |
---|
public long getTime()
BasicDatetime
getTime
in interface BasicDatetime
public void setZonelessTime(long value)
BasicDatetime
setZonelessTime
in interface BasicDatetime
public void setZonedTime(long value, TimeZone zone)
BasicDatetime
setZonedTime
in interface BasicDatetime
public long getTimeValue()
public long getDateValue()
public void clearDate()
public void clearTime()
public long getJdbcTime(TimeZone zone)
Time
.
zone
- time zone in which to generate a time value forpublic long getJdbcDate(TimeZone zone)
Date
.
zone
- time zone in which to generate a time value forpublic long getJdbcTimestamp(TimeZone zone)
Timestamp
.
zone
- time zone in which to generate a time value forpublic abstract Object toJdbcObject()
protected Calendar getCalendar(TimeZone zone)
protected DateFormat getFormatter(String format)
format
- a SimpleDateFormat
format string
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |