## org.firebirdsql.jdbc.field
Class FBField

    java.lang.Object
      org.firebirdsql.jdbc.field.FBField

Direct Known Subclasses:
  FBBigDecimalField, FBBlobField, FBStringField

    public abstract class FBField

extends Object

Describe class `FBField` here.

Version:
  1.0
Author:
  Roman Rokytskyy

Field Summary
`protected XSQLVAR` `field`
`protected GDSHelper` `gdsHelper`
`protected String` `iscEncoding`
`protected String` `javaEncoding`
`protected String` `mappingPath`
`protected int` `numCol`
`protected int` `requiredType`
`protected int` `scale`

Method Summary
`void` `close()` Close this field.
`static FBField` `createField(XSQLVAR field, FieldDataProvider dataProvider, GDSHelper gdsHelper, boolean cached)` This is a factory method that creates appropriate instance of the `FBField` class according to the SQL datatype.
`String` `getAlias()` Returns the alias of the column as declared in XSQLVAR.
`Array` `getArray()`
`InputStream` `getAsciiStream()`
`BigDecimal` `getBigDecimal()`
`BigDecimal` `getBigDecimal(int scale)`
`InputStream` `getBinaryStream()`
`Blob` `getBlob()`
`boolean` `getBoolean()`
`byte` `getByte()`
`byte[]` `getBytes()`
`Reader` `getCharacterStream()`
`Clob` `getClob()`
`Date` `getDate()`
`Date` `getDate(Calendar cal)`
`double` `getDouble()`
`protected byte[]` `getFieldData()`
`float` `getFloat()`
`int` `getInt()`
`long` `getLong()`
`String` `getName()` Returns the name of the column as declared in the XSQLVAR.
`Object` `getObject()`
`Object` `getObject(Map map)`
`Ref` `getRef()`
`String` `getRelationName()` Returns the relation to which belongs column as declared in XSQLVAR.
`short` `getShort()`
`String` `getString()`
`Time` `getTime()`
`Time` `getTime(Calendar cal)`
`Timestamp` `getTimestamp()`
`Timestamp` `getTimestamp(Calendar cal)`
`InputStream` `getUnicodeStream()`
`static boolean` `isCompatible(XSQLVAR field, int type)` This method implements the type compatibility matrix from "JDBC(tm): A Java SQL API, version 1.20" whitepaper, page 21.
`protected boolean` `isInvertTimeZone()`
`boolean` `isNull()`
`static boolean` `isType(XSQLVAR field, int type)`
`void` `setAsciiStream(InputStream in, int length)`
`void` `setBigDecimal(BigDecimal value)`
`void` `setBinaryStream(InputStream in, int length)`
`void` `setBlob(FBBlob blob)`
`void` `setBoolean(boolean value)`
`void` `setByte(byte value)`
`void` `setBytes(byte[] value)`
`void` `setCharacterStream(Reader in, int length)`
`void` `setConnection(GDSHelper gdsHelper)`
`void` `setDate(Date value)`
`void` `setDate(Date value, Calendar cal)`
`void` `setDouble(double value)`
`protected void` `setFieldData(byte[] data)`
`void` `setFloat(float value)`
`void` `setInteger(int value)`
`void` `setLong(long value)`
`void` `setNull()`
`void` `setObject(Object value)`
`void` `setRequiredType(int requiredType)` Set the required type for `getObject()` conversion.
`void` `setShort(short value)`
`void` `setString(String value)`
`void` `setTime(Time value)`
`void` `setTime(Time value, Calendar cal)`
`void` `setTimestamp(Timestamp value)`
`void` `setTimestamp(Timestamp value, Calendar cal)`
`void` `setUnicodeStream(InputStream in, int length)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### field

    protected XSQLVAR field

### numCol

    protected int numCol

### gdsHelper

    protected GDSHelper gdsHelper

### iscEncoding

    protected String iscEncoding

### javaEncoding

    protected String javaEncoding

### mappingPath

    protected String mappingPath

### requiredType

    protected int requiredType

### scale

    protected int scale

Method Detail

### getFieldData

    protected byte[] getFieldData()

### setFieldData

    protected void setFieldData(byte[] data)

### isNull

    public boolean isNull()
                   throws SQLException

  Returns:
    `true` if the corresponding `field` is `null`, otherwise `false`.
  Throws:
    `SQLException`

### setNull

    public void setNull()

### setConnection

    public void setConnection(GDSHelper gdsHelper)

### setRequiredType

    public void setRequiredType(int requiredType)

  Set the required type for `getObject()` conversion.

  Parameters:
    `requiredType` - required type, one of the `Types` constants.

### isType

    public static final boolean isType(XSQLVAR field,
                                       int type)

  Returns:
    `true` if the field is of type `type`. TODO write correct ISCConstants.SQL_QUAD support

### isCompatible

    public static final boolean isCompatible(XSQLVAR field,
                                             int type)

  This method implements the type compatibility matrix from "JDBC(tm): A Java SQL API, version 1.20" whitepaper, page 21.

### createField

    public static final FBField createField(XSQLVAR field,
                                            FieldDataProvider dataProvider,
                                            GDSHelper gdsHelper,
                                            boolean cached)
                                     throws SQLException

  This is a factory method that creates appropriate instance of the `FBField` class according to the SQL datatype. This instance knows how to perform all necessary type conversions.

  Throws:
    `SQLException`

### getName

    public String getName()

  Returns the name of the column as declared in the XSQLVAR.

### getAlias

    public String getAlias()

  Returns the alias of the column as declared in XSQLVAR.

### getRelationName

    public String getRelationName()

  Returns the relation to which belongs column as declared in XSQLVAR.

### close

    public void close()
               throws SQLException

  Close this field. This method tells field implementation to release all resources allocated when field methods were called.

  Throws:
    `SQLException` - if field cannot be closed.

### getByte

    public byte getByte()
                 throws SQLException

  Throws:
    `SQLException`

### getShort

    public short getShort()
                   throws SQLException

  Throws:
    `SQLException`

### getInt

    public int getInt()
               throws SQLException

  Throws:
    `SQLException`

### getLong

    public long getLong()
                 throws SQLException

  Throws:
    `SQLException`

### getFloat

    public float getFloat()
                   throws SQLException

  Throws:
    `SQLException`

### getDouble

    public double getDouble()
                     throws SQLException

  Throws:
    `SQLException`

### getBigDecimal

    public BigDecimal getBigDecimal()
                             throws SQLException

  Throws:
    `SQLException`

### getBigDecimal

    public BigDecimal getBigDecimal(int scale)
                             throws SQLException

  Throws:
    `SQLException`

### getBoolean

    public boolean getBoolean()
                       throws SQLException

  Throws:
    `SQLException`

### getString

    public String getString()
                     throws SQLException

  Throws:
    `SQLException`

### getObject

    public Object getObject()
                     throws SQLException

  Throws:
    `SQLException`

### getObject

    public Object getObject(Map map)
                     throws SQLException

  Throws:
    `SQLException`

### getAsciiStream

    public InputStream getAsciiStream()
                               throws SQLException

  Throws:
    `SQLException`

### getUnicodeStream

    public InputStream getUnicodeStream()
                                 throws SQLException

  Throws:
    `SQLException`

### getBinaryStream

    public InputStream getBinaryStream()
                                throws SQLException

  Throws:
    `SQLException`

### getCharacterStream

    public Reader getCharacterStream()
                              throws SQLException

  Throws:
    `SQLException`

### getBytes

    public byte[] getBytes()
                    throws SQLException

  Throws:
    `SQLException`

### getBlob

    public Blob getBlob()
                 throws SQLException

  Throws:
    `SQLException`

### getDate

    public Date getDate()
                 throws SQLException

  Throws:
    `SQLException`

### getDate

    public Date getDate(Calendar cal)
                 throws SQLException

  Throws:
    `SQLException`

### getTime

    public Time getTime()
                 throws SQLException

  Throws:
    `SQLException`

### getTime

    public Time getTime(Calendar cal)
                 throws SQLException

  Throws:
    `SQLException`

### getTimestamp

    public Timestamp getTimestamp()
                           throws SQLException

  Throws:
    `SQLException`

### getTimestamp

    public Timestamp getTimestamp(Calendar cal)
                           throws SQLException

  Throws:
    `SQLException`

### getRef

    public Ref getRef()
               throws SQLException

  Throws:
    `SQLException`

### getClob

    public Clob getClob()
                 throws SQLException

  Throws:
    `SQLException`

### getArray

    public Array getArray()
                   throws SQLException

  Throws:
    `SQLException`

### setByte

    public void setByte(byte value)
                 throws SQLException

  Throws:
    `SQLException`

### setShort

    public void setShort(short value)
                  throws SQLException

  Throws:
    `SQLException`

### setInteger

    public void setInteger(int value)
                    throws SQLException

  Throws:
    `SQLException`

### setLong

    public void setLong(long value)
                 throws SQLException

  Throws:
    `SQLException`

### setFloat

    public void setFloat(float value)
                  throws SQLException

  Throws:
    `SQLException`

### setDouble

    public void setDouble(double value)
                   throws SQLException

  Throws:
    `SQLException`

### setBigDecimal

    public void setBigDecimal(BigDecimal value)
                       throws SQLException

  Throws:
    `SQLException`

### setBoolean

    public void setBoolean(boolean value)
                    throws SQLException

  Throws:
    `SQLException`

### setString

    public void setString(String value)
                   throws SQLException

  Throws:
    `SQLException`

### setObject

    public void setObject(Object value)
                   throws SQLException

  Throws:
    `SQLException`

### setAsciiStream

    public void setAsciiStream(InputStream in,
                               int length)
                        throws SQLException

  Throws:
    `SQLException`

### setUnicodeStream

    public void setUnicodeStream(InputStream in,
                                 int length)
                          throws SQLException

  Throws:
    `SQLException`

### setBinaryStream

    public void setBinaryStream(InputStream in,
                                int length)
                         throws SQLException

  Throws:
    `SQLException`

### setCharacterStream

    public void setCharacterStream(Reader in,
                                   int length)
                            throws SQLException

  Throws:
    `SQLException`

### setBytes

    public void setBytes(byte[] value)
                  throws SQLException

  Throws:
    `SQLException`

### setDate

    public void setDate(Date value,
                        Calendar cal)
                 throws SQLException

  Throws:
    `SQLException`

### setDate

    public void setDate(Date value)
                 throws SQLException

  Throws:
    `SQLException`

### setTime

    public void setTime(Time value,
                        Calendar cal)
                 throws SQLException

  Throws:
    `SQLException`

### setTime

    public void setTime(Time value)
                 throws SQLException

  Throws:
    `SQLException`

### setTimestamp

    public void setTimestamp(Timestamp value,
                             Calendar cal)
                      throws SQLException

  Throws:
    `SQLException`

### setTimestamp

    public void setTimestamp(Timestamp value)
                      throws SQLException

  Throws:
    `SQLException`

### setBlob

    public void setBlob(FBBlob blob)
                 throws SQLException

  Throws:
    `SQLException`

### isInvertTimeZone

    protected boolean isInvertTimeZone()

Copyright © 2001-2010. All Rights Reserved.