@FunctionalInterface
public interface ParameterSetter
PreparedStatement.| Modifier and Type | Method and Description |
|---|---|
int |
setParameter(java.sql.PreparedStatement stmt,
int index,
java.lang.Object val,
boolean forUpdate)
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,
boolean forUpdate)
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 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.forUpdate - true if the parameter in the statement is used to update a field and false if
it is used as part of the where predicate.java.sql.SQLException - when an error is encountered while setting the value.