com.novell.nds.dirxml.driver.jdbc.db
Class DBTimestamp
java.lang.Object
com.novell.nds.dirxml.driver.jdbc.db.AbstractTimeValue
com.novell.nds.dirxml.driver.jdbc.db.DBTimestamp
- All Implemented Interfaces:
- DBTimeTranslator
- Direct Known Subclasses:
- DB2Timestamp, SybaseTimestamp
- public class DBTimestamp
- extends AbstractTimeValue
- implements DBTimeTranslator
An abstract database timestamp.
Method Summary |
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(String nativeTime)
Translates a database-native timestamp/date/time value into an
equivalent directory format as per the arguments passed to the constructor. |
DBTimestamp
public DBTimestamp(String dbTimestamp,
String sqlClass,
String inFormat,
String outFormat)
setDSTime
public void setDSTime(String nativeTime)
throws ParseException
- Description copied from interface:
DBTimeTranslator
- Translates a database-native timestamp/date/time value into an
equivalent directory format as per the arguments passed to the constructor.
- Specified by:
setDSTime
in interface DBTimeTranslator
- Parameters:
nativeTime
- a database-native timestamp, date, or time value;
may be null
- Throws:
ParseException
precisionLost
public boolean precisionLost()
- Indicates whether precision was lost converting this timestamp
to a directory timestamp.
- Specified by:
precisionLost
in interface DBTimeTranslator
- Returns:
true
if precision was lost;
false
otherwise
getDSTime
public String getDSTime()
- Description copied from interface:
DBTimeTranslator
- 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.
- Specified by:
getDSTime
in interface DBTimeTranslator
- Returns:
- an equivalent directory canonical string value
(e.g. "20010101000000000000000", "20010101" or "000000") or a
32-bit integer string value (e.g. "1013368206") if conversion
was successful; a native database timestamp otherwise; never
returns
null