DBA Data[Home] [Help]

PACKAGE: APPS.SSP_MAT_SHD

Source


1 Package ssp_mat_shd as
2 /* $Header: spmatrhi.pkh 120.1 2006/08/23 09:33:36 kthampan noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (
10   maternity_id                      number(9),
11   due_date                          date,
12   person_id                         number(10),
13   start_date_maternity_allowance    date,
14   notification_of_birth_date        date,
15   unfit_for_scheduled_return        varchar2(30),
16   stated_return_date                date,
17   intend_to_return_flag             varchar2(30),
18   start_date_with_new_employer      date,
19   smp_must_be_paid_by_date          date,
20   pay_smp_as_lump_sum               varchar2(30),
21   live_birth_flag                   varchar2(30),
22   actual_birth_date                 date,
23   mpp_start_date                    date,
24   object_version_number             number(9),
25   attribute_category                varchar2(30),
26   attribute1                        varchar2(150),
27   attribute2                        varchar2(150),
28   attribute3                        varchar2(150),
29   attribute4                        varchar2(150),
30   attribute5                        varchar2(150),
31   attribute6                        varchar2(150),
32   attribute7                        varchar2(150),
33   attribute8                        varchar2(150),
34   attribute9                        varchar2(150),
35   attribute10                       varchar2(150),
36   attribute11                       varchar2(150),
37   attribute12                       varchar2(150),
38   attribute13                       varchar2(150),
39   attribute14                       varchar2(150),
40   attribute15                       varchar2(150),
41   attribute16                       varchar2(150),
42   attribute17                       varchar2(150),
43   attribute18                       varchar2(150),
44   attribute19                       varchar2(150),
45   attribute20                       varchar2(150),
46   LEAVE_TYPE                        VARCHAR2(2),
47   MATCHING_DATE                     DATE,
48   PLACEMENT_DATE                    DATE,
49   DISRUPTED_PLACEMENT_DATE          DATE,
50   mat_information_category          varchar2(30),
51   mat_information1                  varchar2(150),
52   mat_information2                  varchar2(150),
53   mat_information3                  varchar2(150),
54   mat_information4                  varchar2(150),
55   mat_information5                  varchar2(150),
56   mat_information6                  varchar2(150),
57   mat_information7                  varchar2(150),
58   mat_information8                  varchar2(150),
59   mat_information9                  varchar2(150),
60   mat_information10                 varchar2(150),
61   mat_information11                 varchar2(150),
62   mat_information12                 varchar2(150),
63   mat_information13                 varchar2(150),
64   mat_information14                 varchar2(150),
65   mat_information15                 varchar2(150),
66   mat_information16                 varchar2(150),
67   mat_information17                 varchar2(150),
68   mat_information18                 varchar2(150),
69   mat_information19                 varchar2(150),
70   mat_information20                 varchar2(150),
71   mat_information21                 varchar2(150),
72   mat_information22                 varchar2(150),
73   mat_information23                 varchar2(150),
74   mat_information24                 varchar2(150),
75   mat_information25                 varchar2(150),
76   mat_information26                 varchar2(150),
77   mat_information27                 varchar2(150),
78   mat_information28                 varchar2(150),
79   mat_information29                 varchar2(150),
80   mat_information30                 varchar2(150)
81   );
82 --
83 -- ----------------------------------------------------------------------------
84 -- |           Global Definitions - Internal Development Use Only             |
85 -- ----------------------------------------------------------------------------
86 --
87 g_old_rec  g_rec_type;                            -- Global record definition
88 g_api_dml  boolean;                               -- Global api dml status
89 --
90 -- ----------------------------------------------------------------------------
91 -- |------------------------< return_api_dml_status >-------------------------|
92 -- ----------------------------------------------------------------------------
93 -- {Start Of Comments}
94 --
95 -- Description:
96 --   This function will return the current g_api_dml private global
97 --   boolean status.
98 --   The g_api_dml status determines if at the time of the function
99 --   being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
100 --   is being issued from within an api.
101 --   If the status is TRUE then a dml statement is being issued from
102 --   within this entity api.
103 --   This function is primarily to support database triggers which
104 --   need to maintain the object_version_number for non-supported
105 --   dml statements (i.e. dml statement issued outside of the api layer).
106 --
107 -- Pre Conditions:
108 --   None.
109 --
110 -- In Parameters:
111 --   None.
112 --
113 -- Post Success:
114 --   Processing continues.
115 --   If the function returns a TRUE value then, dml is being executed from
116 --   within this api.
117 --
118 -- Post Failure:
119 --   None.
120 --
121 -- Access Status:
122 --   Internal Table Handler Use Only.
123 --
124 -- {End Of Comments}
125 -- ----------------------------------------------------------------------------
126 Function return_api_dml_status Return Boolean;
127 --
128 -- ----------------------------------------------------------------------------
129 -- |---------------------------< constraint_error >---------------------------|
130 -- ----------------------------------------------------------------------------
131 -- {Start Of Comments}
132 --
133 -- Description:
134 --   This procedure is called when a constraint has been violated (i.e.
135 --   The exception hr_api.check_integrity_violated,
136 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
137 --   hr_api.unique_integrity_violated has been raised).
138 --   The exceptions can only be raised as follows:
139 --   1) A check constraint can only be violated during an INSERT or UPDATE
140 --      dml operation.
141 --   2) A parent integrity constraint can only be violated during an
142 --      INSERT or UPDATE dml operation.
143 --   3) A child integrity constraint can only be violated during an
144 --      DELETE dml operation.
145 --   4) A unique integrity constraint can only be violated during INSERT or
146 --      UPDATE dml operation.
147 --
148 -- Pre Conditions:
149 --   1) Either hr_api.check_integrity_violated,
150 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
151 --      hr_api.unique_integrity_violated has been raised with the subsequent
152 --      stripping of the constraint name from the generated error message
153 --      text.
154 --   2) Standalone validation test which corresponds with a constraint error.
155 --
156 -- In Parameter:
157 --   p_constraint_name is in upper format and is just the constraint name
158 --   (e.g. not prefixed by brackets, schema owner etc).
159 --
160 -- Post Success:
161 --   Development dependant.
162 --
163 -- Post Failure:
164 --   Developement dependant.
165 --
166 -- Developer Implementation Notes:
167 --   For each constraint being checked the hr system package failure message
168 --   has been generated as a template only. These system error messages should
169 --   be modified as required (i.e. change the system failure message to a user
170 --   friendly defined error message).
171 --
172 -- Access Status:
173 --   Internal Development Use Only.
174 --
175 -- {End Of Comments}
176 -- ----------------------------------------------------------------------------
177 Procedure constraint_error
178             (p_constraint_name in all_constraints.constraint_name%TYPE);
179 --
180 -- ----------------------------------------------------------------------------
181 -- |-----------------------------< api_updating >-----------------------------|
182 -- ----------------------------------------------------------------------------
183 -- {Start Of Comments}
184 --
185 -- Description:
186 --   This function is used to populate the g_old_rec record with the
187 --   current row from the database for the specified primary key
188 --   provided that the primary key exists and is valid and does not
189 --   already match the current g_old_rec. The function will always return
190 --   a TRUE value if the g_old_rec is populated with the current row.
191 --   A FALSE value will be returned if all of the primary key arguments
192 --   are null.
193 --
194 -- Pre Conditions:
195 --   None.
196 --
197 -- In Parameters:
198 --
199 -- Post Success:
200 --   A value of TRUE will be returned indiciating that the g_old_rec
201 --   is current.
202 --   A value of FALSE will be returned if all of the primary key arguments
203 --   have a null value (this indicates that the row has not be inserted into
204 --   the Schema), and therefore could never have a corresponding row.
205 --
206 -- Post Failure:
207 --   A failure can only occur under two circumstances:
208 --   1) The primary key is invalid (i.e. a row does not exist for the
209 --      specified primary key values).
210 --   2) If an object_version_number exists but is NOT the same as the current
211 --      g_old_rec value.
212 --
213 -- Developer Implementation Notes:
214 --   None.
215 --
216 -- Access Status:
217 --   Internal Development Use Only.
218 --
219 -- {End Of Comments}
220 -- ----------------------------------------------------------------------------
221 Function api_updating
222   (
223   p_maternity_id                       in number,
224   p_object_version_number              in number
225   )      Return Boolean;
226 --
227 -- ----------------------------------------------------------------------------
228 -- |---------------------------------< lck >----------------------------------|
229 -- ----------------------------------------------------------------------------
230 -- {Start Of Comments}
231 --
232 -- Description:
233 --   The Lck process has two main functions to perform. Firstly, the row to be
234 --   updated or deleted must be locked. The locking of the row will only be
235 --   successful if the row is not currently locked by another user.
236 --   Secondly, during the locking of the row, the row is selected into
237 --   the g_old_rec data structure which enables the current row values from the
238 --   server to be available to the api.
239 --
240 -- Pre Conditions:
241 --   When attempting to call the lock the object version number (if defined)
242 --   is mandatory.
243 --
244 -- In Parameters:
245 --   The arguments to the Lck process are the primary key(s) which uniquely
246 --   identify the row and the object version number of row.
247 --
248 -- Post Success:
249 --   On successful completion of the Lck process the row to be updated or
250 --   deleted will be locked and selected into the global data structure
251 --   g_old_rec.
252 --
253 -- Post Failure:
254 --   The Lck process can fail for three reasons:
255 --   1) When attempting to lock the row the row could already be locked by
256 --      another user. This will raise the HR_Api.Object_Locked exception.
257 --   2) The row which is required to be locked doesn't exist in the HR Schema.
258 --      This error is trapped and reported using the message name
259 --      'HR_7220_INVALID_PRIMARY_KEY'.
260 --   3) The row although existing in the HR Schema has a different object
261 --      version number than the object version number specified.
262 --      This error is trapped and reported using the message name
263 --      'HR_7155_OBJECT_INVALID'.
264 --
265 -- Developer Implementation Notes:
266 --   For each primary key and the object version number arguments add a
267 --   call to hr_api.mandatory_arg_error procedure to ensure that these
268 --   argument values are not null.
269 --
270 -- Access Status:
271 --   Internal Development Use Only.
272 --
273 -- {End Of Comments}
274 -- ----------------------------------------------------------------------------
275 Procedure lck
276   (
277   p_maternity_id                       in number,
278   p_object_version_number              in number
279   );
280 --
281 -- ----------------------------------------------------------------------------
282 -- |-----------------------------< convert_args >-----------------------------|
283 -- ----------------------------------------------------------------------------
284 -- {Start Of Comments}
285 --
286 -- Description:
287 --   This function is used to turn attribute parameters into the record
288 --   structure parameter g_rec_type.
289 --
290 -- Pre Conditions:
291 --   This is a private function and can only be called from the ins or upd
292 --   attribute processes.
293 --
294 -- In Parameters:
295 --
296 -- Post Success:
297 --   A returning record structure will be returned.
298 --
299 -- Post Failure:
300 --   No direct error handling is required within this function. Any possible
301 --   errors within this function will be a PL/SQL value error due to conversion
302 --   of datatypes or data lengths.
303 --
304 -- Developer Implementation Notes:
305 --   None.
306 --
307 -- Access Status:
308 --   Internal Table Handler Use Only.
309 --
310 -- {End Of Comments}
311 -- ----------------------------------------------------------------------------
312 Function convert_args
313 	(
314 	p_maternity_id                  in number,
315 	p_due_date                      in date,
316 	p_person_id                     in number,
317 	p_start_date_SMA  in date,
318 	p_notification_of_birth_date    in date,
319 	p_unfit_for_scheduled_return    in varchar2,
320 	p_stated_return_date            in date,
321 	p_intend_to_return_flag         in varchar2,
322 	p_start_date_with_new_employer  in date,
323 	p_smp_must_be_paid_by_date      in date,
324 	p_pay_smp_as_lump_sum           in varchar2,
325 	p_live_birth_flag               in varchar2,
326 	p_actual_birth_date             in date,
327 	p_mpp_start_date                in date,
328 	p_object_version_number         in number,
329 	p_attribute_category            in varchar2,
330 	p_attribute1                    in varchar2,
331 	p_attribute2                    in varchar2,
332 	p_attribute3                    in varchar2,
333 	p_attribute4                    in varchar2,
334 	p_attribute5                    in varchar2,
335 	p_attribute6                    in varchar2,
336 	p_attribute7                    in varchar2,
337 	p_attribute8                    in varchar2,
338 	p_attribute9                    in varchar2,
339 	p_attribute10                   in varchar2,
340 	p_attribute11                   in varchar2,
341 	p_attribute12                   in varchar2,
342 	p_attribute13                   in varchar2,
343 	p_attribute14                   in varchar2,
344 	p_attribute15                   in varchar2,
345 	p_attribute16                   in varchar2,
346 	p_attribute17                   in varchar2,
347 	p_attribute18                   in varchar2,
348 	p_attribute19                   in varchar2,
349 	p_attribute20                   in varchar2,
350         p_LEAVE_TYPE                    in VARCHAR2 default 'MA',
351         p_MATCHING_DATE                 in DATE default null,
352         p_PLACEMENT_DATE                in DATE default null,
353         p_DISRUPTED_PLACEMENT_DATE      in DATE default null,
354         p_mat_information_category      in varchar2,
355         p_mat_information1              in varchar2,
356         p_mat_information2              in varchar2,
357         p_mat_information3              in varchar2,
358         p_mat_information4              in varchar2,
359         p_mat_information5              in varchar2,
363         p_mat_information9              in varchar2,
360         p_mat_information6              in varchar2,
361         p_mat_information7              in varchar2,
362         p_mat_information8              in varchar2,
364         p_mat_information10             in varchar2,
365         p_mat_information11             in varchar2,
366         p_mat_information12             in varchar2,
367         p_mat_information13             in varchar2,
368         p_mat_information14             in varchar2,
369         p_mat_information15             in varchar2,
370         p_mat_information16             in varchar2,
371         p_mat_information17             in varchar2,
372         p_mat_information18             in varchar2,
373         p_mat_information19             in varchar2,
374         p_mat_information20             in varchar2,
375         p_mat_information21             in varchar2,
376         p_mat_information22             in varchar2,
377         p_mat_information23             in varchar2,
378         p_mat_information24             in varchar2,
379         p_mat_information25             in varchar2,
380         p_mat_information26             in varchar2,
381         p_mat_information27             in varchar2,
382         p_mat_information28             in varchar2,
383         p_mat_information29             in varchar2,
384         p_mat_information30             in varchar2
385 	)
386 	Return g_rec_type;
387 --
388 end ssp_mat_shd;