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

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 PreparedStatementAdapter

Adapter for PreparedStatement management

Author:
S.Chassande-Barrioz

Method Summary
 java.lang.String getArrayToString(java.lang.Object array, int typeCode)
           
 void setArray(java.sql.PreparedStatement ps, int idx, java.lang.Object o, int typeCode)
          Assignes an array value into a PreparedStatement
 void setBigDecimal(java.sql.PreparedStatement ps, int idx, java.math.BigDecimal o)
          Assignes a BigDecimal value into a PreparedStatement
 void setBigInteger(java.sql.PreparedStatement ps, int idx, java.math.BigInteger o)
          Assignes a BigInteger value into a PreparedStatement
 void setBoolean(java.sql.PreparedStatement ps, int idx, boolean o)
          Assignes a boolean value into a PreparedStatement
 void setByte(java.sql.PreparedStatement ps, int idx, byte o)
          Assignes a byte value into a PreparedStatement
 void setByteArray(java.sql.PreparedStatement ps, int idx, byte[] o)
          Assignes a byte[] value into a PreparedStatement
 void setChar(java.sql.PreparedStatement ps, int idx, char o)
          Assignes a char value into a PreparedStatement
 void setCharArray(java.sql.PreparedStatement ps, int idx, char[] o)
          Assignes a char[] value into a PreparedStatement
 void setDate(java.sql.PreparedStatement ps, int idx, java.util.Date o, java.lang.String columnType)
          Assignes a String value into a PreparedStatement
 void setDouble(java.sql.PreparedStatement ps, int idx, double o)
          Assignes a double value into a PreparedStatement
 void setFloat(java.sql.PreparedStatement ps, int idx, float o)
          Assignes a float value into a PreparedStatement
 void setInt(java.sql.PreparedStatement ps, int idx, int o)
          Assignes an int value into a PreparedStatement
 void setLong(java.sql.PreparedStatement ps, int idx, long o)
          Assignes a long value into a PreparedStatement
 void setNull(java.sql.PreparedStatement ps, int idx, int sqlType)
          Assignes a null value into a PreparedStatement
 void setOboolean(java.sql.PreparedStatement ps, int idx, java.lang.Boolean o)
          Assignes a Boolean value into a PreparedStatement
 void setObyte(java.sql.PreparedStatement ps, int idx, java.lang.Byte o)
          Assignes a Byte value into a PreparedStatement
 void setOchar(java.sql.PreparedStatement ps, int idx, java.lang.Character o)
          Assignes a Character value into a PreparedStatement
 void setOdouble(java.sql.PreparedStatement ps, int idx, java.lang.Double o)
          Assignes a Double value into a PreparedStatement
 void setOfloat(java.sql.PreparedStatement ps, int idx, java.lang.Float o)
          Assignes a Float value into a PreparedStatement
 void setOint(java.sql.PreparedStatement ps, int idx, java.lang.Integer o)
          Assignes an Integer value into a PreparedStatement
 void setOlong(java.sql.PreparedStatement ps, int idx, java.lang.Long o)
          Assignes a Long value into a PreparedStatement
 void setOshort(java.sql.PreparedStatement ps, int idx, java.lang.Short o)
          Assignes a Short value into a PreparedStatement
 void setSerialized(java.sql.PreparedStatement ps, int idx, java.io.Serializable o)
          Assignes a serializable value into a PreparedStatement
 void setShort(java.sql.PreparedStatement ps, int idx, short o)
          Assignes a short value into a PreparedStatement
 void setString(java.sql.PreparedStatement ps, int idx, java.lang.String o)
          Assignes a value into a PreparedStatement
 

Method Detail

setNull

void setNull(java.sql.PreparedStatement ps,
             int idx,
             int sqlType)
             throws java.sql.SQLException
Assignes a null value into a PreparedStatement

Parameters:
ps - is the PreparedStatement
idx - is the index of the the value in the PreparedStatement
sqlType - is the type of the column
Throws:
java.sql.SQLException

setBoolean

void setBoolean(java.sql.PreparedStatement ps,
                int idx,
                boolean o)
                throws java.sql.SQLException
Assignes a boolean value into a PreparedStatement

Parameters:
ps - is the PreparedStatement
idx - is the index of the the value in the PreparedStatement
o - is the value to assign
Throws:
java.sql.SQLException

setOboolean

void setOboolean(java.sql.PreparedStatement ps,
                 int idx,
                 java.lang.Boolean o)
                 throws java.sql.SQLException
Assignes a Boolean value into a PreparedStatement

Parameters:
ps - is the PreparedStatement
idx - is the index of the the value in the PreparedStatement
o - is the value to assign
Throws:
java.sql.SQLException

setChar

void setChar(java.sql.PreparedStatement ps,
             int idx,
             char o)
             throws java.sql.SQLException
Assignes a char value into a PreparedStatement

Parameters:
ps - is the PreparedStatement
idx - is the index of the the value in the PreparedStatement
o - is the value to assign
Throws:
java.sql.SQLException

setOchar

void setOchar(java.sql.PreparedStatement ps,
              int idx,
              java.lang.Character o)
              throws java.sql.SQLException
Assignes a Character value into a PreparedStatement

Parameters:
ps - is the PreparedStatement
idx - is the index of the the value in the PreparedStatement
o - is the value to assign
Throws:
java.sql.SQLException

setByte

void setByte(java.sql.PreparedStatement ps,
             int idx,
             byte o)
             throws java.sql.SQLException
Assignes a byte value into a PreparedStatement

Parameters:
ps - is the PreparedStatement
idx - is the index of the the value in the PreparedStatement
o - is the value to assign
Throws:
java.sql.SQLException

setObyte

void setObyte(java.sql.PreparedStatement ps,
              int idx,
              java.lang.Byte o)
              throws java.sql.SQLException
Assignes a Byte value into a PreparedStatement

Parameters:
ps - is the PreparedStatement
idx - is the index of the the value in the PreparedStatement
o - is the value to assign
Throws:
java.sql.SQLException

setShort

void setShort(java.sql.PreparedStatement ps,
              int idx,
              short o)
              throws java.sql.SQLException
Assignes a short value into a PreparedStatement

Parameters:
ps - is the PreparedStatement
idx - is the index of the the value in the PreparedStatement
o - is the value to assign
Throws:
java.sql.SQLException

setOshort

void setOshort(java.sql.PreparedStatement ps,
               int idx,
               java.lang.Short o)
               throws java.sql.SQLException
Assignes a Short value into a PreparedStatement

Parameters:
ps - is the PreparedStatement
idx - is the index of the the value in the PreparedStatement
o - is the value to assign
Throws:
java.sql.SQLException

setInt

void setInt(java.sql.PreparedStatement ps,
            int idx,
            int o)
            throws java.sql.SQLException
Assignes an int value into a PreparedStatement

Parameters:
ps - is the PreparedStatement
idx - is the index of the the value in the PreparedStatement
o - is the value to assign
Throws:
java.sql.SQLException

setOint

void setOint(java.sql.PreparedStatement ps,
             int idx,
             java.lang.Integer o)
             throws java.sql.SQLException
Assignes an Integer value into a PreparedStatement

Parameters:
ps - is the PreparedStatement
idx - is the index of the the value in the PreparedStatement
o - is the value to assign
Throws:
java.sql.SQLException

setLong

void setLong(java.sql.PreparedStatement ps,
             int idx,
             long o)
             throws java.sql.SQLException
Assignes a long value into a PreparedStatement

Parameters:
ps - is the PreparedStatement
idx - is the index of the the value in the PreparedStatement
o - is the value to assign
Throws:
java.sql.SQLException

setOlong

void setOlong(java.sql.PreparedStatement ps,
              int idx,
              java.lang.Long o)
              throws java.sql.SQLException
Assignes a Long value into a PreparedStatement

Parameters:
ps - is the PreparedStatement
idx - is the index of the the value in the PreparedStatement
o - is the value to assign
Throws:
java.sql.SQLException

setFloat

void setFloat(java.sql.PreparedStatement ps,
              int idx,
              float o)
              throws java.sql.SQLException
Assignes a float value into a PreparedStatement

Parameters:
ps - is the PreparedStatement
idx - is the index of the the value in the PreparedStatement
o - is the value to assign
Throws:
java.sql.SQLException

setOfloat

void setOfloat(java.sql.PreparedStatement ps,
               int idx,
               java.lang.Float o)
               throws java.sql.SQLException
Assignes a Float value into a PreparedStatement

Parameters:
ps - is the PreparedStatement
idx - is the index of the the value in the PreparedStatement
o - is the value to assign
Throws:
java.sql.SQLException

setDouble

void setDouble(java.sql.PreparedStatement ps,
               int idx,
               double o)
               throws java.sql.SQLException
Assignes a double value into a PreparedStatement

Parameters:
ps - is the PreparedStatement
idx - is the index of the the value in the PreparedStatement
o - is the value to assign
Throws:
java.sql.SQLException

setOdouble

void setOdouble(java.sql.PreparedStatement ps,
                int idx,
                java.lang.Double o)
                throws java.sql.SQLException
Assignes a Double value into a PreparedStatement

Parameters:
ps - is the PreparedStatement
idx - is the index of the the value in the PreparedStatement
o - is the value to assign
Throws:
java.sql.SQLException

setString

void setString(java.sql.PreparedStatement ps,
               int idx,
               java.lang.String o)
               throws java.sql.SQLException
Assignes a value into a PreparedStatement

Parameters:
ps - is the PreparedStatement
idx - is the index of the the value in the PreparedStatement
o - is the value to assign
Throws:
java.sql.SQLException

setDate

void setDate(java.sql.PreparedStatement ps,
             int idx,
             java.util.Date o,
             java.lang.String columnType)
             throws java.sql.SQLException
Assignes a String value into a PreparedStatement

Parameters:
ps - is the PreparedStatement
idx - is the index of the the value in the PreparedStatement
o - is the value to assign
Throws:
java.sql.SQLException

setCharArray

void setCharArray(java.sql.PreparedStatement ps,
                  int idx,
                  char[] o)
                  throws java.sql.SQLException
Assignes a char[] value into a PreparedStatement

Parameters:
ps - is the PreparedStatement
idx - is the index of the the value in the PreparedStatement
o - is the value to assign
Throws:
java.sql.SQLException

setByteArray

void setByteArray(java.sql.PreparedStatement ps,
                  int idx,
                  byte[] o)
                  throws java.sql.SQLException
Assignes a byte[] value into a PreparedStatement

Parameters:
ps - is the PreparedStatement
idx - is the index of the the value in the PreparedStatement
o - is the value to assign
Throws:
java.sql.SQLException

setBigDecimal

void setBigDecimal(java.sql.PreparedStatement ps,
                   int idx,
                   java.math.BigDecimal o)
                   throws java.sql.SQLException
Assignes a BigDecimal value into a PreparedStatement

Parameters:
ps - is the PreparedStatement
idx - is the index of the the value in the PreparedStatement
o - is the value to assign
Throws:
java.sql.SQLException

setBigInteger

void setBigInteger(java.sql.PreparedStatement ps,
                   int idx,
                   java.math.BigInteger o)
                   throws java.sql.SQLException
Assignes a BigInteger value into a PreparedStatement

Parameters:
ps - is the PreparedStatement
idx - is the index of the the value in the PreparedStatement
o - is the value to assign
Throws:
java.sql.SQLException

setSerialized

void setSerialized(java.sql.PreparedStatement ps,
                   int idx,
                   java.io.Serializable o)
                   throws java.sql.SQLException,
                          java.io.IOException
Assignes a serializable value into a PreparedStatement

Parameters:
ps - is the PreparedStatement
idx - is the index of the the value in the PreparedStatement
o - is the value to assign
Throws:
java.sql.SQLException
java.io.IOException

setArray

void setArray(java.sql.PreparedStatement ps,
              int idx,
              java.lang.Object o,
              int typeCode)
              throws java.sql.SQLException
Assignes an array value into a PreparedStatement

Parameters:
ps - is the PreparedStatement
idx - is the index of the the value in the PreparedStatement
o - is the value to assign
typeCode - is the type code of the array ex: = (TypeAdapter.ARRAY + TypeAdapter.STRING)
Throws:
java.sql.SQLException

getArrayToString

java.lang.String getArrayToString(java.lang.Object array,
                                  int typeCode)