Interface IStoredProcedure
public interface IStoredProcedure
Interface IStoredProcedure
-
Method Summary
Modifier and TypeMethodDescriptionexecuteQuery
(ISqlWorker worker, Object[] args) Executes stored procedure and returns result setObject[]
executeQuery
(ISqlWorker worker, Object[] args, int[] outTypes) Executes stored procedure and return object arrayint
executeUpdate
(ISqlWorker worker, Object[] args) Executes updategetName()
Returns the name of the stored procedure.Returns optional package name for stored procedure.void
setDatabaseRuntime
(IDatabaseRuntime runtime)
-
Method Details
-
getName
String getName()Returns the name of the stored procedure. This name should match the name of the native stored procedure- Returns:
-
getPackageName
String getPackageName()Returns optional package name for stored procedure. Package name is only used for databases which support packages (Oracle, DB2)- Returns:
-
executeQuery
ResultSet executeQuery(ISqlWorker worker, Object[] args) throws SQLException, ServerBusyException, DeadlockException Executes stored procedure and returns result set- Parameters:
worker
- instance of ISqlWorker class that stored procedure should use to execute queries and manage transactional stateargs
- input arguments to the stored procedure- Returns:
- stored procedure may return java.sql.ResultSet or Object[] for output parameters
- Throws:
SQLException
ServerBusyException
DeadlockException
-
executeQuery
Object[] executeQuery(ISqlWorker worker, Object[] args, int[] outTypes) throws SQLException, ServerBusyException, DeadlockException Executes stored procedure and return object array- Parameters:
worker
-args
-outTypes
-- Returns:
- Throws:
SQLException
ServerBusyException
DeadlockException
-
executeUpdate
int executeUpdate(ISqlWorker worker, Object[] args) throws SQLException, ServerBusyException, DeadlockException Executes update- Parameters:
worker
-args
-- Returns:
- number of updated records
- Throws:
SQLException
ServerBusyException
DeadlockException
-
setDatabaseRuntime
-