Configures a CallableStatementCreatorFactory based on the declared parameters.
CallableStatementCreatorFactory
| Modifier and Type | Field and Description |
|---|---|
| private CallableStatementCreatorFactory | callableStatementFactory
Object enabling us to create CallableStatementCreators efficiently, based on this class's declared parameters. |
| private String | callString
Call string as defined in java.sql.CallableStatement. |
| private boolean | function
Flag used to indicate that this call is for a function and to use the {? |
| private boolean | sqlReadyForUse
Flag used to indicate that the sql for this call should be used exactly as it is defined. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | SqlCall(DataSource
the DataSource to obtain connections from ds, String the SQL to execute sql)Create a new SqlCall object with SQL, but without parameters. |
| Modifier and Type | Method and Description |
|---|---|
| protected final void | compileInternal()
Implements abstract org. Overridden method to configure the CallableStatementCreatorFactory based on our declared parameters. |
| public String | |
| public boolean | |
| public boolean | |
| protected CallableStatementCreator | newCallableStatementCreator(Map<String, ?>
parameters. May be inParams)null.Return a CallableStatementCreator to perform an operation with these parameters. |
| protected CallableStatementCreator | newCallableStatementCreator(ParameterMapper
parametermapper. May not be inParamMapper)null.Return a CallableStatementCreator to perform an operation with the parameters returned from this ParameterMapper. |
| protected void | |
| public void | |
| public void |
| callableStatementFactory | back to summary |
|---|---|
| private CallableStatementCreatorFactory callableStatementFactory Object enabling us to create CallableStatementCreators efficiently, based on this class's declared parameters. | |
| callString | back to summary |
|---|---|
| private String callString Call string as defined in java.sql.CallableStatement. String of form {call add_invoice(?, ?, ?)} or {? = call get_invoice_count(?)} if isFunction is set to true. Updated after each parameter is added. | |
| function | back to summary |
|---|---|
| private boolean function Flag used to indicate that this call is for a function and to use the {? = call get_invoice_count(?)} syntax. | |
| sqlReadyForUse | back to summary |
|---|---|
| private boolean sqlReadyForUse Flag used to indicate that the sql for this call should be used exactly as it is defined. No need to add the escape syntax and parameter placeholders. | |
| SqlCall | back to summary |
|---|---|
| public SqlCall() Constructor to allow use as a JavaBean.
A DataSource, SQL and any parameters must be supplied before
invoking the
| |
| SqlCall | back to summary |
|---|---|
| public SqlCall(DataSource ds, String sql) Create a new SqlCall object with SQL, but without parameters. Must add parameters or settle with none.
| |
| compileInternal | back to summary |
|---|---|
| protected final void compileInternal() Implements abstract org. Overridden method to configure the CallableStatementCreatorFactory based on our declared parameters.
| |
| getCallString | back to summary |
|---|---|
| public String getCallString() Get the call string.
| |
| isFunction | back to summary |
|---|---|
| public boolean isFunction() Return whether this call is for a function. | |
| isSqlReadyForUse | back to summary |
|---|---|
| public boolean isSqlReadyForUse() Return whether the SQL can be used as is. | |
| newCallableStatementCreator | back to summary |
|---|---|
| protected CallableStatementCreator newCallableStatementCreator(Map<String, ?> inParams) Return a CallableStatementCreator to perform an operation with these parameters. | |
| newCallableStatementCreator | back to summary |
|---|---|
| protected CallableStatementCreator newCallableStatementCreator(ParameterMapper inParamMapper) Return a CallableStatementCreator to perform an operation with the parameters returned from this ParameterMapper.
| |
| onCompileInternal | back to summary |
|---|---|
| protected void onCompileInternal() Hook method that subclasses may override to react to compilation. This implementation does nothing. | |
| setFunction | back to summary |
|---|---|
| public void setFunction(boolean function) Set whether this call is for a function. | |
| setSqlReadyForUse | back to summary |
|---|---|
| public void setSqlReadyForUse(boolean sqlReadyForUse) Set whether the SQL can be used as is. | |