Package org.utplsql.api.db
Class DynamicParameterList
- java.lang.Object
-
- org.utplsql.api.db.DynamicParameterList
-
public class DynamicParameterList extends Object
Lets you build a list of parameters for a CallableStatement
Create it with the Builder (DynamicParameterList.builder())- Author:
- pesse
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDynamicParameterList.DynamicParameterListBuilderBuilder-class for DynamicParameterList
Usage:
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DynamicParameterList.DynamicParameterListBuilderbuilder()Returns a builder to create a DynamicParameterListStringgetSql()Returns the SQL of this ParameterList as comma-separated list of the parameter identifiers:
e.g.voidsetParamsStartWithIndex(CallableStatement statement, int startIndex)Sets the contained parameters in the order they were added to the given statement by index, starting with the given one
-
-
-
Method Detail
-
getSql
public String getSql()
Returns the SQL of this ParameterList as comma-separated list of the parameter identifiers:
e.g. "a_parameter1 => ?, a_parameter2 => ?"- Returns:
- comma-separated list of parameter identifiers
-
setParamsStartWithIndex
public void setParamsStartWithIndex(CallableStatement statement, int startIndex) throws SQLException
Sets the contained parameters in the order they were added to the given statement by index, starting with the given one- Parameters:
statement- The statement to set the parameters tostartIndex- The index to start with- Throws:
SQLException- SQLException of the underlying statement.setX methods
-
builder
public static DynamicParameterList.DynamicParameterListBuilder builder()
Returns a builder to create a DynamicParameterList- Returns:
- Builder
-
-