public class DBTimestamp extends AbstractTimeValue implements DBTimeTranslator
CLASS_DATE, CLASS_TIME, CLASS_TIMESTAMP| Constructor and Description |
|---|
DBTimestamp(java.lang.String dbTimestamp,
java.lang.String sqlClass,
java.lang.String inFormat,
java.lang.String outFormat) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getDSTime()
Returns this timestamp/date/time value in the directory canonical
string format (e.g.
CCYYMMDDHHMMSSNNNNNNNNN,
CCYYMMDD or HHMMSS) or in the
32-bit integer string format (e.g. "1013368206"),
if translation was successful. |
boolean |
precisionLost()
Indicates whether precision was lost converting this timestamp
to a directory timestamp.
|
void |
setDSTime(java.lang.String nativeTime)
Translates a database-native timestamp/date/time value into an
equivalent directory format as per the arguments passed to the constructor.
|
getErrorMessage, getExceptions, parseErrorequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetErrorMessage, getExceptions, parseErrorpublic DBTimestamp(java.lang.String dbTimestamp,
java.lang.String sqlClass,
java.lang.String inFormat,
java.lang.String outFormat)
public void setDSTime(java.lang.String nativeTime)
throws java.text.ParseException
DBTimeTranslatorsetDSTime in interface DBTimeTranslatornativeTime - a database-native timestamp, date, or time value;
may be nulljava.text.ParseExceptionpublic boolean precisionLost()
precisionLost in interface DBTimeTranslatortrue if precision was lost;
false otherwisepublic java.lang.String getDSTime()
DBTimeTranslatorCCYYMMDDHHMMSSNNNNNNNNN,
CCYYMMDD or HHMMSS) or in the
32-bit integer string format (e.g. "1013368206"),
if translation was successful.getDSTime in interface DBTimeTranslatornull