public abstract class ZonelessDatetime extends Object implements BasicDatetime, Serializable
| Modifier and Type | Field and Description |
|---|---|
long |
internalTime
Treat this as a protected field.
|
protected String |
lastFormat |
protected Calendar |
tempCal |
protected DateFormat |
tempFormatter |
| Constructor and Description |
|---|
ZonelessDatetime() |
| Modifier and Type | Method and Description |
|---|---|
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
|
public long internalTime
protected transient Calendar tempCal
protected transient DateFormat tempFormatter
protected transient String lastFormat
public long getTime()
BasicDatetimegetTime in interface BasicDatetimepublic void setZonelessTime(long value)
BasicDatetimesetZonelessTime in interface BasicDatetimepublic void setZonedTime(long value,
TimeZone zone)
BasicDatetimesetZonedTime in interface BasicDatetimepublic 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 stringCopyright © 2012–2015 The Apache Software Foundation. All rights reserved.