Interface StoredProcedure
- All Superinterfaces:
StoredProcedureExecutor
- All Known Implementing Classes:
AbstractStoredProcedure
This interface defines a stored procedure. It extends
StoredProcedureExecutor
and provides methods to
initialize the procedure and to carry out the appropriate actions when the procedure is involved in a transaction.-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returnstrue
if the field names defined by the stored procedure are case sensitive.void
commit()
The Execution Engine invokes this method to confirm the current transaction.Returns the description of the procedure.
It cannot returnnull
.getName()
Returns the name of the stored procedure.
It cannot returnnull
.void
initialize
(DatabaseEnvironment environment) Initializes the stored procedure.void
prepare()
The Execution Engine invokes this method when it is about to begin a transaction involving this procedure.void
rollback()
The Execution Engine invokes this method to undo the current transaction.void
setEnvironment
(DatabaseEnvironment environment) boolean
stop()
The Execution Engine invokes this method when a query involving the stored procedure is cancelled.Methods inherited from interface com.denodo.vdb.engine.storedprocedure.StoredProcedureExecutor
call, close, getNumOfAffectedRows, getParameters, getProcedureResultSet
-
Method Details
-
getName
String getName()Returns the name of the stored procedure.
It cannot returnnull
.- Returns:
- the name of the stored procedure.
-
getDescription
String getDescription()Returns the description of the procedure.
It cannot returnnull
.- Returns:
- a description of the procedure.
-
setEnvironment
- Parameters:
environment
- An object which allows to the procedure to communicate with the Virtual DataPort server.
-
initialize
Initializes the stored procedure.- Parameters:
environment
- An object which allows to the procedure to communicate with the VDP server.
-
prepare
void prepare()The Execution Engine invokes this method when it is about to begin a transaction involving this procedure. -
commit
void commit()The Execution Engine invokes this method to confirm the current transaction. -
rollback
void rollback()The Execution Engine invokes this method to undo the current transaction. -
stop
boolean stop()The Execution Engine invokes this method when a query involving the stored procedure is cancelled. The classAbstractStoredProcedure
provides a default implementation of this method that does not do anything and only returnsfalse
.
If the tasks executed by this procedure can be cancelled, override this method and cancel them. If this procedure opens any connection to other systems, opens files, etc., close these resources from this method.
If this method returnstrue
, the procedure must guarantee that it will finish after this method is invoked. If the procedure will not finish after invoking this procedure, returnfalse
.
If this procedure does not overwrite this method, the Execution Engine will try to interrupt the execution of this procedure and the queries started by it. Therefore, overwriting this method is not mandatory, although recommended.- Returns:
true
if the execution of the procedure has finished.false
otherwise.
-
caseSensitiveParameters
boolean caseSensitiveParameters()Returnstrue
if the field names defined by the stored procedure are case sensitive. If not, they are converted to lower case.- Returns:
true
if the field names defined by the stored procedure are case sensitive.false
otherwise
-