|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eigenbase.util14.ZonelessDatetime org.eigenbase.util14.ZonelessTime
public class ZonelessTime
ZonelessTime is a time value without a time zone.
Field Summary | |
---|---|
protected int |
precision
|
private static long |
serialVersionUID
SerialVersionUID created with JDK 1.5 serialver tool. |
protected Time |
tempTime
|
Fields inherited from class org.eigenbase.util14.ZonelessDatetime |
---|
internalTime, lastFormat, tempCal, tempFormatter |
Constructor Summary | |
---|---|
ZonelessTime()
Constructs a ZonelessTime |
|
ZonelessTime(int precision)
Constructs a ZonelessTime with precision. |
Method Summary | |
---|---|
long |
getJdbcTimestamp(TimeZone zone)
Override ZonelessDatetime. |
protected Time |
getTempTime(long value)
Gets a temporary Time object. |
static ZonelessTime |
parse(String s)
Parses a string as a ZonelessTime. |
static ZonelessTime |
parse(String s,
String format)
Parses a string as a ZonelessTime using a given format string. |
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. |
Object |
toJdbcObject()
Returns this datetime as a Jdbc object |
String |
toString()
Converts this ZonelessTime to a java.sql.Time and formats it via the toString() method of that class. |
String |
toString(String format)
Formats this ZonelessTime via a SimpleDateFormat |
Methods inherited from class org.eigenbase.util14.ZonelessDatetime |
---|
clearDate, clearTime, getCalendar, getDateValue, getFormatter, getJdbcDate, getJdbcTime, getTime, getTimeValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
protected final int precision
protected transient Time tempTime
Constructor Detail |
---|
public ZonelessTime()
public ZonelessTime(int precision)
The precision is the number of digits to the right of the decimal
point in the seconds value. For example, a TIME(6)
has a
precision to microseconds.
precision
- Number of digits of precisionMethod Detail |
---|
public void setZonelessTime(long value)
BasicDatetime
setZonelessTime
in interface BasicDatetime
setZonelessTime
in class ZonelessDatetime
public void setZonedTime(long value, TimeZone zone)
BasicDatetime
setZonedTime
in interface BasicDatetime
setZonedTime
in class ZonelessDatetime
public Object toJdbcObject()
ZonelessDatetime
toJdbcObject
in class ZonelessDatetime
public long getJdbcTimestamp(TimeZone zone)
NOTE: the returned timestamp is based on the current date of the specified time zone, rather than the context variable for current_date, as specified by the SQL standard.
getJdbcTimestamp
in class ZonelessDatetime
zone
- time zone in which to generate a time value forpublic String toString()
toString()
method of that class.
toString
in class Object
public String toString(String format)
format
- format string, as required by SimpleDateFormat
public static ZonelessTime parse(String s)
s
- a string representing a time in ISO format, i.e. according to
the SimpleDateFormat
string "HH:mm:ss"
public static ZonelessTime parse(String s, String format)
s
- a string representing a time the given formatformat
- format string as per SimpleDateFormat
protected Time getTempTime(long value)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |