Class SqlStatementParameterSetter
- java.lang.Object
-
- org.silverpeas.core.persistence.jdbc.sql.setters.SqlStatementParameterSetter
-
@Technical @Bean @Singleton public class SqlStatementParameterSetter extends Object
A setter of parameters of aPreparedStatement
instance according to the concrete type of the value with which the parameter has to be set.- Author:
- mmoquillon
-
-
Constructor Summary
Constructors Constructor Description SqlStatementParameterSetter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setParameter(PreparedStatement statement, int idx, Object value)
Sets the nth parameter of the specified SQL statement with the given value.
-
-
-
Method Detail
-
setParameter
public void setParameter(PreparedStatement statement, int idx, Object value) throws SQLException
Sets the nth parameter of the specified SQL statement with the given value. The setting is really done by using the parameter setter that supports the concrete type of the value; that is to say by the setter that knows how to set a SQL parameter of a given type.- Parameters:
statement
- aPreparedStatement
instance representing the SQL request.idx
- the index of the parameter in the SQL statement.value
- the value with which will be set the parameter.- Throws:
SQLException
- if an error occurs while setting the parameter.
-
-