com.ibatis.sqlmap.client.extensions
Interface ParameterSetter

All Known Implementing Classes:
ParameterSetterImpl

public interface ParameterSetter

Allows parameters to be set on the underlying prepared statement. TypeHandlerCallback implementations use this interface to process values before they are set on the prepared statement. Each of these methods has a corresponding method on the PreparedStatement class, the only difference being that there is no need to specify the parameter index with these methods.

注意: There is no need to implement this. The implementation will be passed into the TypeHandlerCallback automatically.


方法摘要
 int getParameterIndex()
          Returns the index of the parameter being set.
 java.sql.PreparedStatement getPreparedStatement()
          Returns the underlying prepared statement...be careful!
 void setArray(java.sql.Array x)
          Set an array on the underlying prepared statement
 void setAsciiStream(java.io.InputStream x, int length)
          Set an InputStream on the underlying prepared statement
 void setBigDecimal(java.math.BigDecimal x)
          Set an on the underlying prepared statement
 void setBinaryStream(java.io.InputStream x, int length)
          Set an InputStream on the underlying prepared statement
 void setBlob(java.sql.Blob x)
          Set a blob on the underlying prepared statement
 void setBoolean(boolean x)
          Set a boolean on the underlying prepared statement
 void setByte(byte x)
          Set a byte on the underlying prepared statement
 void setBytes(byte[] x)
          Set a byte array on the underlying prepared statement
 void setCharacterStream(java.io.Reader reader, int length)
          Set a character stream on the underlying prepared statement
 void setClob(java.sql.Clob x)
          Set a clob on the underlying prepared statement
 void setDate(java.sql.Date x)
          Set a date on the underlying prepared statement
 void setDate(java.sql.Date x, java.util.Calendar cal)
          Set a date with a calendar on the underlying prepared statement
 void setDouble(double x)
          Set a double on the underlying prepared statement
 void setFloat(float x)
          Set a float on the underlying prepared statement
 void setInt(int x)
          Set an integer on the underlying prepared statement
 void setLong(long x)
          Set a long on the underlying prepared statement
 void setNull(int sqlType)
          Set a null on the underlying prepared statement
 void setNull(int sqlType, java.lang.String typeName)
          Set a null on the underlying prepared statement
 void setObject(java.lang.Object x)
          Set an object on the underlying prepared statement
 void setObject(java.lang.Object x, int targetSqlType)
          Set an object on the underlying prepared statement
 void setObject(java.lang.Object x, int targetSqlType, int scale)
          Set an object on the underlying prepared statement
 void setRef(java.sql.Ref x)
          Set a reference on the underlying prepared statement
 void setShort(short x)
          Set a short on the underlying prepared statement
 void setString(java.lang.String x)
          Set a string on the underlying prepared statement
 void setTime(java.sql.Time x)
          Set a time on the underlying prepared statement
 void setTime(java.sql.Time x, java.util.Calendar cal)
          Set a time with a calendar on the underlying prepared statement
 void setTimestamp(java.sql.Timestamp x)
          Set a timestamp on the underlying prepared statement
 void setTimestamp(java.sql.Timestamp x, java.util.Calendar cal)
          Set a timestamp on the underlying prepared statement
 void setURL(java.net.URL x)
          Set a URL on the underlying prepared statement
 

方法详细信息

setArray

void setArray(java.sql.Array x)
              throws java.sql.SQLException
Set an array on the underlying prepared statement

参数:
x - - the array to set
抛出异常:
java.sql.SQLException - - thrown if the underlying prepared statement throws it

setAsciiStream

void setAsciiStream(java.io.InputStream x,
                    int length)
                    throws java.sql.SQLException
Set an InputStream on the underlying prepared statement

参数:
x - - the InputStream
length - - the length of the InputStream
抛出异常:
java.sql.SQLException - - thrown if the underlying prepared statement throws it

setBigDecimal

void setBigDecimal(java.math.BigDecimal x)
                   throws java.sql.SQLException
Set an on the underlying prepared statement

参数:
x -
抛出异常:
java.sql.SQLException - - thrown if the underlying prepared statement throws it

setBinaryStream

void setBinaryStream(java.io.InputStream x,
                     int length)
                     throws java.sql.SQLException
Set an InputStream on the underlying prepared statement

参数:
x - - the InputStream
length - - the length of the InputStream
抛出异常:
java.sql.SQLException - - thrown if the underlying prepared statement throws it

setBlob

void setBlob(java.sql.Blob x)
             throws java.sql.SQLException
Set a blob on the underlying prepared statement

参数:
x - - the blob
抛出异常:
java.sql.SQLException - - thrown if the underlying prepared statement throws it

setBoolean

void setBoolean(boolean x)
                throws java.sql.SQLException
Set a boolean on the underlying prepared statement

参数:
x - - the boolean
抛出异常:
java.sql.SQLException - - thrown if the underlying prepared statement throws it

setByte

void setByte(byte x)
             throws java.sql.SQLException
Set a byte on the underlying prepared statement

参数:
x - - the byte
抛出异常:
java.sql.SQLException - - thrown if the underlying prepared statement throws it

setBytes

void setBytes(byte[] x)
              throws java.sql.SQLException
Set a byte array on the underlying prepared statement

参数:
x - - the byte[]
抛出异常:
java.sql.SQLException - - thrown if the underlying prepared statement throws it

setCharacterStream

void setCharacterStream(java.io.Reader reader,
                        int length)
                        throws java.sql.SQLException
Set a character stream on the underlying prepared statement

参数:
reader - - the reader
length - - the length of the reader
抛出异常:
java.sql.SQLException - - thrown if the underlying prepared statement throws it

setClob

void setClob(java.sql.Clob x)
             throws java.sql.SQLException
Set a clob on the underlying prepared statement

参数:
x - - the clob
抛出异常:
java.sql.SQLException - - thrown if the underlying prepared statement throws it

setDate

void setDate(java.sql.Date x)
             throws java.sql.SQLException
Set a date on the underlying prepared statement

参数:
x - - the date
抛出异常:
java.sql.SQLException - - thrown if the underlying prepared statement throws it

setDate

void setDate(java.sql.Date x,
             java.util.Calendar cal)
             throws java.sql.SQLException
Set a date with a calendar on the underlying prepared statement

参数:
x - - the date
cal - - the calendar
抛出异常:
java.sql.SQLException - - thrown if the underlying prepared statement throws it

setDouble

void setDouble(double x)
               throws java.sql.SQLException
Set a double on the underlying prepared statement

参数:
x - - the double
抛出异常:
java.sql.SQLException - - thrown if the underlying prepared statement throws it

setFloat

void setFloat(float x)
              throws java.sql.SQLException
Set a float on the underlying prepared statement

参数:
x - the float
抛出异常:
java.sql.SQLException - - thrown if the underlying prepared statement throws it

setInt

void setInt(int x)
            throws java.sql.SQLException
Set an integer on the underlying prepared statement

参数:
x - - the int
抛出异常:
java.sql.SQLException - - thrown if the underlying prepared statement throws it

setLong

void setLong(long x)
             throws java.sql.SQLException
Set a long on the underlying prepared statement

参数:
x - - the long
抛出异常:
java.sql.SQLException - - thrown if the underlying prepared statement throws it

setNull

void setNull(int sqlType)
             throws java.sql.SQLException
Set a null on the underlying prepared statement

参数:
sqlType - - the type for the null value
抛出异常:
java.sql.SQLException - - thrown if the underlying prepared statement throws it

setNull

void setNull(int sqlType,
             java.lang.String typeName)
             throws java.sql.SQLException
Set a null on the underlying prepared statement

参数:
sqlType - - the type for the null value
typeName - - the name of the type
抛出异常:
java.sql.SQLException - - thrown if the underlying prepared statement throws it

setObject

void setObject(java.lang.Object x)
               throws java.sql.SQLException
Set an object on the underlying prepared statement

参数:
x - - the object to set
抛出异常:
java.sql.SQLException - - thrown if the underlying prepared statement throws it

setObject

void setObject(java.lang.Object x,
               int targetSqlType)
               throws java.sql.SQLException
Set an object on the underlying prepared statement

参数:
x - - the object to set
targetSqlType - - the sql type of the object
抛出异常:
java.sql.SQLException - - thrown if the underlying prepared statement throws it

setObject

void setObject(java.lang.Object x,
               int targetSqlType,
               int scale)
               throws java.sql.SQLException
Set an object on the underlying prepared statement

参数:
x - - the object to set
targetSqlType - - the sql type of the object
scale - - the scale of the object
抛出异常:
java.sql.SQLException - - thrown if the underlying prepared statement throws it

setRef

void setRef(java.sql.Ref x)
            throws java.sql.SQLException
Set a reference on the underlying prepared statement

参数:
x - - the reference to set
抛出异常:
java.sql.SQLException - - thrown if the underlying prepared statement throws it

setShort

void setShort(short x)
              throws java.sql.SQLException
Set a short on the underlying prepared statement

参数:
x - - the short to set
抛出异常:
java.sql.SQLException - - thrown if the underlying prepared statement throws it

setString

void setString(java.lang.String x)
               throws java.sql.SQLException
Set a string on the underlying prepared statement

参数:
x - - the string to set
抛出异常:
java.sql.SQLException - - thrown if the underlying prepared statement throws it

setTime

void setTime(java.sql.Time x)
             throws java.sql.SQLException
Set a time on the underlying prepared statement

参数:
x - - the time to set
抛出异常:
java.sql.SQLException - - thrown if the underlying prepared statement throws it

setTime

void setTime(java.sql.Time x,
             java.util.Calendar cal)
             throws java.sql.SQLException
Set a time with a calendar on the underlying prepared statement

参数:
x - - the time to set
cal - - the calendar to use
抛出异常:
java.sql.SQLException - - thrown if the underlying prepared statement throws it

setTimestamp

void setTimestamp(java.sql.Timestamp x)
                  throws java.sql.SQLException
Set a timestamp on the underlying prepared statement

参数:
x - - the timestamp to set
抛出异常:
java.sql.SQLException - - thrown if the underlying prepared statement throws it

setTimestamp

void setTimestamp(java.sql.Timestamp x,
                  java.util.Calendar cal)
                  throws java.sql.SQLException
Set a timestamp on the underlying prepared statement

参数:
x - - the timestamp to set
cal - - the calendar to use
抛出异常:
java.sql.SQLException - - thrown if the underlying prepared statement throws it

setURL

void setURL(java.net.URL x)
            throws java.sql.SQLException
Set a URL on the underlying prepared statement

参数:
x - - the url to set
抛出异常:
java.sql.SQLException - - thrown if the underlying prepared statement throws it

getPreparedStatement

java.sql.PreparedStatement getPreparedStatement()
Returns the underlying prepared statement...be careful!


getParameterIndex

int getParameterIndex()
Returns the index of the parameter being set.

返回:
the parameter index used to set the value in the underlying PreparedStatement