DatabaseConstants

This is a simple interface that acts as a repository of the various constants that are used within the DAF. The primary constants expected by all to be used are related to the various operations that can be done. The details of the constants are provided in the following table:


Constant

Purpose

int SELECT;

This constant represents the DML operation of SELECT that needs to be executed.

int INSERT;

This constant represents the DML operation of INSERT that needs to be executed.

int UPDATE;

This constant represents the DML operation of UPDATE that needs to be executed.

int DELETE;

This constant represents the DML operation of DELETE that needs to be executed.

int BATCH_INSERT;

This constant represents the DML operation of INSERT that needs to be executed as a Batch.

int BATCH_UPDATE;

This constant represents the DML operation of UPDATE that needs to be executed as a Batch.

int EXECUTE_SP_NO_RETURN_NO_OUT;

This constant represents the operation ask to execute a Stored Procedure with the following features:

OUT Parameter

Return data

int EXECUTE_SP_NO_RETURN_ONLY_OUT;

This constant represents the operation ask to execute a Stored Procedure with the following features:

OUT Parameter

Return data

int EXECUTE_SP_ONLY_RETURN_NO_OUT;

This constant represents the operation ask to execute a Stored Procedure with the following features:

OUT Parameter

Return data

int EXECUTE_SP_RETURN_AND_OUT;

This constant represents the operation ask to execute a Stored Procedure with the following features:

OUT Parameter

Return data


The typical patterns followed by data modelers working using Stored Procedures is to use mix of two different modes of getting data back – One using OUT parameters for simple return values and the other using RETURN values which could be a data set, etc...The combinations provided for Stored Procedure execution effectively take care of all permutations expected.