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

Interface ResultsetAdapter

Known Subinterfaces:
RdbAdapter, RdbAdapter
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

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

Method Details

getBigDecimal

public BigDecimal getBigDecimal(ResultSet rs,
                                int idx,
                                BigDecimal nullValue)
            throws 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


getBigInteger

public BigInteger getBigInteger(ResultSet rs,
                                int idx,
                                BigInteger nullValue)
            throws 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


getBoolean

public boolean getBoolean(ResultSet rs,
                          int idx,
                          boolean nullValue)
            throws 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


getByte

public byte getByte(ResultSet rs,
                    int idx,
                    byte nullValue)
            throws 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


getByteArray

public byte[] getByteArray(ResultSet rs,
                           int idx,
                           byte[] nullValue)
            throws 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


getChar

public char getChar(ResultSet rs,
                    int idx,
                    char nullValue)
            throws 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


getCharArray

public char[] getCharArray(ResultSet rs,
                           int idx,
                           char[] nullValue)
            throws 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


getDate

public Date getDate(ResultSet rs,
                    int idx,
                    Date nullValue)
            throws 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


getDate

public Date getDate(ResultSet rs,
                    int idx,
                    String sqlColumnType,
                    Date nullValue)
            throws 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


getDouble

public double getDouble(ResultSet rs,
                        int idx,
                        double nullValue)
            throws 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


getFloat

public float getFloat(ResultSet rs,
                      int idx,
                      float nullValue)
            throws 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


getInt

public int getInt(ResultSet rs,
                  int idx,
                  int nullValue)
            throws 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


getLong

public long getLong(ResultSet rs,
                    int idx,
                    long nullValue)
            throws 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


getOboolean

public Boolean getOboolean(ResultSet rs,
                           int idx,
                           Boolean nullValue)
            throws 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


getObyte

public Byte getObyte(ResultSet rs,
                     int idx,
                     Byte nullValue)
            throws 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


getOchar

public Character getOchar(ResultSet rs,
                          int idx,
                          Character nullValue)
            throws 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


getOdouble

public Double getOdouble(ResultSet rs,
                         int idx,
                         Double nullValue)
            throws 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


getOfloat

public Float getOfloat(ResultSet rs,
                       int idx,
                       Float nullValue)
            throws 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


getOint

public Integer getOint(ResultSet rs,
                       int idx,
                       Integer nullValue)
            throws 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


getOlong

public Long getOlong(ResultSet rs,
                     int idx,
                     Long nullValue)
            throws 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


getOshort

public Short getOshort(ResultSet rs,
                       int idx,
                       Short nullValue)
            throws 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


getSerialized

public Serializable getSerialized(ResultSet rs,
                                  int idx,
                                  Serializable nullValue)
            throws SQLException,
                   IOException,
                   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


getShort

public short getShort(ResultSet rs,
                      int idx,
                      short nullValue)
            throws 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


getString

public String getString(ResultSet rs,
                        int idx,
                        String nullValue)
            throws 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