1 Package per_asg_del AUTHID CURRENT_USER as
2 /* $Header: peasgrhi.pkh 120.7 2011/03/08 09:20:38 sidsaxen ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |------------------------------< delete_dml >------------------------------|
6 -- ----------------------------------------------------------------------------
7 -- {Start Of Comments}
8 --
9 -- Description:
10 -- This procedure calls the dt_delete_dml control logic which handles
11 -- the actual datetrack dml.
12 --
13 -- Pre Conditions:
14 -- This is an internal private procedure which must be called from the del
15 -- procedure.
16 --
17 -- In Arguments:
18 -- A Pl/Sql record structre.
19 --
20 -- Post Success:
21 -- Processing contines.
22 --
23 -- Post Failure:
24 -- No specific error handling is required within this procedure.
25 --
26 -- Developer Implementation Notes:
27 -- None.
28 --
29 -- Access Status:
30 -- Internal Table Handler Use Only.
31 --
32 -- {End Of Comments}
33 -- ----------------------------------------------------------------------------
34 Procedure delete_dml
35 (p_rec in out nocopy per_asg_shd.g_rec_type,
36 p_effective_date in date,
37 p_datetrack_mode in varchar2,
38 p_validation_start_date in date,
39 p_validation_end_date in date);
40 --
41 --
42 -- ----------------------------------------------------------------------------
43 -- |---------------------------------< del >----------------------------------|
44 -- ----------------------------------------------------------------------------
45 -- {Start Of Comments}
46 --
47 -- Description:
48 -- This procedure is the record interface for the datetrack delete
49 -- business process for the specified entity. The role of this
50 -- process is to delete the dateracked row from the HR schema.
51 -- This process is the main backbone of the del business process. The
52 -- processing of this procedure is as follows:
53 -- 1) Ensure that the datetrack delete mode is valid.
54 -- 2) If the p_validate argument has been set to true then a savepoint is
55 -- issued.
56 -- 3) The controlling validation process delete_validate is then executed
57 -- which will execute all private and public validation business rule
58 -- processes.
59 -- 4) The pre_delete business process is then executed which enables any
60 -- logic to be processed before the delete dml process is executed.
61 -- 5) The delete_dml process will physical perform the delete dml for the
62 -- specified row.
63 -- 6) The post_delete business process is then executed which enables any
64 -- logic to be processed after the delete dml process.
65 -- 7) If the p_validate argument has been set to true an exception is raised
66 -- which is handled and processed by performing a rollback to the
67 -- savepoint which was issued at the beginning of the del process.
68 --
69 -- Pre Conditions:
70 -- The main arguments to the business process have to be in the record
71 -- format.
72 --
73 -- In Arguments:
74 -- p_effective_date
75 -- Specifies the date of the datetrack update operation.
76 -- p_datetrack_mode
77 -- Determines the datetrack update mode.
78 -- p_validate
79 -- Determines if the business process is to be validated. Setting this
80 -- boolean value to true will invoke the process to be validated. The
81 -- default is false. The validation is controlled by a savepoint and
82 -- rollback mechanism. The savepoint is issued at the beginning of the
83 -- business process and is rollbacked at the end of the business process
84 -- when all the processing has been completed. The rollback is controlled
85 -- by raising and handling the exception hr_api.validate_enabled. We use
86 -- the exception because, by raising the exception with the business
87 -- process, we can exit successfully without having any of the 'OUT'
88 -- arguments being set.
89 --
90 -- Post Success:
91 -- The specified row will be fully validated and deleted for the specified
92 -- entity without being committed. If the p_validate argument has been set
93 -- to true then all the work will be rolled back.
94 --
95 -- Post Failure:
96 -- If an error has occurred, an error message will be supplied with the work
97 -- rolled back.
98 --
99 -- Developer Implementation Notes:
100 -- None.
101 --
102 -- Access Status:
103 -- Internal Development Use Only.
104 --
105 -- {End Of Comments}
106 -- ----------------------------------------------------------------------------
107 Procedure del
108 ( p_rec in out nocopy per_asg_shd.g_rec_type,
109 p_effective_date in date,
110 p_effective_start_date OUT NOCOPY per_all_assignments_f.effective_start_date%TYPE,
111 p_effective_end_date OUT NOCOPY per_all_assignments_f.effective_end_date%TYPE,
112 -- p_validation_start_date out nocopy date,
113 -- p_validation_end_date out nocopy date,
114 p_datetrack_mode in varchar2,
115 p_validate in boolean default false,
116 p_org_now_no_manager_warning out nocopy boolean,
117 p_loc_change_tax_issues OUT nocopy boolean,
118 p_delete_asg_budgets OUT nocopy boolean,
119 p_element_salary_warning OUT nocopy boolean,
120 p_element_entries_warning OUT nocopy boolean,
121 p_spp_warning OUT nocopy boolean,
122 P_cost_warning OUT nocopy Boolean,
123 p_life_events_exists OUT nocopy Boolean,
124 p_cobra_coverage_elements OUT nocopy Boolean,
125 p_assgt_term_elements OUT nocopy Boolean
126 );
127 --
128 -- ----------------------------------------------------------------------------
129 -- |---------------------------------< del >----------------------------------|
130 -- ----------------------------------------------------------------------------
131 -- {Start Of Comments}
132 --
133 -- Description:
134 -- This procedure is the attribute interface for the delete business
135 -- process for the specified entity and is the outermost layer. The role
136 -- of this process is to validate and delete the specified row from the
137 -- HR schema. The processing of this procedure is as follows:
138 -- 1) The attributes are converted into a local record structure by
139 -- explicitly coding the attribute arguments into the g_rec_type
140 -- datatype.
141 -- 2) After the conversion has taken place, the corresponding record del
142 -- interface business process is executed.
143 --
144 -- Pre Conditions:
145 --
146 -- In Arguments:
147 -- p_effective_date
148 -- Specifies the date of the datetrack update operation.
149 -- p_datetrack_mode
150 -- Determines the datetrack update mode.
151 -- p_validate
152 -- Determines if the business process is to be validated. Setting this
153 -- Boolean value to true will invoke the process to be validated.
154 -- The default is false.
155 --
156 -- Post Success:
157 -- The specified row will be fully validated and deleted for the specified
158 -- entity without being committed (or rollbacked depending on the
159 -- p_validate status).
160 --
161 -- Post Failure:
162 -- If an error has occurred, an error message will be supplied with the work
163 -- rolled back.
164 --
165 -- Developer Implementation Notes:
166 -- The attrbute in arguments should be modified as to the business process
167 -- requirements.
168 --
169 -- Access Status:
170 -- Internal Development Use Only.
171 --
172 -- {End Of Comments}
173 -- ----------------------------------------------------------------------------
174 Procedure del
175 (p_validate IN boolean default false
176 ,p_assignment_id IN per_all_assignments_f.assignment_id%TYPE
177 ,p_effective_date IN DATE
178 ,p_datetrack_mode IN VARCHAR2
179 ,p_object_version_number IN OUT NOCOPY per_all_assignments_f.object_version_number%TYPE
180 ,p_effective_start_date OUT NOCOPY per_all_assignments_f.effective_start_date%TYPE
181 ,p_effective_end_date OUT NOCOPY per_all_assignments_f.effective_end_date%TYPE
182 ,p_loc_change_tax_issues OUT NOCOPY boolean
183 ,p_delete_asg_budgets OUT NOCOPY boolean
184 ,p_org_now_no_manager_warning OUT NOCOPY boolean
185 ,p_element_salary_warning OUT NOCOPY boolean
186 ,p_element_entries_warning OUT NOCOPY boolean
187 ,p_spp_warning OUT NOCOPY boolean
188 ,P_cost_warning OUT NOCOPY boolean
189 ,p_life_events_exists OUT NOCOPY boolean
190 ,p_cobra_coverage_elements OUT NOCOPY boolean
191 ,p_assgt_term_elements OUT NOCOPY boolean );
192 --
193 -- ----------------------------------------------------------------------------
194 -- |---------------------------------< del >----------------------------------|
195 -- ----------------------------------------------------------------------------
196 -- {Start Of Comments}
197 --
198 -- Description:
199 -- This procedure is the attribute interface for the delete business
200 -- process for the specified entity and is the outermost layer. The role
201 -- of this process is to validate and delete the specified row from the
202 -- HR schema. The processing of this procedure is as follows:
203 -- 1) The attributes are converted into a local record structure by
204 -- explicitly coding the attribute arguments into the g_rec_type
205 -- datatype.
206 -- 2) After the conversion has taken place, the corresponding record del
207 -- interface business process is executed.
208 --
209 -- Pre Conditions:
210 --
211 -- In Arguments:
212 -- p_effective_date
213 -- Specifies the date of the datetrack update operation.
214 -- p_datetrack_mode
215 -- Determines the datetrack update mode.
216 -- p_validate
217 -- Determines if the business process is to be validated. Setting this
218 -- Boolean value to true will invoke the process to be validated.
219 -- The default is false.
220 --
221 -- Post Success:
222 -- The specified row will be fully validated and deleted for the specified
223 -- entity without being committed (or rollbacked depending on the
224 -- p_validate status).
225 --
226 -- Post Failure:
227 -- If an error has occurred, an error message will be supplied with the work
228 -- rolled back.
229 --
230 -- Developer Implementation Notes:
231 -- The attrbute in arguments should be modified as to the business process
232 -- requirements.
233 --
234 -- Access Status:
235 -- Internal Development Use Only.
236 --
237 -- {End Of Comments}
238 -- ----------------------------------------------------------------------------
239 Procedure del
240 (
241 p_assignment_id in number,
242 p_effective_start_date out nocopy date,
243 p_effective_end_date out nocopy date,
244 p_business_group_id out nocopy number,
245 p_object_version_number in out nocopy number,
246 p_effective_date in date,
247 p_validation_start_date out nocopy date,
248 p_validation_end_date out nocopy date,
252 );
249 p_datetrack_mode in varchar2,
250 p_validate in boolean default false,
251 p_org_now_no_manager_warning out nocopy boolean
253 --
254 end per_asg_del;