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

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

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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

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