jxUtil 0.6

org.sourceforge.jxutil.sql.type
Class AbstractTIME

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

public abstract class AbstractTIME
extends AbstractType

A type defining the generics of the TIME type.


Field Summary
 
Fields inherited from class org.sourceforge.jxutil.sql.type.AbstractType
BD_ONE, BD_ZERO, name
 
Constructor Summary
protected AbstractTIME(String name)
           
 
Method Summary
 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 TIME value as an Object.
 String getString(Object row, ConversionContext ctx)
          Get the TIME value as a String.
abstract  Time getTime(Object row, Calendar cal, ConversionContext ctx)
          Get the TIME value.
 Timestamp getTimestamp(Object row, Calendar cal, ConversionContext ctx)
          Get the TIME value as a Timestamp.
 void setString(Object row, String val, ConversionContext ctx)
          Set the TIME value from a String.
abstract  void setTime(Object row, Time val, Calendar cal, ConversionContext ctx)
          Set the TIME value.
 void setTimestamp(Object row, Timestamp val, Calendar cal, ConversionContext ctx)
          Set the TIME value from a Timestamp.
 
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, 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, setDate, setDouble, setFloat, setInt, setLong, setNull, setNull, setNull, setObject, setObject, setObject, setRef, setShort, setStruct, setTime, setTimestamp, setURL, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractTIME

protected AbstractTIME(String name)
Method Detail

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 TIME value as an Object.

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

getString

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

Overrides:
getString in class AbstractType
SQLException

getTime

public abstract Time getTime(Object row,
                             Calendar cal,
                             ConversionContext ctx)
                      throws SQLException
Get the TIME value.

Overrides:
getTime in class AbstractType
SQLException

getTimestamp

public final Timestamp getTimestamp(Object row,
                                    Calendar cal,
                                    ConversionContext ctx)
                             throws SQLException
Get the TIME value as a Timestamp.

Overrides:
getTimestamp in class AbstractType
SQLException

setString

public final void setString(Object row,
                            String val,
                            ConversionContext ctx)
                     throws SQLException
Set the TIME value from a String. The string is trimmed and interpreted either as a timestamp or a time value.

Overrides:
setString in class AbstractType
SQLException

setTime

public abstract void setTime(Object row,
                             Time val,
                             Calendar cal,
                             ConversionContext ctx)
                      throws SQLException
Set the TIME value.

Overrides:
setTime in class AbstractType
SQLException

setTimestamp

public final void setTimestamp(Object row,
                               Timestamp val,
                               Calendar cal,
                               ConversionContext ctx)
                        throws SQLException
Set the TIME value from a Timestamp.

Overrides:
setTimestamp in class AbstractType
SQLException

jxUtil 0.6

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