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

All Known Subinterfaces:
RdbAdapter, RdbAdapter
All Known Implementing Classes:
BasicRdbAdapter

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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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