|
|||||||||
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.ZonelessTimestamp
public class ZonelessTimestamp
ZonelessTimestamp is a timestamp value without a time zone.
Field Summary | |
---|---|
protected int |
precision
|
private static long |
serialVersionUID
SerialVersionUID created with JDK 1.5 serialver tool. |
protected Timestamp |
tempTimestamp
|
Fields inherited from class org.eigenbase.util14.ZonelessDatetime |
---|
internalTime, lastFormat, tempCal, tempFormatter |
Constructor Summary | |
---|---|
ZonelessTimestamp()
Constructs a ZonelessTimestamp. |
|
ZonelessTimestamp(int precision)
Constructs a ZonelessTimestamp with precision. |
Method Summary | |
---|---|
protected Timestamp |
getTempTimestamp(long value)
Gets a temporary Timestamp object. |
static ZonelessTimestamp |
parse(String s)
Parses a string as a ZonelessTimestamp. |
static ZonelessTimestamp |
parse(String s,
String format)
Parses a string as a ZonelessTimestamp using a given format string. |
Object |
toJdbcObject()
Returns this datetime as a Jdbc object |
String |
toString()
Converts this ZonelessTimestamp to a java.sql.Timestamp and formats it via the toString() method of that
class. |
String |
toString(String format)
Formats this ZonelessTimestamp via a SimpleDateFormat. |
Methods inherited from class org.eigenbase.util14.ZonelessDatetime |
---|
clearDate, clearTime, getCalendar, getDateValue, getFormatter, getJdbcDate, getJdbcTime, getJdbcTimestamp, getTime, getTimeValue, setZonedTime, setZonelessTime |
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 Timestamp tempTimestamp
Constructor Detail |
---|
public ZonelessTimestamp()
public ZonelessTimestamp(int precision)
The precision is the number of digits to the right of the decimal
point in the seconds value. For example, a TIMESTAMP(3)
has
a precision to milliseconds.
precision
- Number of digits of precisionMethod Detail |
---|
public Object toJdbcObject()
ZonelessDatetime
toJdbcObject
in class ZonelessDatetime
public String toString()
toString()
method of that
class.
Note: Jdbc formatting always includes a decimal point and at least one digit of milliseconds precision. Trailing zeros, except for the first one after the decimal point, do not appear in the output.
toString
in class Object
public String toString(String format)
format
- format string, as required by SimpleDateFormat
public static ZonelessTimestamp parse(String s)
This method's parsing is strict and may parse fractional seconds (as opposed to just milliseconds.)
s
- a string representing a time in ISO format, i.e. according to
the SimpleDateFormat string "yyyy-MM-dd HH:mm:ss"
public static ZonelessTimestamp parse(String s, String format)
This method's parsing is strict and may parse fractional seconds (as opposed to just milliseconds.)
s
- a string representing a time in ISO format, i.e. according to
the SimpleDateFormat string "yyyy-MM-dd HH:mm:ss"format
- format string as per SimpleDateFormat
protected Timestamp getTempTimestamp(long value)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |