public class ConfiguredStatementCreator extends java.lang.Object implements CallableStatementCreator
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.
Modifier and Type | Field and Description |
---|---|
java.lang.String |
statement |
Constructor and Description |
---|
ConfiguredStatementCreator() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
createCall(java.lang.String procedureName,
int parameterCount)
Create a CallableStatement String suitable for the database in question.
|
java.lang.String |
getStatement() |
void |
setStatement(java.lang.String statement) |
public java.lang.String createCall(java.lang.String procedureName, int parameterCount)
CallableStatementCreator
createCall
in interface CallableStatementCreator
procedureName
- the procedure nameparameterCount
- The number of parameters for this stored procedure call.{ CALL my_stored_procedure(?, ?, ?); }
depending on the database.public java.lang.String getStatement()
public void setStatement(java.lang.String statement)