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

java.lang.Object
  extended bycom.novell.nds.dirxml.driver.jdbc.db.AbstractTimeValue
      extended bycom.novell.nds.dirxml.driver.jdbc.db.DSTime

public class DSTime
extends AbstractTimeValue

An abstract directory time value. Represents either a 32-bit integer string (e.g., "1013368206") or a canonical timestamp, date, or time string (i.e., CCYYMMDDHHMMSSNNNNNNNNN, CCYYMMDD or HHMMSS).


Constructor Summary
DSTime(String dsTime, String sqlClass, String inFormat)
          Instantiates a directory time value.
 
Method Summary
 String getDBTime()
          Returns the string representation of a java.sql.Timestamp, java.sql.Date or java.sql.Time instance.
 Object getInstance()
          Returns an instance of java.sql.Timestamp, java.sql.Date or java.sql.Time instance.
 
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
 

Constructor Detail

DSTime

public DSTime(String dsTime,
              String sqlClass,
              String inFormat)
Instantiates a directory time value.

Parameters:
dsTime - may be null; format should be CCYYMMDDHHMMSSNNNNNNNNN, CCYYMMDD, HHMMSS or a 32-bit integer value
sqlClass - indicates the type of object to be returned from the getInstance():java.util.Date method; should be java.sql.Timestamp, java.sql.Date or java.sql.Time; the default value is java.sql.Timestamp
inFormat - should be "1" (integer) or "2" (string); the default value is "1" (integer); may be null
Method Detail

getDBTime

public String getDBTime()
Returns the string representation of a java.sql.Timestamp, java.sql.Date or java.sql.Time instance.

Returns:
may return empty string in the event of a parse error; will not return null

getInstance

public Object getInstance()
Returns an instance of java.sql.Timestamp, java.sql.Date or java.sql.Time instance.

Returns:
may return null in the event of a parse error