Interface IQueryStatementInput


public interface IQueryStatementInput
Interface implemented by a Result Set processor for database transactions executing an SQL query statement that produces a result set.
Author:
Christopher Mindus
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onInputRequested(NamedParameterStatement namedParameterStatement, InputProps inputProps)
    Method called when the input to an SQL query statement has been defined and filled with parameter values that are tied to the VirtualSpace.
  • Method Details

    • onInputRequested

      void onInputRequested(NamedParameterStatement namedParameterStatement, InputProps inputProps) throws ActionActorException, SQLException
      Method called when the input to an SQL query statement has been defined and filled with parameter values that are tied to the VirtualSpace.

      The method should carry out its work to provide additional variables for the query statement to be complete. The namedParameterStatement wraps a PreparedStatement and is used to set named parameters, and also the retrieve the input parameters that has been set.

      The variable sqlInputValues array is of the same length as the defined input variables of the SQL statement. These can be retrieved from the inputProps using the method InputProps.getInputVariables() returning an array of the input variables. Their indexes corresponds to the index in the sqlInputValues array and should be filled as required by this method with a data type object that can be handled for the JDBC statement execution in regards to variable bindings between the Java data types and the JDBC data types.

      Parameters:
      namedParameterStatement - The named parameter statement.
      inputProps - The input properties of the database transaction properties.
      Throws:
      ActionActorException - In case of errors in providing the input.
      SQLException - For SQL errors.