org.objectweb.jorm.mapper.rdb.adapter.api
Interface ResultsetAdapter

All Known Subinterfaces:
RdbAdapter, RdbAdapter
All Known Implementing Classes:
BasicRdbAdapter, CloudscapeAdapter, Db2Adapter, FirebirdAdapter, HsqlAdapter, MckoiAdapter, MysqlAdapter, Oracle8Adapter, OracleAdapter, PostgresAdapter, ProgressAdapter, SapdbAdapter, SqlserverAdapter, SybaseAdapter

public interface ResultsetAdapter

Adapter for Resultset management

Author:
S.Chassande-Barrioz

Method Summary
 java.lang.Object getArray(java.sql.ResultSet rs, int idx, java.lang.Object nullValue, int typeCode)
          Get an array value from a ResultSet.
 java.math.BigDecimal getBigDecimal(java.sql.ResultSet rs, int idx, java.math.BigDecimal nullValue)
          Get a BigDecimal value from a ResultSet.
 java.math.BigInteger getBigInteger(java.sql.ResultSet rs, int idx, java.math.BigInteger nullValue)
          Get a BigInteger value from a ResultSet.
 boolean getBoolean(java.sql.ResultSet rs, int idx, boolean nullValue)
          Get a boolean value from a ResultSet.
 byte getByte(java.sql.ResultSet rs, int idx, byte nullValue)
          Get a byte value from a ResultSet.
 byte[] getByteArray(java.sql.ResultSet rs, int idx, byte[] nullValue)
          Get a byte[] value from a ResultSet.
 char getChar(java.sql.ResultSet rs, int idx, char nullValue)
          Get a char value from a ResultSet.
 char[] getCharArray(java.sql.ResultSet rs, int idx, char[] nullValue)
          Get a char[] value from a ResultSet.
 java.util.Date getDate(java.sql.ResultSet rs, int idx, java.util.Date nullValue)
          Get a Date value from a ResultSet.
 java.util.Date getDate(java.sql.ResultSet rs, int idx, java.lang.String sqlColumnType, java.util.Date nullValue)
          Get a Date value from a ResultSet.
 double getDouble(java.sql.ResultSet rs, int idx, double nullValue)
          Get a double value from a ResultSet.
 float getFloat(java.sql.ResultSet rs, int idx, float nullValue)
          Get a float value from a ResultSet.
 int getInt(java.sql.ResultSet rs, int idx, int nullValue)
          Get a int value from a ResultSet.
 long getLong(java.sql.ResultSet rs, int idx, long nullValue)
          Get a long value from a ResultSet.
 java.lang.Boolean getOboolean(java.sql.ResultSet rs, int idx, java.lang.Boolean nullValue)
          Get a Boolean value from a ResultSet.
 java.lang.Byte getObyte(java.sql.ResultSet rs, int idx, java.lang.Byte nullValue)
          Get a Byte value from a ResultSet.
 java.lang.Character getOchar(java.sql.ResultSet rs, int idx, java.lang.Character nullValue)
          Get a Character value from a ResultSet.
 java.lang.Double getOdouble(java.sql.ResultSet rs, int idx, java.lang.Double nullValue)
          Get a Double value from a ResultSet.
 java.lang.Float getOfloat(java.sql.ResultSet rs, int idx, java.lang.Float nullValue)
          Get a Float value from a ResultSet.
 java.lang.Integer getOint(java.sql.ResultSet rs, int idx, java.lang.Integer nullValue)
          Get a Integer value from a ResultSet.
 java.lang.Long getOlong(java.sql.ResultSet rs, int idx, java.lang.Long nullValue)
          Get a Long value from a ResultSet.
 java.lang.Short getOshort(java.sql.ResultSet rs, int idx, java.lang.Short nullValue)
          Get a Short value from a ResultSet.
 java.io.Serializable getSerialized(java.sql.ResultSet rs, int idx, java.io.Serializable nullValue)
          Get a Serializable value from a ResultSet.
 short getShort(java.sql.ResultSet rs, int idx, short nullValue)
          Get a short value from a ResultSet.
 java.lang.String getString(java.sql.ResultSet rs, int idx, java.lang.String nullValue)
          Get a String value from a ResultSet.
 

Method Detail

getBoolean

boolean getBoolean(java.sql.ResultSet rs,
                   int idx,
                   boolean nullValue)
                   throws java.sql.SQLException
Get a boolean value from a ResultSet.

Parameters:
rs - is the result where to get the value
idx - is the index of the value in the resultset
nullValue - represents the nullvalue to return if the column is null in the resultset
Throws:
java.sql.SQLException

getOboolean

java.lang.Boolean getOboolean(java.sql.ResultSet rs,
                              int idx,
                              java.lang.Boolean nullValue)
                              throws java.sql.SQLException
Get a Boolean value from a ResultSet.

Parameters:
rs - is the result where to get the value
idx - is the index of the value in the resultset
nullValue - represents the nullvalue to return if the column is null in the resultset
Throws:
java.sql.SQLException

getChar

char getChar(java.sql.ResultSet rs,
             int idx,
             char nullValue)
             throws java.sql.SQLException
Get a char value from a ResultSet.

Parameters:
rs - is the result where to get the value
idx - is the index of the value in the resultset
nullValue - represents the nullvalue to return if the column is null in the resultset
Throws:
java.sql.SQLException

getOchar

java.lang.Character getOchar(java.sql.ResultSet rs,
                             int idx,
                             java.lang.Character nullValue)
                             throws java.sql.SQLException
Get a Character value from a ResultSet.

Parameters:
rs - is the result where to get the value
idx - is the index of the value in the resultset
nullValue - represents the nullvalue to return if the column is null in the resultset
Throws:
java.sql.SQLException

getByte

byte getByte(java.sql.ResultSet rs,
             int idx,
             byte nullValue)
             throws java.sql.SQLException
Get a byte value from a ResultSet.

Parameters:
rs - is the result where to get the value
idx - is the index of the value in the resultset
nullValue - represents the nullvalue to return if the column is null in the resultset
Throws:
java.sql.SQLException

getObyte

java.lang.Byte getObyte(java.sql.ResultSet rs,
                        int idx,
                        java.lang.Byte nullValue)
                        throws java.sql.SQLException
Get a Byte value from a ResultSet.

Parameters:
rs - is the result where to get the value
idx - is the index of the value in the resultset
nullValue - represents the nullvalue to return if the column is null in the resultset
Throws:
java.sql.SQLException

getShort

short getShort(java.sql.ResultSet rs,
               int idx,
               short nullValue)
               throws java.sql.SQLException
Get a short value from a ResultSet.

Parameters:
rs - is the result where to get the value
idx - is the index of the value in the resultset
nullValue - represents the nullvalue to return if the column is null in the resultset
Throws:
java.sql.SQLException

getOshort

java.lang.Short getOshort(java.sql.ResultSet rs,
                          int idx,
                          java.lang.Short nullValue)
                          throws java.sql.SQLException
Get a Short value from a ResultSet.

Parameters:
rs - is the result where to get the value
idx - is the index of the value in the resultset
nullValue - represents the nullvalue to return if the column is null in the resultset
Throws:
java.sql.SQLException

getInt

int getInt(java.sql.ResultSet rs,
           int idx,
           int nullValue)
           throws java.sql.SQLException
Get a int value from a ResultSet.

Parameters:
rs - is the result where to get the value
idx - is the index of the value in the resultset
nullValue - represents the nullvalue to return if the column is null in the resultset
Throws:
java.sql.SQLException

getOint

java.lang.Integer getOint(java.sql.ResultSet rs,
                          int idx,
                          java.lang.Integer nullValue)
                          throws java.sql.SQLException
Get a Integer value from a ResultSet.

Parameters:
rs - is the result where to get the value
idx - is the index of the value in the resultset
nullValue - represents the nullvalue to return if the column is null in the resultset
Throws:
java.sql.SQLException

getLong

long getLong(java.sql.ResultSet rs,
             int idx,
             long nullValue)
             throws java.sql.SQLException
Get a long value from a ResultSet.

Parameters:
rs - is the result where to get the value
idx - is the index of the value in the resultset
nullValue - represents the nullvalue to return if the column is null in the resultset
Throws:
java.sql.SQLException

getOlong

java.lang.Long getOlong(java.sql.ResultSet rs,
                        int idx,
                        java.lang.Long nullValue)
                        throws java.sql.SQLException
Get a Long value from a ResultSet.

Parameters:
rs - is the result where to get the value
idx - is the index of the value in the resultset
nullValue - represents the nullvalue to return if the column is null in the resultset
Throws:
java.sql.SQLException

getFloat

float getFloat(java.sql.ResultSet rs,
               int idx,
               float nullValue)
               throws java.sql.SQLException
Get a float value from a ResultSet.

Parameters:
rs - is the result where to get the value
idx - is the index of the value in the resultset
nullValue - represents the nullvalue to return if the column is null in the resultset
Throws:
java.sql.SQLException

getOfloat

java.lang.Float getOfloat(java.sql.ResultSet rs,
                          int idx,
                          java.lang.Float nullValue)
                          throws java.sql.SQLException
Get a Float value from a ResultSet.

Parameters:
rs - is the result where to get the value
idx - is the index of the value in the resultset
nullValue - represents the nullvalue to return if the column is null in the resultset
Throws:
java.sql.SQLException

getDouble

double getDouble(java.sql.ResultSet rs,
                 int idx,
                 double nullValue)
                 throws java.sql.SQLException
Get a double value from a ResultSet.

Parameters:
rs - is the result where to get the value
idx - is the index of the value in the resultset
nullValue - represents the nullvalue to return if the column is null in the resultset
Throws:
java.sql.SQLException

getOdouble

java.lang.Double getOdouble(java.sql.ResultSet rs,
                            int idx,
                            java.lang.Double nullValue)
                            throws java.sql.SQLException
Get a Double value from a ResultSet.

Parameters:
rs - is the result where to get the value
idx - is the index of the value in the resultset
nullValue - represents the nullvalue to return if the column is null in the resultset
Throws:
java.sql.SQLException

getString

java.lang.String getString(java.sql.ResultSet rs,
                           int idx,
                           java.lang.String nullValue)
                           throws java.sql.SQLException
Get a String value from a ResultSet.

Parameters:
rs - is the result where to get the value
idx - is the index of the value in the resultset
nullValue - represents the nullvalue to return if the column is null in the resultset
Throws:
java.sql.SQLException

getDate

java.util.Date getDate(java.sql.ResultSet rs,
                       int idx,
                       java.util.Date nullValue)
                       throws java.sql.SQLException
Get a Date value from a ResultSet.

Parameters:
rs - is the result where to get the value
idx - is the index of the value in the resultset
nullValue - represents the nullvalue to return if the column is null in the resultset
Throws:
java.sql.SQLException

getDate

java.util.Date getDate(java.sql.ResultSet rs,
                       int idx,
                       java.lang.String sqlColumnType,
                       java.util.Date nullValue)
                       throws java.sql.SQLException
Get a Date value from a ResultSet.

Parameters:
rs - is the result where to get the value
idx - is the index of the value in the resultset
nullValue - represents the nullvalue to return if the column is null in the resultset
Throws:
java.sql.SQLException

getBigDecimal

java.math.BigDecimal getBigDecimal(java.sql.ResultSet rs,
                                   int idx,
                                   java.math.BigDecimal nullValue)
                                   throws java.sql.SQLException
Get a BigDecimal value from a ResultSet.

Parameters:
rs - is the result where to get the value
idx - is the index of the value in the resultset
nullValue - represents the nullvalue to return if the column is null in the resultset
Throws:
java.sql.SQLException

getBigInteger

java.math.BigInteger getBigInteger(java.sql.ResultSet rs,
                                   int idx,
                                   java.math.BigInteger nullValue)
                                   throws java.sql.SQLException
Get a BigInteger value from a ResultSet.

Parameters:
rs - is the result where to get the value
idx - is the index of the value in the resultset
nullValue - represents the nullvalue to return if the column is null in the resultset
Throws:
java.sql.SQLException

getCharArray

char[] getCharArray(java.sql.ResultSet rs,
                    int idx,
                    char[] nullValue)
                    throws java.sql.SQLException
Get a char[] value from a ResultSet.

Parameters:
rs - is the result where to get the value
idx - is the index of the value in the resultset
nullValue - represents the nullvalue to return if the column is null in the resultset
Throws:
java.sql.SQLException

getByteArray

byte[] getByteArray(java.sql.ResultSet rs,
                    int idx,
                    byte[] nullValue)
                    throws java.sql.SQLException
Get a byte[] value from a ResultSet.

Parameters:
rs - is the result where to get the value
idx - is the index of the value in the resultset
nullValue - represents the nullvalue to return if the column is null in the resultset
Throws:
java.sql.SQLException

getSerialized

java.io.Serializable getSerialized(java.sql.ResultSet rs,
                                   int idx,
                                   java.io.Serializable nullValue)
                                   throws java.sql.SQLException,
                                          java.io.IOException,
                                          java.lang.ClassNotFoundException
Get a Serializable value from a ResultSet.

Parameters:
rs - is the result where to get the value
idx - is the index of the value in the resultset
nullValue - represents the nullvalue to return if the column is null in the resultset
Throws:
java.sql.SQLException
java.io.IOException
java.lang.ClassNotFoundException

getArray

java.lang.Object getArray(java.sql.ResultSet rs,
                          int idx,
                          java.lang.Object nullValue,
                          int typeCode)
                          throws java.sql.SQLException
Get an array value from a ResultSet.

Parameters:
rs - is the result where to get the value
idx - is the index of the value in the resultset
nullValue - represents the nullvalue to return if the column is null
typeCode - is the type code of the expected array ex: = (TypeAdapter.ARRAY + TypeAdapter.STRING) in the resultset
Throws:
java.sql.SQLException