1 PACKAGE AMW_DELETE_OBJECT_PVT AS
2 /* $Header: amwvobjs.pls 120.0.12000000.2 2007/03/09 10:03:08 psomanat ship $ */
3
4 -- ===============================================================
5 -- Package name
6 -- AMW_DELETE_OBJECT_PVT
7 -- Purpose
8 -- for handling object actions
9 --
10 -- History
11 -- 12/06/2004 tsho Creates
12 -- ===============================================================
13
14 TYPE G_NUMBER_TABLE IS TABLE OF NUMBER;
15
16 TYPE G_VARCHAR_VARRAY IS VARRAY(2) OF VARCHAR2(1000);
17 TYPE G_VARRAY_TABLE IS TABLE OF G_VARCHAR_VARRAY;
18
19
20 -- ===============================================================
21 -- Procedure name
22 -- Delete_Objects
23 -- Purpose
24 -- Delete specified Objs if it's allowed (ie, if it's not in use by others)
25 -- Params
26 -- p_object_type_and_id1 := the obj needs to be checked (format: OBJECT_TYPE#OBJECT_ID)
27 -- p_object_type_and_id2 := the obj needs to be checked (format: OBJECT_TYPE#OBJECT_ID)
28 -- p_object_type_and_id3 := the obj needs to be checked (format: OBJECT_TYPE#OBJECT_ID)
29 -- p_object_type_and_id4 := the obj needs to be checked (format: OBJECT_TYPE#OBJECT_ID)
30 -- Notes
31 -- format for Risk: RISK#113
32 -- format for Control: CTRL#113
33 -- format for Audit Procedure: AP#113
34 -- ===============================================================
35 PROCEDURE Delete_Objects(
36 errbuf OUT NOCOPY VARCHAR2,
37 retcode OUT NOCOPY VARCHAR2,
38 p_object_type_and_id1 IN VARCHAR2 := NULL,
39 p_object_type_and_id2 IN VARCHAR2 := NULL,
40 p_object_type_and_id3 IN VARCHAR2 := NULL,
41 p_object_type_and_id4 IN VARCHAR2 := NULL
42 );
43
44
45 -- ===============================================================
46 -- Procedure name
47 -- Delete_Object
48 -- Purpose
49 -- Delete specified Obj if it's allowed (ie, if it's not in use by others)
50 -- Params
51 -- p_object_type := the obj needs to be checked,
52 -- p_object_id := the id of specified obj
53 -- ===============================================================
54 PROCEDURE Delete_Object(
55 p_object_type IN VARCHAR2,
56 p_object_id IN NUMBER
57 );
58
59
60 -- ===============================================================
61 -- Procedure name
62 -- Delete_Risk
63 -- Purpose
64 -- Delete specified risk
65 -- Params
66 -- p_risk_id
67 -- ===============================================================
68 PROCEDURE Delete_Risk(
69 p_risk_id IN NUMBER
70 );
71
72 -- ===============================================================
73 -- Procedure name
74 -- Delete_Ctrl
75 -- Purpose
76 -- Delete specified control
77 -- Params
78 -- p_ctrl_id
79 -- ===============================================================
80 PROCEDURE Delete_Ctrl(
81 p_ctrl_id IN NUMBER
82 );
83
84
85 -- ===============================================================
86 -- Procedure name
87 -- Delete_Ap
88 -- Purpose
89 -- Delete specified audit procedure
90 -- Params
91 -- p_ap_id
92 -- ===============================================================
93 PROCEDURE Delete_Ap(
94 p_ap_id IN NUMBER
95 );
96
97
98
99
100 -- ===============================================================
101 -- Function name
102 -- Is_Record_Exist
103 -- Purpose
104 -- check if any records found for pass-in query
105 -- return BOOLEAN TRUE if at least one record is found;
106 -- return BOOLEAN FALSE otherwise.
107 -- Params
108 -- p_dynamic_sql := the sql needs to be checked,
109 -- can have variables defined(ie. :1 :2 ...etc)
110 -- p_bind_value := default is Null.
111 -- this param is required if variables are defined in p_dynamic_sql param.
112 --
113 -- ===============================================================
114 FUNCTION Is_Record_Exist(
115 p_dynamic_sql IN G_VARCHAR_VARRAY,
116 p_bind_value IN NUMBER := NULL
117 )
118 RETURN BOOLEAN;
119
120
121 -- ===============================================================
122 -- Function name
123 -- Is_Object_In_Use
124 -- Purpose
125 -- check if any records found for pass-in query check list
126 -- return 'Y' if at least one record is found;
127 -- return 'N' otherwise.
128 -- Params
129 -- p_dynamic_sql := the sql needs to be checked,
130 -- can have variables defined(only allow :1 )
131 -- p_bind_value := default is Null.
132 -- this param is required if variables are defined in p_dynamic_sql param.
133 -- Notes
134 -- can only bind same value to the variables (:1) defined in p_dynamic_sql
135 -- ===============================================================
136 FUNCTION Is_Object_In_Use(
137 p_dynamic_sql_list IN G_VARRAY_TABLE,
138 p_bind_value IN NUMBER := NULL
139 )
140 RETURN VARCHAR;
141
142
143 -- ----------------------------------------------------------------------
144 END AMW_DELETE_OBJECT_PVT;