|
[Deprecated API] | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | CURRENT API | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--com.interface21.jdbc.object.RdbmsOperation
|
+--com.interface21.jdbc.object.StoredProcedure
Superclass for object abstractions of RDBMS stored procedures.
This class is abstract and its execute methods are protected, preventing use other than through
a subclass that offers tighter typing.
The inherited sql property is the name of the stored procedure in the RDBMS.
Note that JDBC 3.0 introduces named parameters, although the other features provided
by this class are still necessary in JDBC 3.0.
| Inner Class Summary | |
static class |
StoredProcedure.OutputParameter
Subclass of SqlParameter to represent an output parameter. |
protected static interface |
StoredProcedure.ParameterMapper
Implement this interface when parameters need to be customized based on the connection. |
| Fields inherited from class com.interface21.jdbc.object.RdbmsOperation |
logger |
| Constructor Summary | |
protected |
StoredProcedure()
Allow use as a bean |
protected |
StoredProcedure(javax.sql.DataSource ds,
java.lang.String name)
Create a new object wrapper for a stored procedure. |
| Method Summary | |
protected void |
compileInternal()
Override of NOP RdbmsOperation.compileInternal() to ensure that the call string is up to date before invoking the RDBMS stored procedure. |
void |
declareParameter(SqlParameter p)
Overridden method. |
protected java.util.Map |
execute(java.util.Map inParams)
Execute the stored procedure. |
protected java.util.Map |
execute(StoredProcedure.ParameterMapper mapper)
Execute the stored procedure. |
protected SQLExceptionTranslater |
getExceptionTranslater()
Return the exception translater for this instance. |
boolean |
isFunction()
|
void |
setExceptionTranslater(SQLExceptionTranslater exceptionTranslater)
Set the exception translater used in this class. |
void |
setFunction(boolean isFunction)
Sets the isFunction. |
| Methods inherited from class com.interface21.jdbc.object.RdbmsOperation |
afterPropertiesSet, compile, getDataSource, getDeclaredParameters, getSql, isCompiled, setDataSource, setSql, setTypes, validateParameters |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected StoredProcedure()
protected StoredProcedure(javax.sql.DataSource ds,
java.lang.String name)
ds - DataSource to use throughout the lifetime
of this object to obtain connectionsname - name of the stored procedure in the database.| Method Detail |
public void setExceptionTranslater(SQLExceptionTranslater exceptionTranslater)
SQLExceptionTranslaterprotected SQLExceptionTranslater getExceptionTranslater()
public void declareParameter(SqlParameter p)
throws InvalidDataAccessApiUsageException
declareParameter in class RdbmsOperationp - Parameter object (as defined in the Parameter
inner class)protected void compileInternal()
compileInternal in class RdbmsOperationcom.interface21.jdbc.object.RdbmsOperationInvalidDataAccessApiUsageException - if the subclass
hasn't been properly configured.protected java.util.Map execute(java.util.Map inParams)
inParams - map of input parameters, keyed by name as in parameter
declarations. Output parameters need not (but can be) included in this map.
It is legal for map entries to be null, and this will produce the correct
behavior using a NULL argument to the stored procedure.
protected java.util.Map execute(StoredProcedure.ParameterMapper mapper)
throws InvalidDataAccessApiUsageException
mapper - Map of input parameterspublic boolean isFunction()
public void setFunction(boolean isFunction)
isFunction - The isFunction to set
|
[Deprecated API] | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | CURRENT API | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||