jxUtil 0.6

org.sourceforge.jxutil.sql.type
Class AbstractCHAR

java.lang.Object
  |
  +--org.sourceforge.jxutil.sql.type.AbstractType
        |
        +--org.sourceforge.jxutil.sql.type.AbstractText
              |
              +--org.sourceforge.jxutil.sql.type.AbstractCHAR
Direct Known Subclasses:
DefaultCHAR

public abstract class AbstractCHAR
extends AbstractText

A type defining the generics of the CHAR type.


Field Summary
protected  int length
           
 
Fields inherited from class org.sourceforge.jxutil.sql.type.AbstractType
BD_ONE, BD_ZERO, name
 
Constructor Summary
protected AbstractCHAR(String name, int length)
           
 
Method Summary
 BigDecimal getBigDecimal(Object row, ConversionContext ctx)
          Get a BigDecimal.
 boolean getBoolean(Object row, ConversionContext ctx)
          Get a boolean.
 byte getByte(Object row, ConversionContext ctx)
          Get a byte.
 Date getDate(Object row, Calendar cal, ConversionContext ctx)
          Get the value as a Date.
 double getDouble(Object row, ConversionContext ctx)
          Get a double.
 float getFloat(Object row, ConversionContext ctx)
          Get a float.
 int getInt(Object row, ConversionContext ctx)
          Get an int.
 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.
 long getLong(Object row, ConversionContext ctx)
          Get a long.
 Object getObject(Object row, Map map, ConversionContext ctx)
           
 int getPrecision()
          Get the type's precision.
 short getShort(Object row, ConversionContext ctx)
          Get a short.
abstract  String getString(Object row, ConversionContext ctx)
           
 Time getTime(Object row, Calendar cal, ConversionContext ctx)
          Get the value as a Time.
 Timestamp getTimestamp(Object row, Calendar cal, ConversionContext ctx)
          Get the value as a Timestamp.
 void setBigDecimal(Object row, BigDecimal val, ConversionContext ctx)
           
 void setBoolean(Object row, boolean val, ConversionContext ctx)
           
 void setByte(Object row, byte val, ConversionContext ctx)
           
 void setDate(Object row, Date val, Calendar cal, ConversionContext ctx)
           
 void setDouble(Object row, double val, ConversionContext ctx)
           
 void setFloat(Object row, float val, ConversionContext ctx)
           
 void setInt(Object row, int val, ConversionContext ctx)
           
 void setLong(Object row, long val, ConversionContext ctx)
           
 void setShort(Object row, short val, ConversionContext ctx)
           
abstract  void setString(Object row, String val, ConversionContext ctx)
           
 void setTime(Object row, Time val, Calendar cal, ConversionContext ctx)
           
 void setTimestamp(Object row, Timestamp val, Calendar cal, ConversionContext ctx)
           
 
Methods inherited from class org.sourceforge.jxutil.sql.type.AbstractType
dataTruncationRead, dataTruncationWrite, deriveType, getArray, getAsciiStream, getAutoInc, getBinaryStream, getBlob, getBytes, getCaseSensitive, getCharacterStream, getClob, getCreateParams, getCurrency, getDate, getLiteral, getLocalName, getMaxScale, getMinScale, getName, getNullable, getNumRadix, getObject, getRef, getScale, getSearchable, getTime, getTimestamp, getUnsigned, getURL, noConversion, noConversion, noConversion, setArray, setAsciiStream, setBinaryStream, setBlob, setBytes, setCharacterStream, setClob, setDate, setNull, setNull, setNull, setObject, setObject, setObject, setRef, setStruct, setTime, setTimestamp, setURL, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

length

protected final int length
Constructor Detail

AbstractCHAR

protected AbstractCHAR(String name,
                       int length)
Method Detail

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

getPrecision

public final int getPrecision()
Description copied from class: AbstractType
Get the type's precision.

Overrides:
getPrecision in class AbstractType

getBigDecimal

public final BigDecimal getBigDecimal(Object row,
                                      ConversionContext ctx)
                               throws SQLException
Description copied from class: AbstractType
Get a BigDecimal.

Overrides:
getBigDecimal in class AbstractType
SQLException

getBoolean

public final boolean getBoolean(Object row,
                                ConversionContext ctx)
                         throws SQLException
Description copied from class: AbstractType
Get a boolean.

Overrides:
getBoolean in class AbstractType
SQLException

getByte

public final byte getByte(Object row,
                          ConversionContext ctx)
                   throws SQLException
Description copied from class: AbstractType
Get a byte.

Overrides:
getByte in class AbstractType
SQLException

getDate

public Date getDate(Object row,
                    Calendar cal,
                    ConversionContext ctx)
             throws SQLException
Get the value as a Date. Allowed input is the string representation of a Date or Timestamp value. yyyy-mm-dd or yyyy-mm-dd hh:mm:ss.ffffff

Overrides:
getDate in class AbstractType
SQLException

getDouble

public final double getDouble(Object row,
                              ConversionContext ctx)
                       throws SQLException
Description copied from class: AbstractType
Get a double.

Overrides:
getDouble in class AbstractType
SQLException

getFloat

public final float getFloat(Object row,
                            ConversionContext ctx)
                     throws SQLException
Description copied from class: AbstractType
Get a float.

Overrides:
getFloat in class AbstractType
SQLException

getInt

public final int getInt(Object row,
                        ConversionContext ctx)
                 throws SQLException
Description copied from class: AbstractType
Get an int.

Overrides:
getInt in class AbstractType
SQLException

getJavaClass

public 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 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

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

getLong

public final long getLong(Object row,
                          ConversionContext ctx)
                   throws SQLException
Description copied from class: AbstractType
Get a long.

Overrides:
getLong in class AbstractType
SQLException

getObject

public final Object getObject(Object row,
                              Map map,
                              ConversionContext ctx)
Overrides:
getObject in class AbstractType

getShort

public final short getShort(Object row,
                            ConversionContext ctx)
                     throws SQLException
Description copied from class: AbstractType
Get a short.

Overrides:
getShort in class AbstractType
SQLException

getString

public abstract String getString(Object row,
                                 ConversionContext ctx)
Overrides:
getString in class AbstractType

getTime

public Time getTime(Object row,
                    Calendar cal,
                    ConversionContext ctx)
             throws SQLException
Get the value as a Time. Allowed input is the string representation of a Time or Timestamp value. hh:mm:ss or yyyy-mm-dd hh:mm:ss.ffffff

Overrides:
getTime in class AbstractType
SQLException

getTimestamp

public Timestamp getTimestamp(Object row,
                              Calendar cal,
                              ConversionContext ctx)
                       throws SQLException
Get the value as a Timestamp. Allowed input is the string representation of a Date, Time or Timestamp value. hh:mm:ss or yyyy-mm-dd or yyyy-mm-dd hh:mm:ss.ffffff

Overrides:
getTimestamp in class AbstractType
SQLException

setBigDecimal

public final void setBigDecimal(Object row,
                                BigDecimal val,
                                ConversionContext ctx)
Overrides:
setBigDecimal in class AbstractType

setBoolean

public final void setBoolean(Object row,
                             boolean val,
                             ConversionContext ctx)
Overrides:
setBoolean in class AbstractType

setByte

public final void setByte(Object row,
                          byte val,
                          ConversionContext ctx)
Overrides:
setByte in class AbstractType

setDate

public final void setDate(Object row,
                          Date val,
                          Calendar cal,
                          ConversionContext ctx)
Overrides:
setDate in class AbstractType

setDouble

public final void setDouble(Object row,
                            double val,
                            ConversionContext ctx)
Overrides:
setDouble in class AbstractType

setFloat

public final void setFloat(Object row,
                           float val,
                           ConversionContext ctx)
Overrides:
setFloat in class AbstractType

setInt

public final void setInt(Object row,
                         int val,
                         ConversionContext ctx)
Overrides:
setInt in class AbstractType

setLong

public final void setLong(Object row,
                          long val,
                          ConversionContext ctx)
Overrides:
setLong in class AbstractType

setShort

public final void setShort(Object row,
                           short val,
                           ConversionContext ctx)
Overrides:
setShort in class AbstractType

setString

public abstract void setString(Object row,
                               String val,
                               ConversionContext ctx)
Overrides:
setString in class AbstractType

setTime

public final void setTime(Object row,
                          Time val,
                          Calendar cal,
                          ConversionContext ctx)
Overrides:
setTime in class AbstractType

setTimestamp

public final void setTimestamp(Object row,
                               Timestamp val,
                               Calendar cal,
                               ConversionContext ctx)
Overrides:
setTimestamp in class AbstractType

jxUtil 0.6

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