Interface StoredProcedure

All Superinterfaces:
StoredProcedureExecutor
All Known Implementing Classes:
AbstractStoredProcedure

public interface StoredProcedure extends StoredProcedureExecutor
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.
  • Method Details

    • getName

      String getName()
      Returns the name of the stored procedure.
      It cannot return null.
      Returns:
      the name of the stored procedure.
    • getDescription

      String getDescription()
      Returns the description of the procedure.
      It cannot return null.
      Returns:
      a description of the procedure.
    • setEnvironment

      void setEnvironment(DatabaseEnvironment environment)
      Parameters:
      environment - An object which allows to the procedure to communicate with the Virtual DataPort server.
    • initialize

      void initialize(DatabaseEnvironment environment)
      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 class AbstractStoredProcedure provides a default implementation of this method that does not do anything and only returns false.
      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 returns true, the procedure must guarantee that it will finish after this method is invoked. If the procedure will not finish after invoking this procedure, return false.
      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()
      Returns true 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