Package com.mckoi.database
Interface DatabaseProcedure
public interface DatabaseProcedure
This interface represents a database procedure that is executed on the
server side. It is used to perform database specific functions that can
only be performed on the server.
A procedure must manage its own table locking.
- Author:
- Tobias Downer
-
Method Summary
Modifier and TypeMethodDescriptionExecutes the procudure and returns the resultant table.int
Returns the locking mode in which the database operates.This returns a DataTable[] array that lists the DataTables that are read during this procedure.Returns a DataTable[] array that lists the DataTables that are written to during this procedure.void
setLockHandle
(LockHandle lock_handle) Sets the LockHandle object for this procedure.
-
Method Details
-
execute
Executes the procudure and returns the resultant table. Note, the args have to be serializable. There may be only 0 to 16 arguments. The method may throw a 'DatabaseException' if the procedure failed.- Throws:
DatabaseException
-
getReadTables
This returns a DataTable[] array that lists the DataTables that are read during this procedure.- Throws:
DatabaseException
-
getWriteTables
Returns a DataTable[] array that lists the DataTables that are written to during this procedure.- Throws:
DatabaseException
-
getLockingMode
int getLockingMode()Returns the locking mode in which the database operates. This is either LockingMechanism.SHARED_MODE or LockingMechanism.EXCLUSIVE_MODE. In most cases this will be SHARED_MODE. -
setLockHandle
Sets the LockHandle object for this procedure. This should be called after the tables that this procedure uses have been locked.
-