com.novell.nds.dirxml.driver.jdbc.db
Class DB2Timestamp

java.lang.Object
  extended bycom.novell.nds.dirxml.driver.jdbc.db.AbstractTimeValue
      extended bycom.novell.nds.dirxml.driver.jdbc.db.DBTimestamp
          extended bycom.novell.nds.dirxml.driver.jdbc.db.DB2Timestamp
All Implemented Interfaces:
DBTimeTranslator

public class DB2Timestamp
extends DBTimestamp

A DB2 timestamp, default format (e.g. "2002-01-01-00.00.00.000000").


Field Summary
 
Fields inherited from interface com.novell.nds.dirxml.driver.jdbc.db.DBTimeTranslator
CLASS_DATE, CLASS_TIME, CLASS_TIMESTAMP
 
Constructor Summary
DB2Timestamp(String db2Timestamp)
          Instantiates a DB2 timestamp, default native format.
DB2Timestamp(String db2Timestamp, String sqlClass, String inFormat, String outFormat)
          Instantiates a DB2 timestamp, default format.
 
Method Summary
 void setDSTime(String db2Timestamp)
          Translates a database-native timestamp/date/time value into an equivalent directory format as per the arguments passed to the constructor.
 
Methods inherited from class com.novell.nds.dirxml.driver.jdbc.db.DBTimestamp
getDSTime, precisionLost
 
Methods inherited from class com.novell.nds.dirxml.driver.jdbc.db.AbstractTimeValue
getErrorMessage, getExceptions, parseError
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.novell.nds.dirxml.driver.jdbc.db.DBTimeTranslator
getErrorMessage, getExceptions, parseError
 

Constructor Detail

DB2Timestamp

public DB2Timestamp(String db2Timestamp)
Instantiates a DB2 timestamp, default native format.

Parameters:
db2Timestamp - may be null; the format should be yyyy-mm-dd-hh.mm.ss.ffffff

DB2Timestamp

public DB2Timestamp(String db2Timestamp,
                    String sqlClass,
                    String inFormat,
                    String outFormat)
Instantiates a DB2 timestamp, default format.

Parameters:
db2Timestamp - may be null; format should be yyyy-mm-dd-hh.mm.ss.ffffff
sqlClass - should be java.sql.Timestamp, java.sql.Date or java.sql.Time; the default value is java.sql.Timestamp
inFormat - this parameter is currently ignored and reserved for future use
outFormat - should be "1" (integer) or "2" (string); the default value is "1" (integer); may be null
Method Detail

setDSTime

public void setDSTime(String db2Timestamp)
               throws ParseException,
                      IllegalArgumentException
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
Overrides:
setDSTime in class DBTimestamp
Throws:
ParseException
IllegalArgumentException