org.jaffa.persistence.engines.jdbcengine
Interface IStoredProcedure

All Superinterfaces:
Cloneable, IPersistent, Serializable

public interface IStoredProcedure
extends IPersistent

This is the interface for a StoredProcedure.


Field Summary
static int BOTH
          A static for denoting an INPUT/OUTPUT parameter of a StoredProcedure
static int IN
          A static for denoting an INPUT parameter of a StoredProcedure
static int OUT
          A static for denoting an OUTPUT parameter of a StoredProcedure
 
Method Summary
 int[] getParamDirections()
          The implementing class should return an array of integers signifying the directions (input, output or input/output) for each of the parameter returned in the getParameters() method.
 String[] getParameters()
          The implementing class should return an array of field names, which correspond to the parameters of the StoredProcedure.
 String[] getParamSqlTypes()
          The implementing class should return an array of Strings signifying the SQL type for each of the parameter returned in the getParameters() method.
 String prepareCall()
          The implementing class will return a String having the call to the StoredProcedure.
 
Methods inherited from interface org.jaffa.persistence.IPersistent
getLocking, getUOW, isDatabaseOccurence, isLocked, isModified, isModified, isQueued, postAdd, postDelete, postLoad, postUpdate, preAdd, preDelete, preUpdate, returnInitialValue, setDatabaseOccurence, setLocked, setLocking, setModified, setQueued, setUOW
 

Field Detail

IN

public static final int IN
A static for denoting an INPUT parameter of a StoredProcedure

See Also:
Constant Field Values

OUT

public static final int OUT
A static for denoting an OUTPUT parameter of a StoredProcedure

See Also:
Constant Field Values

BOTH

public static final int BOTH
A static for denoting an INPUT/OUTPUT parameter of a StoredProcedure

See Also:
Constant Field Values
Method Detail

getParameters

public String[] getParameters()
The implementing class should return an array of field names, which correspond to the parameters of the StoredProcedure. The implementing class should provide Getters/Setters for these fields.

Returns:
An array of parameters to the StoredProcedure.

getParamSqlTypes

public String[] getParamSqlTypes()
The implementing class should return an array of Strings signifying the SQL type for each of the parameter returned in the getParameters() method. eg. VARCHAR, BOOLEAN etc. etc. These should be the same as those defined in the mapping files

Returns:
An array of Strings signifying the SQL type of the parameters.

getParamDirections

public int[] getParamDirections()
The implementing class should return an array of integers signifying the directions (input, output or input/output) for each of the parameter returned in the getParameters() method.

Returns:
An array of integers signifying the directions of the parameters.

prepareCall

public String prepareCall()
The implementing class will return a String having the call to the StoredProcedure. For eg. To invoke the 'ke_vcpkg1.getvoucher' StoredProcedure, which takes 3 parameters, this method will return the string "{call ke_vcpkg1.getvoucher(?,?,?)}".

Returns:
a String having the call to the StoredProcedure.


Copyright © 2002-2004 JAFFA Project.