1 PACKAGE hr_constraint_check AUTHID CURRENT_USER AS
2 /*$Header: hrconchk.pkh 115.1 2002/12/02 16:56:13 apholt ship $*/
3 --
4 -- Types
5 TYPE ConsRec IS RECORD
6 (constraint_name varchar2(30)
7 ,table_name varchar2(30)
8 );
9 TYPE ConsList IS TABLE OF ConsRec INDEX BY BINARY_INTEGER;
10 --
11 --
12 -- ----------------------------------------------------------------------------
13 -- |------------------------< build_constraint_list >-------------------------|
14 -- ----------------------------------------------------------------------------
15 --
16 -- Description:
17 -- When called, this procedure will build up a list of constraints that exist
18 -- in the appropriate database, for the given product.
19 --
20 -- In Parameters:
21 -- p_prod - A 3-letter or 2-letter product code, which determines the
22 -- constraints added to the list.
23 --
24 -- Out Parameters:
25 -- p_list - A PL/SQL table making up a list of constraints for the particular
26 -- product.
27 --
28 -- ----------------------------------------------------------------------------
29 PROCEDURE build_constraint_list (p_prod IN varchar2
30 ,p_list IN OUT NOCOPY ConsList);
31 --
32 -- ----------------------------------------------------------------------------
33 -- |---------------------< find_missing_constraints >-------------------------|
34 -- ----------------------------------------------------------------------------
35 --
36 -- Description:
37 -- When called, this procedure will compare the list of constraints in the
38 -- current database, with the list of constraints built up from the SQL
39 -- script, and will generate a report identifying:
40 -- - a constraint which exists in CASE, but not on the current database
41 -- - a constraint which exists in the DB, but not within the CASE
42 -- definitions
43 --
44 -- In Parameters:
45 -- p_db_list - A list of constraints in the current database.
46 -- p_case_list - A list of constraints defined by HRMS.
47 --
48 -- ----------------------------------------------------------------------------
49 PROCEDURE find_missing_constraints
50 (p_db_list IN hr_constraint_check.ConsList
51 ,p_case_list IN hr_constraint_check.ConsList);
52 --
53 -- ----------------------------------------------------------------------------
54 -- |--------------------------< add_case_constraint >-------------------------|
55 -- ----------------------------------------------------------------------------
56 --
57 -- Description:
58 -- When called, this procedure will add a given constraint to a given list.
59 --
60 -- In Parameters:
61 -- p_case_list - A list of constraints.
62 -- p_constraint - A constraint to add to the database.
63 -- p_table - A table, upon which the constraint is defined.
64 -- p_index - The current number of constraints in the list.
65 --
66 -- Out Parameters:
67 -- p_index - The updated number of constraints in the list.
68 --
69 -- ----------------------------------------------------------------------------
70 PROCEDURE add_case_constraint
71 (p_case_list IN OUT NOCOPY hr_constraint_check.ConsList
72 ,p_constraint IN varchar2
73 ,p_table IN varchar2
74 ,p_index IN OUT NOCOPY integer);
75 --
76 -- ----------------------------------------------------------------------------
77 -- |-------------------------< add_header >-----------------------------------|
78 -- ----------------------------------------------------------------------------
79 --
80 -- Adds a header to the results table, for the benefit of the final report.
81 --
82 -- ----------------------------------------------------------------------------
83 PROCEDURE add_header;
84 --
85 -- ----------------------------------------------------------------------------
86 -- |----------------------------< add_footer >--------------------------------|
87 -- ----------------------------------------------------------------------------
88 --
89 -- Adds a footer to the results table, for the benefit of the final report.
90 --
91 -- ----------------------------------------------------------------------------
92 PROCEDURE add_footer;
93 --
94 END hr_constraint_check;