@FunctionalInterface
public interface ParameterSetter
PreparedStatement
.Modifier and Type | Method and Description |
---|---|
int |
setParameter(java.sql.PreparedStatement stmt,
int index,
java.lang.Object val)
Converts/extract a value to a type supported by Java SQL toolkit and set it to as
the specified parameter in the
PreparedStatement . |
int setParameter(java.sql.PreparedStatement stmt, int index, java.lang.Object val) throws java.sql.SQLException
PreparedStatement
. For example, if a native integer
value is provided, the setInt(int, int x)
method should be used.stmt
- The prepared statement whose the parameter is to be set.index
- The index/position of the parameter or of the first one, if the property needs
multiple consecutive parameters in order to be fully stored to persistence. To
see how many positions the property needs, see PropertyMeta.columnCount
.val
- The value of the parameter.java.sql.SQLException
- when an error is encountered while setting the value.