jxUtil 0.6

org.sourceforge.jxutil.sql.type
Class AbstractTIMESTAMP

java.lang.Object
  |
  +--org.sourceforge.jxutil.sql.type.AbstractType
        |
        +--org.sourceforge.jxutil.sql.type.AbstractTIMESTAMP
Direct Known Subclasses:
DefaultTIMESTAMP

public abstract class AbstractTIMESTAMP
extends AbstractType

A type defining the generics of the TIMESTAMP type.


Field Summary
 
Fields inherited from class org.sourceforge.jxutil.sql.type.AbstractType
BD_ONE, BD_ZERO, name
 
Constructor Summary
protected AbstractTIMESTAMP(String name)
           
 
Method Summary
 Date getDate(Object row, Calendar cal, ConversionContext ctx)
          Get the TIMESTAMP value as a Date.
 Class getJavaClass()
          Get the Java Class returned when calling getObject on this type.
 Class getJavaType()
          Get the Java Class of the primitive type best representing data of this database type.
 int getJDBCType()
          Get the type's closest representation as a JDBC type.
 String getLiteralPrefix()
          Get the prefix to use for literal data of this type.
 String getLiteralSuffix()
          Get the suffix to use for literal data of this type.
 Object getObject(Object row, Map map, ConversionContext ctx)
          Get the TIMESTAMP value as an Object.
 String getString(Object row, ConversionContext ctx)
          Get the TIMESTAMP value as a String.
 Time getTime(Object row, Calendar cal, ConversionContext ctx)
          Get the TIMESTAMP value as a Time.
abstract  Timestamp getTimestamp(Object row, Calendar cal, ConversionContext ctx)
          Get the TIMESTAMP value.
 void setDate(Object row, Date val, Calendar cal, ConversionContext ctx)
          Set the TIMESTAMP value from a Date.
 void setString(Object row, String val, ConversionContext ctx)
          Set the TIMESTAMP value from a String.
abstract  void setTimestamp(Object row, Timestamp val, Calendar cal, ConversionContext ctx)
          Set the TIMESTAMP value.
 
Methods inherited from class org.sourceforge.jxutil.sql.type.AbstractType
dataTruncationRead, dataTruncationWrite, deriveType, getArray, getAsciiStream, getAutoInc, getBigDecimal, getBinaryStream, getBlob, getBoolean, getByte, getBytes, getCaseSensitive, getCharacterStream, getClob, getCreateParams, getCurrency, getDate, getDouble, getFloat, getInt, getLiteral, getLocalName, getLong, getMaxScale, getMinScale, getName, getNullable, getNumRadix, getObject, getPrecision, getRef, getScale, getSearchable, getShort, getTime, getTimestamp, getUnsigned, getURL, noConversion, noConversion, noConversion, setArray, setAsciiStream, setBigDecimal, setBinaryStream, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setClob, setDate, setDouble, setFloat, setInt, setLong, setNull, setNull, setNull, setObject, setObject, setObject, setRef, setShort, setStruct, setTime, setTime, setTimestamp, setURL, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractTIMESTAMP

protected AbstractTIMESTAMP(String name)
Method Detail

getDate

public final Date getDate(Object row,
                          Calendar cal,
                          ConversionContext ctx)
                   throws SQLException
Get the TIMESTAMP value as a Date.

Overrides:
getDate in class AbstractType
SQLException

getJavaClass

public final Class getJavaClass()
Description copied from class: AbstractType
Get the Java Class returned when calling getObject on this type.

Overrides:
getJavaClass in class AbstractType

getJavaType

public final Class getJavaType()
Description copied from class: AbstractType
Get the Java Class of the primitive type best representing data of this database type.

Overrides:
getJavaType in class AbstractType

getJDBCType

public final int getJDBCType()
Description copied from class: AbstractType
Get the type's closest representation as a JDBC type.

Specified by:
getJDBCType in class AbstractType
See Also:
Types

getLiteralPrefix

public String getLiteralPrefix()
Description copied from class: AbstractType
Get the prefix to use for literal data of this type.

Overrides:
getLiteralPrefix in class AbstractType

getLiteralSuffix

public String getLiteralSuffix()
Description copied from class: AbstractType
Get the suffix to use for literal data of this type.

Overrides:
getLiteralSuffix in class AbstractType

getObject

public final Object getObject(Object row,
                              Map map,
                              ConversionContext ctx)
                       throws SQLException
Get the TIMESTAMP value as an Object.

Overrides:
getObject in class AbstractType
Returns:
the timestamp instance
SQLException
See Also:
AbstractType.getTimestamp(Object, ConversionContext)

getString

public final String getString(Object row,
                              ConversionContext ctx)
                       throws SQLException
Get the TIMESTAMP value as a String.

Overrides:
getString in class AbstractType
SQLException

getTime

public final Time getTime(Object row,
                          Calendar cal,
                          ConversionContext ctx)
                   throws SQLException
Get the TIMESTAMP value as a Time.

Overrides:
getTime in class AbstractType
SQLException

getTimestamp

public abstract Timestamp getTimestamp(Object row,
                                       Calendar cal,
                                       ConversionContext ctx)
                                throws SQLException
Get the TIMESTAMP value.

Overrides:
getTimestamp in class AbstractType
SQLException

setDate

public final void setDate(Object row,
                          Date val,
                          Calendar cal,
                          ConversionContext ctx)
                   throws SQLException
Set the TIMESTAMP value from a Date. The timestamp value is the value of the date with zero time added.

Overrides:
setDate in class AbstractType
SQLException

setString

public void setString(Object row,
                      String val,
                      ConversionContext ctx)
               throws SQLException
Set the TIMESTAMP value from a String. The string parameter is trimmed and interpreted either as a Timestamp representation or a Date representation.

Overrides:
setString in class AbstractType
SQLException

setTimestamp

public abstract void setTimestamp(Object row,
                                  Timestamp val,
                                  Calendar cal,
                                  ConversionContext ctx)
                           throws SQLException
Set the TIMESTAMP value.

Overrides:
setTimestamp in class AbstractType
SQLException

jxUtil 0.6

Copyright © 2001,2002 Keve Müller, et al.; see LICENSE file for details.