public class DB2Timestamp extends DBTimestamp
2002-01-01-00.00.00.000000
").CLASS_DATE, CLASS_TIME, CLASS_TIMESTAMP
Constructor and Description |
---|
DB2Timestamp(java.lang.String db2Timestamp)
Instantiates a DB2 timestamp, default native format.
|
DB2Timestamp(java.lang.String db2Timestamp,
java.lang.String sqlClass,
java.lang.String inFormat,
java.lang.String outFormat)
Instantiates a DB2 timestamp, default format.
|
Modifier and Type | Method and Description |
---|---|
void |
setDSTime(java.lang.String db2Timestamp)
Translates a database-native timestamp/date/time value into an
equivalent directory format as per the arguments passed to the constructor.
|
getDSTime, precisionLost
getErrorMessage, getExceptions, parseError
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getErrorMessage, getExceptions, parseError
public DB2Timestamp(java.lang.String db2Timestamp)
db2Timestamp
- may be null
;
the format should be yyyy-mm-dd-hh.mm.ss.ffffff
public DB2Timestamp(java.lang.String db2Timestamp, java.lang.String sqlClass, java.lang.String inFormat, java.lang.String outFormat)
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 useoutFormat
- should be "1
" (integer) or
"2
" (string); the default value is "1
"
(integer); may be null
public void setDSTime(java.lang.String db2Timestamp) throws java.text.ParseException, java.lang.IllegalArgumentException
DBTimeTranslator
setDSTime
in interface DBTimeTranslator
setDSTime
in class DBTimestamp
db2Timestamp
- a database-native timestamp, date, or time value;
may be null
java.text.ParseException
java.lang.IllegalArgumentException