Package com.ibatis.sqlmap.engine.type
Class ParameterSetterImpl
java.lang.Object
com.ibatis.sqlmap.engine.type.ParameterSetterImpl
- All Implemented Interfaces:
ParameterSetter
A ParameterSetter implementation.
-
Constructor Summary
ConstructorsConstructorDescriptionParameterSetterImpl(PreparedStatement statement, int columnIndex) Creates an instance for a PreparedStatement and column index. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the index of the parameter being set.Returns the underlying prepared statement...be careful!voidSet an array on the underlying prepared statement.voidsetAsciiStream(InputStream x, int length) Set an InputStream on the underlying prepared statement.voidSet an on the underlying prepared statement.voidsetBinaryStream(InputStream x, int length) Set an InputStream on the underlying prepared statement.voidSet a blob on the underlying prepared statement.voidsetBoolean(boolean x) Set a boolean on the underlying prepared statement.voidsetByte(byte x) Set a byte on the underlying prepared statement.voidsetBytes(byte[] x) Set a byte array on the underlying prepared statement.voidsetCharacterStream(Reader reader, int length) Set a character stream on the underlying prepared statement.voidSet a clob on the underlying prepared statement.voidSet a date on the underlying prepared statement.voidSet a date with a calendar on the underlying prepared statement.voidsetDouble(double x) Set a double on the underlying prepared statement.voidsetFloat(float x) Set a float on the underlying prepared statement.voidsetInt(int x) Set an integer on the underlying prepared statement.voidsetLong(long x) Set a long on the underlying prepared statement.voidsetNull(int sqlType) Set a null on the underlying prepared statement.voidSet a null on the underlying prepared statement.voidSet an object on the underlying prepared statement.voidSet an object on the underlying prepared statement.voidSet an object on the underlying prepared statement.voidSet a reference on the underlying prepared statement.voidsetShort(short x) Set a short on the underlying prepared statement.voidSet a string on the underlying prepared statement.voidSet a time on the underlying prepared statement.voidSet a time with a calendar on the underlying prepared statement.voidSet a timestamp on the underlying prepared statement.voidsetTimestamp(Timestamp x, Calendar cal) Set a timestamp on the underlying prepared statement.voidSet a URL on the underlying prepared statement.
-
Constructor Details
-
ParameterSetterImpl
Creates an instance for a PreparedStatement and column index.- Parameters:
statement- - the PreparedStatementcolumnIndex- - the column index
-
-
Method Details
-
setArray
Description copied from interface:ParameterSetterSet an array on the underlying prepared statement.- Specified by:
setArrayin interfaceParameterSetter- Parameters:
x- - the array to set- Throws:
SQLException- - thrown if the underlying prepared statement throws it
-
setAsciiStream
Description copied from interface:ParameterSetterSet an InputStream on the underlying prepared statement.- Specified by:
setAsciiStreamin interfaceParameterSetter- Parameters:
x- - the InputStreamlength- - the length of the InputStream- Throws:
SQLException- - thrown if the underlying prepared statement throws it
-
setBigDecimal
Description copied from interface:ParameterSetterSet an on the underlying prepared statement.- Specified by:
setBigDecimalin interfaceParameterSetter- Parameters:
x- the new big decimal- Throws:
SQLException- - thrown if the underlying prepared statement throws it
-
setBinaryStream
Description copied from interface:ParameterSetterSet an InputStream on the underlying prepared statement.- Specified by:
setBinaryStreamin interfaceParameterSetter- Parameters:
x- - the InputStreamlength- - the length of the InputStream- Throws:
SQLException- - thrown if the underlying prepared statement throws it
-
setBlob
Description copied from interface:ParameterSetterSet a blob on the underlying prepared statement.- Specified by:
setBlobin interfaceParameterSetter- Parameters:
x- - the blob- Throws:
SQLException- - thrown if the underlying prepared statement throws it
-
setBoolean
Description copied from interface:ParameterSetterSet a boolean on the underlying prepared statement.- Specified by:
setBooleanin interfaceParameterSetter- Parameters:
x- - the boolean- Throws:
SQLException- - thrown if the underlying prepared statement throws it
-
setByte
Description copied from interface:ParameterSetterSet a byte on the underlying prepared statement.- Specified by:
setBytein interfaceParameterSetter- Parameters:
x- - the byte- Throws:
SQLException- - thrown if the underlying prepared statement throws it
-
setBytes
Description copied from interface:ParameterSetterSet a byte array on the underlying prepared statement.- Specified by:
setBytesin interfaceParameterSetter- Parameters:
x- - the byte[]- Throws:
SQLException- - thrown if the underlying prepared statement throws it
-
setCharacterStream
Description copied from interface:ParameterSetterSet a character stream on the underlying prepared statement.- Specified by:
setCharacterStreamin interfaceParameterSetter- Parameters:
reader- - the readerlength- - the length of the reader- Throws:
SQLException- - thrown if the underlying prepared statement throws it
-
setClob
Description copied from interface:ParameterSetterSet a clob on the underlying prepared statement.- Specified by:
setClobin interfaceParameterSetter- Parameters:
x- - the clob- Throws:
SQLException- - thrown if the underlying prepared statement throws it
-
setDate
Description copied from interface:ParameterSetterSet a date on the underlying prepared statement.- Specified by:
setDatein interfaceParameterSetter- Parameters:
x- - the date- Throws:
SQLException- - thrown if the underlying prepared statement throws it
-
setDate
Description copied from interface:ParameterSetterSet a date with a calendar on the underlying prepared statement.- Specified by:
setDatein interfaceParameterSetter- Parameters:
x- - the datecal- - the calendar- Throws:
SQLException- - thrown if the underlying prepared statement throws it
-
setDouble
Description copied from interface:ParameterSetterSet a double on the underlying prepared statement.- Specified by:
setDoublein interfaceParameterSetter- Parameters:
x- - the double- Throws:
SQLException- - thrown if the underlying prepared statement throws it
-
setFloat
Description copied from interface:ParameterSetterSet a float on the underlying prepared statement.- Specified by:
setFloatin interfaceParameterSetter- Parameters:
x- the float- Throws:
SQLException- - thrown if the underlying prepared statement throws it
-
setInt
Description copied from interface:ParameterSetterSet an integer on the underlying prepared statement.- Specified by:
setIntin interfaceParameterSetter- Parameters:
x- - the int- Throws:
SQLException- - thrown if the underlying prepared statement throws it
-
setLong
Description copied from interface:ParameterSetterSet a long on the underlying prepared statement.- Specified by:
setLongin interfaceParameterSetter- Parameters:
x- - the long- Throws:
SQLException- - thrown if the underlying prepared statement throws it
-
setNull
Description copied from interface:ParameterSetterSet a null on the underlying prepared statement.- Specified by:
setNullin interfaceParameterSetter- Parameters:
sqlType- - the type for the null value- Throws:
SQLException- - thrown if the underlying prepared statement throws it
-
setNull
Description copied from interface:ParameterSetterSet a null on the underlying prepared statement.- Specified by:
setNullin interfaceParameterSetter- Parameters:
sqlType- - the type for the null valuetypeName- - the name of the type- Throws:
SQLException- - thrown if the underlying prepared statement throws it
-
setObject
Description copied from interface:ParameterSetterSet an object on the underlying prepared statement.- Specified by:
setObjectin interfaceParameterSetter- Parameters:
x- - the object to set- Throws:
SQLException- - thrown if the underlying prepared statement throws it
-
setObject
Description copied from interface:ParameterSetterSet an object on the underlying prepared statement.- Specified by:
setObjectin interfaceParameterSetter- Parameters:
x- - the object to settargetSqlType- - the sql type of the object- Throws:
SQLException- - thrown if the underlying prepared statement throws it
-
setObject
Description copied from interface:ParameterSetterSet an object on the underlying prepared statement.- Specified by:
setObjectin interfaceParameterSetter- Parameters:
x- - the object to settargetSqlType- - the sql type of the objectscale- - the scale of the object- Throws:
SQLException- - thrown if the underlying prepared statement throws it
-
setRef
Description copied from interface:ParameterSetterSet a reference on the underlying prepared statement.- Specified by:
setRefin interfaceParameterSetter- Parameters:
x- - the reference to set- Throws:
SQLException- - thrown if the underlying prepared statement throws it
-
setShort
Description copied from interface:ParameterSetterSet a short on the underlying prepared statement.- Specified by:
setShortin interfaceParameterSetter- Parameters:
x- - the short to set- Throws:
SQLException- - thrown if the underlying prepared statement throws it
-
setString
Description copied from interface:ParameterSetterSet a string on the underlying prepared statement.- Specified by:
setStringin interfaceParameterSetter- Parameters:
x- - the string to set- Throws:
SQLException- - thrown if the underlying prepared statement throws it
-
setTime
Description copied from interface:ParameterSetterSet a time on the underlying prepared statement.- Specified by:
setTimein interfaceParameterSetter- Parameters:
x- - the time to set- Throws:
SQLException- - thrown if the underlying prepared statement throws it
-
setTime
Description copied from interface:ParameterSetterSet a time with a calendar on the underlying prepared statement.- Specified by:
setTimein interfaceParameterSetter- Parameters:
x- - the time to setcal- - the calendar to use- Throws:
SQLException- - thrown if the underlying prepared statement throws it
-
setTimestamp
Description copied from interface:ParameterSetterSet a timestamp on the underlying prepared statement.- Specified by:
setTimestampin interfaceParameterSetter- Parameters:
x- - the timestamp to set- Throws:
SQLException- - thrown if the underlying prepared statement throws it
-
setTimestamp
Description copied from interface:ParameterSetterSet a timestamp on the underlying prepared statement.- Specified by:
setTimestampin interfaceParameterSetter- Parameters:
x- - the timestamp to setcal- - the calendar to use- Throws:
SQLException- - thrown if the underlying prepared statement throws it
-
setURL
Description copied from interface:ParameterSetterSet a URL on the underlying prepared statement.- Specified by:
setURLin interfaceParameterSetter- Parameters:
x- - the url to set- Throws:
SQLException- - thrown if the underlying prepared statement throws it
-
getPreparedStatement
Description copied from interface:ParameterSetterReturns the underlying prepared statement...be careful!- Specified by:
getPreparedStatementin interfaceParameterSetter- Returns:
- the prepared statement
-
getParameterIndex
public int getParameterIndex()Description copied from interface:ParameterSetterReturns the index of the parameter being set.- Specified by:
getParameterIndexin interfaceParameterSetter- Returns:
- the parameter index used to set the value in the underlying PreparedStatement
-