IBM DB2 Information Integrator
Java API Reference
for Developing Wrappers

com.ibm.db2.wrapper
Class Data

java.lang.Object
  extended bycom.ibm.db2.wrapper.Data
Direct Known Subclasses:
RequestConstant, RuntimeData

public abstract class Data
extends java.lang.Object

The Data class is the base class that manages cell values, constants, and parameter values. This class provides methods to convert the values from internal formats into Java standard types and objects.

Since:
IBM DB2 Information Integrator Version 8.2

Field Summary
static short BLOB
          Constant that indicates a BLOB data type.
static short CHAR
          Constant that indicates a CHAR data type.
static short CLOB
          Constant that indicates a CLOB data type.
static short DATE
          Constant that indicates a DATE data type.
static short DECIMAL
          Constant that indicates a DECIMAL or NUMERIC data type.
static short DOUBLE
          Constant that indicates a DOUBLE data type.
static short FLOAT
          Constant that indicates a FLOAT data type.
static short INT
          Constant that indicates an INTEGER (INT) data type.
static short LONG
          Constant that indicates a LONG data type.
static short NONE
          Constant that indicates an unknown data type.
static short SHORT
          Constant that indicates a SHORT data type.
static short SQL_NO_NULLS
          Constant that indicates the column NULL status as NO NULLS.
static short SQL_NULLABLE
          Constant that indicates the column NULL status as NULLABLE.
static short SQL_NULLABLE_UNKNOWN
          Constant that indicates the column NULL status as UNKNOWN.
static short TIME
          Constant that indicates a TIME data type.
static short TIMESTAMP
          Constant that indicates a TIMESTAMP data type.
static short VARCHAR
          Constant that indicates a VARCHAR data type.
 
Method Summary
 java.math.BigDecimal getBigDecimal()
          Retrieve the data as a BigDecimal instance.
 byte getByte()
          Retrieve the data as a byte value.
protected abstract  byte[] getData()
          Retrieve the data as a byte array.
abstract  short getDataType()
          Retrieve the data type.
 java.sql.Date getDate()
          Retrieve the data as a Date instance.
 double getDouble()
          Retrieve the data as a double value.
 float getFloat()
          Retrieve the data as a float value.
abstract  boolean getForBitData()
          Retrieve the FOR BIT DATA flag.
 int getInt()
          Retrieve the data as an integer (int) value.
 long getLong()
          Retrieve the data as a long value.
 java.lang.Object getObject()
          Retrieve the data as an Object instance.
 short getShort()
          Retrieve the data as a short value.
 java.lang.String getString()
          Retrieve the data as a string.
 java.sql.Time getTime()
          Retrieve the data as a Time instance.
 java.sql.Timestamp getTimestamp()
          Retrieve the data as a Timestamp instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BLOB

public static final short BLOB
Constant that indicates a BLOB data type.

Since:
IBM DB2 Information Integrator Version 8.2
See Also:
Constant Field Values

CHAR

public static final short CHAR
Constant that indicates a CHAR data type.

Since:
IBM DB2 Information Integrator Version 8.2
See Also:
Constant Field Values

CLOB

public static final short CLOB
Constant that indicates a CLOB data type.

Since:
IBM DB2 Information Integrator Version 8.2
See Also:
Constant Field Values

DATE

public static final short DATE
Constant that indicates a DATE data type.

Since:
IBM DB2 Information Integrator Version 8.2
See Also:
Constant Field Values

DECIMAL

public static final short DECIMAL
Constant that indicates a DECIMAL or NUMERIC data type.

Since:
IBM DB2 Information Integrator Version 8.2
See Also:
Constant Field Values

DOUBLE

public static final short DOUBLE
Constant that indicates a DOUBLE data type.

Since:
IBM DB2 Information Integrator Version 8.2
See Also:
Constant Field Values

FLOAT

public static final short FLOAT
Constant that indicates a FLOAT data type.

Since:
IBM DB2 Information Integrator Version 8.2
See Also:
Constant Field Values

INT

public static final short INT
Constant that indicates an INTEGER (INT) data type.

Since:
IBM DB2 Information Integrator Version 8.2
See Also:
Constant Field Values

LONG

public static final short LONG
Constant that indicates a LONG data type.

Since:
IBM DB2 Information Integrator Version 8.2
See Also:
Constant Field Values

NONE

public static final short NONE
Constant that indicates an unknown data type.

Since:
IBM DB2 Information Integrator Version 8.2
See Also:
Constant Field Values

SHORT

public static final short SHORT
Constant that indicates a SHORT data type.

Since:
IBM DB2 Information Integrator Version 8.2
See Also:
Constant Field Values

SQL_NO_NULLS

public static final short SQL_NO_NULLS
Constant that indicates the column NULL status as NO NULLS.

Since:
IBM DB2 Information Integrator Version 8.2 fp10
See Also:
Constant Field Values

SQL_NULLABLE

public static final short SQL_NULLABLE
Constant that indicates the column NULL status as NULLABLE.

Since:
IBM DB2 Information Integrator Version 8.2 fp10
See Also:
Constant Field Values

SQL_NULLABLE_UNKNOWN

public static final short SQL_NULLABLE_UNKNOWN
Constant that indicates the column NULL status as UNKNOWN.

Since:
IBM DB2 Information Integrator Version 8.2 fp10
See Also:
Constant Field Values

TIME

public static final short TIME
Constant that indicates a TIME data type.

Since:
IBM DB2 Information Integrator Version 8.2
See Also:
Constant Field Values

TIMESTAMP

public static final short TIMESTAMP
Constant that indicates a TIMESTAMP data type.

Since:
IBM DB2 Information Integrator Version 8.2
See Also:
Constant Field Values

VARCHAR

public static final short VARCHAR
Constant that indicates a VARCHAR data type.

Since:
IBM DB2 Information Integrator Version 8.2
See Also:
Constant Field Values
Method Detail

getBigDecimal

public java.math.BigDecimal getBigDecimal()
                                   throws WrapperException
Retrieve the data as a BigDecimal instance.

Returns:
The data.
Throws:
WrapperException - if the data type is not compatible.
Since:
IBM DB2 Information Integrator Version 8.2

getByte

public byte getByte()
             throws WrapperException
Retrieve the data as a byte value.

Returns:
The data.
Throws:
WrapperException - if the data type is not compatible.
Since:
IBM DB2 Information Integrator Version 8.2

getData

protected abstract byte[] getData()
                           throws WrapperException
Retrieve the data as a byte array. The value is in an internal format.

Returns:
The data.
Throws:
WrapperException - - if the processing fails.
Since:
IBM DB2 Information Integrator Version 8.2

getDataType

public abstract short getDataType()
Retrieve the data type.

Returns:
The data type.
Since:
IBM DB2 Information Integrator Version 8.2

getDate

public java.sql.Date getDate()
                      throws WrapperException
Retrieve the data as a Date instance.

Returns:
The data.
Throws:
WrapperException - if the data type is not compatible.
Since:
IBM DB2 Information Integrator Version 8.2

getDouble

public double getDouble()
                 throws WrapperException
Retrieve the data as a double value.

Returns:
The data.
Throws:
WrapperException - if the data type is not compatible.
Since:
IBM DB2 Information Integrator Version 8.2

getFloat

public float getFloat()
               throws WrapperException
Retrieve the data as a float value.

Returns:
The data.
Throws:
WrapperException - if the data type is not compatible.
Since:
IBM DB2 Information Integrator Version 8.2

getForBitData

public abstract boolean getForBitData()
Retrieve the FOR BIT DATA flag. Use this method only for CHAR or VARCHAR data types to indicate whether the data is stored in a binary format.

Returns:
The FOR BIT DATA flag.
Since:
IBM DB2 Information Integrator Version 8.2

getInt

public int getInt()
           throws WrapperException
Retrieve the data as an integer (int) value.

Returns:
The data.
Throws:
WrapperException - if the data type is not compatible.
Since:
IBM DB2 Information Integrator Version 8.2

getLong

public long getLong()
             throws WrapperException
Retrieve the data as a long value.

Returns:
The data.
Throws:
WrapperException - if the data type is not compatible.
Since:
IBM DB2 Information Integrator Version 8.2

getObject

public java.lang.Object getObject()
                           throws WrapperException
Retrieve the data as an Object instance.

Returns:
The data.
Throws:
WrapperException - if the data type is not compatible.
Since:
IBM DB2 Information Integrator Version 8.2

getShort

public short getShort()
               throws WrapperException
Retrieve the data as a short value.

Returns:
The data.
Throws:
WrapperException - if the data type is not compatible.
Since:
IBM DB2 Information Integrator Version 8.2

getString

public java.lang.String getString()
                           throws WrapperException
Retrieve the data as a string.

Returns:
The data.
Throws:
WrapperException - if the data type is not compatible.
Since:
IBM DB2 Information Integrator Version 8.2

getTime

public java.sql.Time getTime()
                      throws WrapperException
Retrieve the data as a Time instance.

Returns:
The data.
Throws:
WrapperException - if the data type is not compatible.
Since:
IBM DB2 Information Integrator Version 8.2

getTimestamp

public java.sql.Timestamp getTimestamp()
                                throws WrapperException
Retrieve the data as a Timestamp instance.

Returns:
The data.
Throws:
WrapperException - if the data type is not compatible.
Since:
IBM DB2 Information Integrator Version 8.2

IBM DB2 Information Integrator
Java API Reference
for Developing Wrappers

(C)Copyright IBM Corp. 2002. All rights reserved.

Links on this page are made available for your convenience and may take you to non-IBM sites. IBM does not warrant any sample code provided on these sites.