Package com.adaptris.jdbc
Class ConfiguredStatementCreator
java.lang.Object
com.adaptris.jdbc.ConfiguredStatementCreator
- All Implemented Interfaces:
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateCall
(String procedureName, int parameterCount) Create a CallableStatement String suitable for the database in question.void
setStatement
(String statement)
-
Field Details
-
statement
-
-
Constructor Details
-
ConfiguredStatementCreator
public ConfiguredStatementCreator()
-
-
Method Details
-
createCall
Description copied from interface:CallableStatementCreator
Create a CallableStatement String suitable for the database in question.- Specified by:
createCall
in interfaceCallableStatementCreator
- Parameters:
procedureName
- the procedure nameparameterCount
- The number of parameters for this stored procedure call.- Returns:
- a String similar to
{ CALL my_stored_procedure(?, ?, ?); }
depending on the database.
-
getStatement
-
setStatement
-