Class 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
    • 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 to
        startIndex - The index to start with
        Throws:
        SQLException - SQLException of the underlying statement.setX methods