git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@50874 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
81
Data/BulkLoad/EFT/Nominations/plsql/cout_assert.spc
Normal file
81
Data/BulkLoad/EFT/Nominations/plsql/cout_assert.spc
Normal file
@@ -0,0 +1,81 @@
|
||||
CREATE OR REPLACE PACKAGE EFT_NOM.cout_assert IS
|
||||
/**
|
||||
-- Package of assertion routines to make it easy to validate assumptions in a declarative fashion.
|
||||
--
|
||||
*/
|
||||
|
||||
SUBTYPE g_t_substitution_list IS cout_err.g_t_substitution_list;
|
||||
c_empty_substitution_list g_t_substitution_list;
|
||||
|
||||
/**
|
||||
Asserts whether the given p_condition is true
|
||||
#param p_condition The condition to be asserted as TRUE
|
||||
#param p_message The message to be displayed when the assertion is NOT TRUE
|
||||
#param p_raise_exception Requests that an exception be raised if the assertion is NOT TRUE
|
||||
#param p_exception The exception to be raised, if requested
|
||||
#param p_subsitution_list Table of values to be substituted into the generated exception message
|
||||
#param p_helper_call_level If being used by a 'helper' procedure, indicates the call above the curremt call to be reported
|
||||
#usage cout_assert.istrue(p_inmo_type IN ('CR', 'CU', 'INMO', 'CA', 'CT'),p_message => 'Invalid inmo_type passed');
|
||||
*/
|
||||
PROCEDURE istrue(p_condition IN BOOLEAN
|
||||
,p_message IN VARCHAR2
|
||||
,p_raise_exception IN BOOLEAN := TRUE
|
||||
,p_exception IN NUMBER := -6502
|
||||
,p_substitution_list IN g_t_substitution_list := c_empty_substitution_list
|
||||
,p_helper_call_level IN NUMBER := 1);
|
||||
/**
|
||||
Asserts whether the given p_value IS NOT NULL
|
||||
#param p_condition The condition to be asserted as TRUE
|
||||
#param p_message The message to be displayed when the assertion is NOT TRUE
|
||||
#param p_raise_exception Requests that an exception be raised if the assertion is NOT TRUE
|
||||
#param p_exception The exception to be raised, if requested
|
||||
#param p_subsitution_list Table of values to be substituted into the generated exception message
|
||||
#usage cout_assert.isnotnull(p_value => l_inst_id,p_message => 'Inventory statement not found');
|
||||
*/
|
||||
PROCEDURE isnotnull(p_value IN VARCHAR2
|
||||
,p_message IN VARCHAR2
|
||||
,p_raise_exception IN BOOLEAN := TRUE
|
||||
,p_exception IN NUMBER := -6502
|
||||
,p_substitution_list IN g_t_substitution_list := c_empty_substitution_list);
|
||||
/**
|
||||
Asserts whether the given p_value IS NOT NULL
|
||||
#param p_condition The condition to be asserted as TRUE
|
||||
#param p_message The message to be displayed when the assertion is NOT TRUE
|
||||
#param p_raise_exception Requests that an exception be raised if the assertion is NOT TRUE
|
||||
#param p_exception The exception to be raised, if requested
|
||||
#param p_subsitution_list Table of values to be substituted into the generated exception message
|
||||
*/
|
||||
PROCEDURE isnotnull(p_value IN DATE
|
||||
,p_message IN VARCHAR2
|
||||
,p_raise_exception IN BOOLEAN := TRUE
|
||||
,p_exception IN NUMBER := -6502
|
||||
,p_substitution_list IN g_t_substitution_list := c_empty_substitution_list);
|
||||
/**
|
||||
Asserts whether the given p_value IS NOT NULL
|
||||
#param p_condition The condition to be asserted as TRUE
|
||||
#param p_message The message to be displayed when the assertion is NOT TRUE
|
||||
#param p_raise_exception Requests that an exception be raised if the assertion is NOT TRUE
|
||||
#param p_exception The exception to be raised, if requested
|
||||
#param p_subsitution_list Table of values to be substituted into the generated exception message
|
||||
*/
|
||||
PROCEDURE isnotnull(p_value IN NUMBER
|
||||
,p_message IN VARCHAR2
|
||||
,p_raise_exception IN BOOLEAN := TRUE
|
||||
,p_exception IN NUMBER := -6502
|
||||
,p_substitution_list IN g_t_substitution_list := c_empty_substitution_list);
|
||||
/**
|
||||
Asserts whether the given p_value IS NOT NULL
|
||||
#param p_condition The condition to be asserted as TRUE
|
||||
#param p_message The message to be displayed when the assertion is NOT TRUE
|
||||
#param p_raise_exception Requests that an exception be raised if the assertion is NOT TRUE
|
||||
#param p_exception The exception to be raised, if requested
|
||||
#param p_subsitution_list Table of values to be substituted into the generated exception message
|
||||
*/
|
||||
PROCEDURE isnotnull(p_value IN BOOLEAN
|
||||
,p_message IN VARCHAR2
|
||||
,p_raise_exception IN BOOLEAN := TRUE
|
||||
,p_exception IN NUMBER := -6502
|
||||
,p_substitution_list IN g_t_substitution_list := c_empty_substitution_list);
|
||||
END cout_assert;
|
||||
/
|
||||
|
||||
Reference in New Issue
Block a user