Class ConfiguredStatementCreator

java.lang.Object
com.adaptris.jdbc.ConfiguredStatementCreator
All Implemented Interfaces:
CallableStatementCreator

public class ConfiguredStatementCreator extends Object implements CallableStatementCreator
ConfiguredStatementCreator.

With this implementation of the CallableStatementCreator, you can specify the entire statement string. An example of a full statement; { CALL procedureName(?, ?, ?); }

You have the choice of hard-coding the procedure name as in the above example, or simply inserting the dollar ($) symbol to have the procedure name injected for you; { CALL $(?, ?, ?); }

In the adapter configuration file this class is aliased as configured-statement-creator which is the preferred alternative to the fully qualified classname when building your configuration.

  • Field Details

    • statement

      @NotBlank public @NotBlank String statement
  • Constructor Details

    • ConfiguredStatementCreator

      public ConfiguredStatementCreator()
  • Method Details

    • createCall

      public String createCall(String procedureName, int parameterCount)
      Description copied from interface: CallableStatementCreator
      Create a CallableStatement String suitable for the database in question.
      Specified by:
      createCall in interface CallableStatementCreator
      Parameters:
      procedureName - the procedure name
      parameterCount - The number of parameters for this stored procedure call.
      Returns:
      a String similar to { CALL my_stored_procedure(?, ?, ?); } depending on the database.
    • getStatement

      public String getStatement()
    • setStatement

      public void setStatement(String statement)