1 PACKAGE hr_loc_del AUTHID CURRENT_USER AS
2 /* $Header: hrlocrhi.pkh 120.1 2005/07/18 06:20:20 bshukla noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |------------------------------< delete_dml >------------------------------|
6 -- ----------------------------------------------------------------------------
7 -- {Start Of Comments}
8 --
9 -- Description:
10 -- This procedure controls the actual dml delete logic. The functions of
11 -- this procedure are as follows:
12 -- 1) To set and unset the g_api_dml status as required (as we are about to
13 -- perform dml).
14 -- 2) To delete the specified row from the schema using the primary key in
15 -- the predicates.
16 -- 3) To trap any constraint violations that may have occurred.
17 -- 4) To raise any other errors.
18 --
19 -- Pre Conditions:
20 -- This is an internal private procedure which must be called from the del
21 -- procedure.
22 --
23 -- In Parameters:
24 -- A Pl/Sql record structre.
25 --
26 -- Post Success:
27 -- The specified row will be delete from the schema.
28 --
29 -- Post Failure:
30 -- On the delete dml failure it is important to note that we always reset the
31 -- g_api_dml status to false.
32 -- If a child integrity constraint violation is raised the
33 -- constraint_error procedure will be called.
34 -- If any other error is reported, the error will be raised after the
35 -- g_api_dml status is reset.
36 --
37 -- Developer Implementation Notes:
38 -- None.
39 --
40 -- Access Status:
41 -- Internal Table Handler Use Only.
42 --
43 -- {End Of Comments}
44 -- ----------------------------------------------------------------------------
45 PROCEDURE delete_dml(p_rec IN hr_loc_shd.g_rec_type);
46 --
47 -- ----------------------------------------------------------------------------
48 -- |------------------------------< pre_delete >------------------------------|
49 -- ----------------------------------------------------------------------------
50 -- {Start Of Comments}
51 --
52 -- Description:
53 -- This private procedure contains any processing which is required before
54 -- the delete dml.
55 --
56 -- Pre Conditions:
57 -- This is an internal procedure which is called from the del procedure.
58 --
59 -- In Parameters:
60 -- A Pl/Sql record structre.
61 --
62 -- Post Success:
63 -- Processing continues.
64 --
65 -- Post Failure:
66 -- If an error has occurred, an error message and exception will be raised
67 -- but not handled.
68 --
69 -- Developer Implementation Notes:
70 -- Any pre-processing required before the delete dml is issued should be
71 -- coded within this procedure. It is important to note that any 3rd party
72 -- maintenance should be reviewed before placing in this procedure.
73 --
74 -- Access Status:
75 -- Internal Table Handler Use Only.
76 --
77 -- {End Of Comments}
78 -- ----------------------------------------------------------------------------
79 PROCEDURE pre_delete(p_rec IN hr_loc_shd.g_rec_type);
80 --
81 -- ----------------------------------------------------------------------------
82 -- |-----------------------------< post_delete >------------------------------|
83 -- ----------------------------------------------------------------------------
84 -- {Start Of Comments}
85 --
86 -- Description:
87 -- This private procedure contains any processing which is required after the
88 -- delete dml.
89 --
90 -- Pre Conditions:
91 -- This is an internal procedure which is called from the del procedure.
92 --
93 -- In Parameters:
94 -- A Pl/Sql record structre.
95 --
96 -- Post Success:
97 -- Processing continues.
98 --
99 -- Post Failure:
100 -- If an error has occurred, an error message and exception will be raised
101 -- but not handled.
102 --
103 -- Developer Implementation Notes:
104 -- Any post-processing required after the delete dml is issued should be
105 -- coded within this procedure. It is important to note that any 3rd party
106 -- maintenance should be reviewed before placing in this procedure.
107 --
108 -- Access Status:
109 -- Internal table Handler Use Only.
110 --
111 -- {End Of Comments}
112 -- ----------------------------------------------------------------------------
113 PROCEDURE post_delete(p_rec IN hr_loc_shd.g_rec_type);
114 --
115 -- ----------------------------------------------------------------------------
116 -- |---------------------------------< del >----------------------------------|
117 -- ----------------------------------------------------------------------------
118 -- {Start Of Comments}
119 --
120 -- Description:
121 -- This procedure is the record interface for the delete process
122 -- for the specified entity. The role of this process is to delete the
123 -- row from the HR schema. This process is the main backbone of the del
124 -- business process. The processing of this procedure is as follows:
125 --
126 -- 1) The controlling validation process delete_validate is then executed
127 -- which will execute all private and public validation business rule
128 -- processes.
129 -- 2) The pre_delete process is then executed which enables any
130 -- logic to be processed before the delete dml process is executed.
131 -- 3) The delete_dml process will physical perform the delete dml for the
132 -- specified row.
133 -- 4) The post_delete process is then executed which enables any
134 -- logic to be processed after the delete dml process.
135 --
136 -- Pre Conditions:
137 -- The main parameters to the business process have to be in the record
138 -- format.
139 --
140 -- In Parameters:
141 --
142 -- Post Success:
143 -- The specified row will be fully validated and deleted for the specified
144 -- entity without being committed.
145 --
146 -- Post Failure:
147 -- If an error has occurred, an error message will be supplied with the work
148 -- rolled back.
149 --
150 -- Developer Implementation Notes:
151 -- None.
152 --
153 -- Access Status:
154 -- Internal Development Use Only.
155 --
156 -- {End Of Comments}
157 -- ----------------------------------------------------------------------------
158 PROCEDURE del
159 ( p_rec IN hr_loc_shd.g_rec_type);
160 --
161 -- ----------------------------------------------------------------------------
162 -- |---------------------------------< del >----------------------------------|
163 -- ----------------------------------------------------------------------------
164 -- {Start Of Comments}
165 --
166 -- Description:
167 -- This procedure is the attribute interface for the delete
168 -- process for the specified entity and is the outermost layer. The role
169 -- of this process is to validate and delete the specified row from the
170 -- HR schema. The processing of this procedure is as follows:
171 -- 1) The attributes are converted into a local record structure by
172 -- explicitly coding the attribute parameters into the g_rec_type
173 -- datatype.
174 -- 2) After the conversion has taken place, the corresponding record del
175 -- interface process is executed.
176 --
177 -- Pre Conditions:
178 --
179 -- In Parameters:
180 --
181 -- Post Success:
182 -- The specified row will be fully validated and deleted for the specified
183 -- entity without being committed
184 --
185 -- Post Failure:
186 -- If an error has occurred, an error message will be supplied with the work
187 -- rolled back.
188 --
189 -- Developer Implementation Notes:
190 -- The attrbute in parameters should be modified as to the business process
191 -- requirements.
192 --
193 -- Access Status:
194 -- Internal Development Use Only.
195 --
196 -- {End Of Comments}
197 -- ----------------------------------------------------------------------------
198 PROCEDURE del
199 ( p_location_id IN NUMBER,
200 p_object_version_number IN NUMBER);
201 --
202 --
203 END hr_loc_del;