jxUtil 0.6

org.sourceforge.jxutil.sql.type
Class ProxyType

java.lang.Object
  |
  +--org.sourceforge.jxutil.sql.type.AbstractType
        |
        +--org.sourceforge.jxutil.sql.type.ProxyType

public class ProxyType
extends AbstractType


Field Summary
 boolean autoIncrement
           
 boolean caseSensitive
           
 int columnType
           
 String columnTypeName
           
 boolean currency
           
 boolean definitelyWritable
           
 int nullable
           
 int precision
           
 boolean readOnly
           
 int scale
           
 int searchable
           
 boolean signed
           
 AbstractType type
           
 boolean writable
           
 
Fields inherited from class org.sourceforge.jxutil.sql.type.AbstractType
BD_ONE, BD_ZERO, name
 
Constructor Summary
ProxyType()
           
ProxyType(ResultSetMetaData rsMeta, int idx)
           
 
Method Summary
 AbstractType deriveType(int d)
          Derive a type from this type, modifying it according to the given integer parameter.
 Array getArray(Object o, ConversionContext ctx)
           
 InputStream getAsciiStream(Object o, ConversionContext ctx)
           
 boolean getAutoInc()
          Get whether this type is automatically incrementing.
 BigDecimal getBigDecimal(Object o, ConversionContext ctx)
          Get a BigDecimal.
 InputStream getBinaryStream(Object o, ConversionContext ctx)
           
 Blob getBlob(Object o, ConversionContext ctx)
           
 boolean getBoolean(Object o, ConversionContext ctx)
          Get a boolean.
 byte getByte(Object o, ConversionContext ctx)
          Get a byte.
 byte[] getBytes(Object o, ConversionContext ctx)
           
 boolean getCaseSensitive()
          Get whether data of this type is treated case sensitive.
 Reader getCharacterStream(Object o, ConversionContext ctx)
           
 Clob getClob(Object o, ConversionContext ctx)
           
 String getCreateParams()
          Get the additional parameters to supply in a CREATE TABLE statement using this type.
 boolean getCurrency()
          Get whether this type is a currency type.
 Date getDate(Object o, Calendar cal, ConversionContext ctx)
          Get a Date using given Calendar.
 double getDouble(Object o, ConversionContext ctx)
          Get a double.
 float getFloat(Object o, ConversionContext ctx)
          Get a float.
 int getInt(Object o, 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 getLiteral(Object o, ConversionContext ctx)
          Get a literal value.
 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.
 String getLocalName()
          Get the type's local name.
 long getLong(Object o, ConversionContext ctx)
          Get a long.
 short getMaxScale()
          Get the type's maximum allowed scale.
 short getMinScale()
          Get the type's minimum allowed scale.
 int getNullable()
          Get whether this type can be nulled.
 int getNumRadix()
          Get the type's numeric radix.
 Object getObject(Object o, Map map, ConversionContext ctx)
           
 int getPrecision()
          Get the type's precision.
 Ref getRef(Object o, ConversionContext ctx)
           
 int getScale()
          Get the type's scale.
 int getSearchable()
          Get whether columns of this type can be used in search constructs.
 short getShort(Object o, ConversionContext ctx)
          Get a short.
 String getString(Object o, ConversionContext ctx)
           
 Time getTime(Object o, Calendar cal, ConversionContext ctx)
          Get a Time using given Calendar.
 Timestamp getTimestamp(Object o, Calendar cal, ConversionContext ctx)
           
 boolean getUnsigned()
          Get whether data of this type is unsigned.
 URL getURL(Object o, ConversionContext ctx)
           
 void setArray(Object o, Array x, ConversionContext ctx)
           
 void setAsciiStream(Object o, InputStream in, int length, ConversionContext ctx)
           
 void setBigDecimal(Object o, BigDecimal x, ConversionContext ctx)
           
 void setBinaryStream(Object o, InputStream in, int length, ConversionContext ctx)
           
 void setBlob(Object o, Blob x, ConversionContext ctx)
           
 void setBoolean(Object o, boolean x, ConversionContext ctx)
           
 void setByte(Object o, byte x, ConversionContext ctx)
           
 void setBytes(Object o, byte[] x, ConversionContext ctx)
           
 void setCharacterStream(Object o, Reader in, int length, ConversionContext ctx)
           
 void setClob(Object o, Clob x, ConversionContext ctx)
           
 void setDate(Object o, Date x, Calendar cal, ConversionContext ctx)
           
 void setDouble(Object o, double x, ConversionContext ctx)
           
 void setFloat(Object o, float x, ConversionContext ctx)
           
 void setInt(Object o, int x, ConversionContext ctx)
           
 void setLong(Object o, long x, ConversionContext ctx)
           
 void setNull(Object o, ConversionContext ctx)
           
 void setNull(Object o, int parameterType, ConversionContext ctx)
           
 void setNull(Object o, int parameterType, String parameterName, ConversionContext ctx)
           
 void setObject(Object o, Object x, ConversionContext ctx)
           
 void setObject(Object o, Object x, int target, ConversionContext ctx)
          Set value from Object.
 void setObject(Object o, Object x, int target, int scale, ConversionContext ctx)
          Set value from Object.
 void setRef(Object o, Ref x, ConversionContext ctx)
           
 void setShort(Object o, short x, ConversionContext ctx)
           
 void setString(Object o, String x, ConversionContext ctx)
           
 void setStruct(Object o, Struct x, ConversionContext ctx)
           
 void setTime(Object o, Time x, Calendar cal, ConversionContext ctx)
           
 void setTimestamp(Object o, Timestamp x, Calendar cal, ConversionContext ctx)
           
 void setURL(Object o, URL x, ConversionContext ctx)
           
 String toString()
          Print lots of information on this type.
 
Methods inherited from class org.sourceforge.jxutil.sql.type.AbstractType
dataTruncationRead, dataTruncationWrite, getDate, getName, getObject, getTime, getTimestamp, noConversion, noConversion, noConversion, setDate, setTime, setTimestamp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

autoIncrement

public boolean autoIncrement

caseSensitive

public boolean caseSensitive

columnType

public int columnType

columnTypeName

public String columnTypeName

currency

public boolean currency

definitelyWritable

public boolean definitelyWritable

nullable

public int nullable

precision

public int precision

readOnly

public boolean readOnly

scale

public int scale

searchable

public int searchable

signed

public boolean signed

type

public AbstractType type

writable

public boolean writable
Constructor Detail

ProxyType

public ProxyType()

ProxyType

public ProxyType(ResultSetMetaData rsMeta,
                 int idx)
          throws SQLException
Method Detail

deriveType

public AbstractType deriveType(int d)
Derive a type from this type, modifying it according to the given integer parameter. By default the type is returned as-is.

Overrides:
deriveType in class AbstractType

getArray

public Array getArray(Object o,
                      ConversionContext ctx)
               throws SQLException
Overrides:
getArray in class AbstractType
SQLException

getAsciiStream

public InputStream getAsciiStream(Object o,
                                  ConversionContext ctx)
                           throws SQLException
Overrides:
getAsciiStream in class AbstractType
SQLException

getAutoInc

public boolean getAutoInc()
Get whether this type is automatically incrementing.

Overrides:
getAutoInc in class AbstractType

getBigDecimal

public BigDecimal getBigDecimal(Object o,
                                ConversionContext ctx)
                         throws SQLException
Get a BigDecimal.

Overrides:
getBigDecimal in class AbstractType
SQLException

getBinaryStream

public InputStream getBinaryStream(Object o,
                                   ConversionContext ctx)
                            throws SQLException
Overrides:
getBinaryStream in class AbstractType
SQLException

getBlob

public Blob getBlob(Object o,
                    ConversionContext ctx)
             throws SQLException
Overrides:
getBlob in class AbstractType
SQLException

getBoolean

public boolean getBoolean(Object o,
                          ConversionContext ctx)
                   throws SQLException
Get a boolean.

Overrides:
getBoolean in class AbstractType
SQLException

getByte

public byte getByte(Object o,
                    ConversionContext ctx)
             throws SQLException
Get a byte.

Overrides:
getByte in class AbstractType
SQLException

getBytes

public byte[] getBytes(Object o,
                       ConversionContext ctx)
                throws SQLException
Overrides:
getBytes in class AbstractType
SQLException

getCaseSensitive

public boolean getCaseSensitive()
Get whether data of this type is treated case sensitive.

Overrides:
getCaseSensitive in class AbstractType

getCharacterStream

public Reader getCharacterStream(Object o,
                                 ConversionContext ctx)
                          throws SQLException
Overrides:
getCharacterStream in class AbstractType
SQLException

getClob

public Clob getClob(Object o,
                    ConversionContext ctx)
             throws SQLException
Overrides:
getClob in class AbstractType
SQLException

getCreateParams

public String getCreateParams()
Get the additional parameters to supply in a CREATE TABLE statement using this type.

Overrides:
getCreateParams in class AbstractType

getCurrency

public boolean getCurrency()
Get whether this type is a currency type.

Overrides:
getCurrency in class AbstractType

getDate

public Date getDate(Object o,
                    Calendar cal,
                    ConversionContext ctx)
             throws SQLException
Get a Date using given Calendar.

Overrides:
getDate in class AbstractType
SQLException

getDouble

public double getDouble(Object o,
                        ConversionContext ctx)
                 throws SQLException
Get a double.

Overrides:
getDouble in class AbstractType
SQLException

getFloat

public float getFloat(Object o,
                      ConversionContext ctx)
               throws SQLException
Get a float.

Overrides:
getFloat in class AbstractType
SQLException

getInt

public int getInt(Object o,
                  ConversionContext ctx)
           throws SQLException
Get an int.

Overrides:
getInt in class AbstractType
SQLException

getJavaClass

public Class getJavaClass()
Get the Java Class returned when calling getObject on this type.

Overrides:
getJavaClass in class AbstractType

getJavaType

public Class getJavaType()
Get the Java Class of the primitive type best representing data of this database type.

Overrides:
getJavaType in class AbstractType

getJDBCType

public int getJDBCType()
Get the type's closest representation as a JDBC type.

Specified by:
getJDBCType in class AbstractType
See Also:
Types

getLiteral

public String getLiteral(Object o,
                         ConversionContext ctx)
                  throws SQLException
Get a literal value.

Overrides:
getLiteral in class AbstractType
SQLException

getLiteralPrefix

public String getLiteralPrefix()
Get the prefix to use for literal data of this type.

Overrides:
getLiteralPrefix in class AbstractType

getLiteralSuffix

public String getLiteralSuffix()
Get the suffix to use for literal data of this type.

Overrides:
getLiteralSuffix in class AbstractType

getLocalName

public String getLocalName()
Get the type's local name.

Overrides:
getLocalName in class AbstractType

getLong

public long getLong(Object o,
                    ConversionContext ctx)
             throws SQLException
Get a long.

Overrides:
getLong in class AbstractType
SQLException

getMaxScale

public short getMaxScale()
Get the type's maximum allowed scale.

Overrides:
getMaxScale in class AbstractType

getMinScale

public short getMinScale()
Get the type's minimum allowed scale.

Overrides:
getMinScale in class AbstractType

getNullable

public int getNullable()
Get whether this type can be nulled.

Overrides:
getNullable in class AbstractType

getNumRadix

public int getNumRadix()
Get the type's numeric radix.

Overrides:
getNumRadix in class AbstractType

getObject

public Object getObject(Object o,
                        Map map,
                        ConversionContext ctx)
                 throws SQLException
Overrides:
getObject in class AbstractType
SQLException

getPrecision

public int getPrecision()
Get the type's precision.

Overrides:
getPrecision in class AbstractType

getRef

public Ref getRef(Object o,
                  ConversionContext ctx)
           throws SQLException
Overrides:
getRef in class AbstractType
SQLException

getScale

public int getScale()
Get the type's scale.

Overrides:
getScale in class AbstractType

getSearchable

public int getSearchable()
Get whether columns of this type can be used in search constructs.

Overrides:
getSearchable in class AbstractType

getShort

public short getShort(Object o,
                      ConversionContext ctx)
               throws SQLException
Get a short.

Overrides:
getShort in class AbstractType
SQLException

getString

public String getString(Object o,
                        ConversionContext ctx)
                 throws SQLException
Overrides:
getString in class AbstractType
SQLException

getTime

public Time getTime(Object o,
                    Calendar cal,
                    ConversionContext ctx)
             throws SQLException
Get a Time using given Calendar.

Overrides:
getTime in class AbstractType
SQLException

getTimestamp

public Timestamp getTimestamp(Object o,
                              Calendar cal,
                              ConversionContext ctx)
                       throws SQLException
Overrides:
getTimestamp in class AbstractType
SQLException

getUnsigned

public boolean getUnsigned()
Get whether data of this type is unsigned.

Overrides:
getUnsigned in class AbstractType

getURL

public URL getURL(Object o,
                  ConversionContext ctx)
           throws SQLException
Overrides:
getURL in class AbstractType
SQLException

setArray

public void setArray(Object o,
                     Array x,
                     ConversionContext ctx)
              throws SQLException
Overrides:
setArray in class AbstractType
SQLException

setAsciiStream

public void setAsciiStream(Object o,
                           InputStream in,
                           int length,
                           ConversionContext ctx)
                    throws SQLException
Overrides:
setAsciiStream in class AbstractType
SQLException

setBigDecimal

public void setBigDecimal(Object o,
                          BigDecimal x,
                          ConversionContext ctx)
                   throws SQLException
Overrides:
setBigDecimal in class AbstractType
SQLException

setBinaryStream

public void setBinaryStream(Object o,
                            InputStream in,
                            int length,
                            ConversionContext ctx)
                     throws SQLException
Overrides:
setBinaryStream in class AbstractType
SQLException

setBlob

public void setBlob(Object o,
                    Blob x,
                    ConversionContext ctx)
             throws SQLException
Overrides:
setBlob in class AbstractType
SQLException

setBoolean

public void setBoolean(Object o,
                       boolean x,
                       ConversionContext ctx)
                throws SQLException
Overrides:
setBoolean in class AbstractType
SQLException

setByte

public void setByte(Object o,
                    byte x,
                    ConversionContext ctx)
             throws SQLException
Overrides:
setByte in class AbstractType
SQLException

setBytes

public void setBytes(Object o,
                     byte[] x,
                     ConversionContext ctx)
              throws SQLException
Overrides:
setBytes in class AbstractType
SQLException

setCharacterStream

public void setCharacterStream(Object o,
                               Reader in,
                               int length,
                               ConversionContext ctx)
                        throws SQLException
Overrides:
setCharacterStream in class AbstractType
SQLException

setClob

public void setClob(Object o,
                    Clob x,
                    ConversionContext ctx)
             throws SQLException
Overrides:
setClob in class AbstractType
SQLException

setDate

public void setDate(Object o,
                    Date x,
                    Calendar cal,
                    ConversionContext ctx)
             throws SQLException
Overrides:
setDate in class AbstractType
SQLException

setDouble

public void setDouble(Object o,
                      double x,
                      ConversionContext ctx)
               throws SQLException
Overrides:
setDouble in class AbstractType
SQLException

setFloat

public void setFloat(Object o,
                     float x,
                     ConversionContext ctx)
              throws SQLException
Overrides:
setFloat in class AbstractType
SQLException

setInt

public void setInt(Object o,
                   int x,
                   ConversionContext ctx)
            throws SQLException
Overrides:
setInt in class AbstractType
SQLException

setLong

public void setLong(Object o,
                    long x,
                    ConversionContext ctx)
             throws SQLException
Overrides:
setLong in class AbstractType
SQLException

setNull

public void setNull(Object o,
                    ConversionContext ctx)
             throws SQLException
Overrides:
setNull in class AbstractType
SQLException

setNull

public void setNull(Object o,
                    int parameterType,
                    ConversionContext ctx)
             throws SQLException
Overrides:
setNull in class AbstractType
SQLException

setNull

public void setNull(Object o,
                    int parameterType,
                    String parameterName,
                    ConversionContext ctx)
             throws SQLException
Overrides:
setNull in class AbstractType
SQLException

setObject

public void setObject(Object o,
                      Object x,
                      ConversionContext ctx)
               throws SQLException
Overrides:
setObject in class AbstractType
SQLException

setObject

public void setObject(Object o,
                      Object x,
                      int target,
                      ConversionContext ctx)
               throws SQLException
Description copied from class: AbstractType
Set value from Object. The target parameter is ignored.

Overrides:
setObject in class AbstractType
SQLException

setObject

public void setObject(Object o,
                      Object x,
                      int target,
                      int scale,
                      ConversionContext ctx)
               throws SQLException
Description copied from class: AbstractType
Set value from Object. The target and scale parameters are ignored.

Overrides:
setObject in class AbstractType
SQLException

setRef

public void setRef(Object o,
                   Ref x,
                   ConversionContext ctx)
            throws SQLException
Overrides:
setRef in class AbstractType
SQLException

setShort

public void setShort(Object o,
                     short x,
                     ConversionContext ctx)
              throws SQLException
Overrides:
setShort in class AbstractType
SQLException

setString

public void setString(Object o,
                      String x,
                      ConversionContext ctx)
               throws SQLException
Overrides:
setString in class AbstractType
SQLException

setStruct

public void setStruct(Object o,
                      Struct x,
                      ConversionContext ctx)
               throws SQLException
Overrides:
setStruct in class AbstractType
SQLException

setTime

public void setTime(Object o,
                    Time x,
                    Calendar cal,
                    ConversionContext ctx)
             throws SQLException
Overrides:
setTime in class AbstractType
SQLException

setTimestamp

public void setTimestamp(Object o,
                         Timestamp x,
                         Calendar cal,
                         ConversionContext ctx)
                  throws SQLException
Overrides:
setTimestamp in class AbstractType
SQLException

setURL

public void setURL(Object o,
                   URL x,
                   ConversionContext ctx)
            throws SQLException
Overrides:
setURL in class AbstractType
SQLException

toString

public String toString()
Print lots of information on this type.

Overrides:
toString in class AbstractType

jxUtil 0.6

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