DBA Data[Home] [Help]

PACKAGE: APPS.PER_CTR_SHD

Source


1 Package per_ctr_shd AUTHID CURRENT_USER as
2 /* $Header: pectrrhi.pkh 120.3 2011/11/15 11:31:44 sidsaxen ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (
10   contact_relationship_id           number(15),
11   business_group_id                 number(15),
12   person_id                         per_contact_relationships.person_id%TYPE,
13   contact_person_id                 per_contact_relationships.contact_person_id%TYPE,
14   contact_type                      varchar2(30),
15   comments                          clob,   -- pseudo column 	-- Bug#13362792
16   primary_contact_flag              varchar2(30),
17   request_id                        number(15),
18   program_application_id            number(15),
19   program_id                        number(15),
20   program_update_date               date,
21   date_start                        date,
22   start_life_reason_id              number(15),
23   date_end                          date,
24   end_life_reason_id                number(15),
25   rltd_per_rsds_w_dsgntr_flag       varchar2(30),
26   personal_flag                     varchar2(30),
27   sequence_number                   number(9),
28   cont_attribute_category           varchar2(30),
29   cont_attribute1                   varchar2(150),
30   cont_attribute2                   varchar2(150),
31   cont_attribute3                   varchar2(150),
32   cont_attribute4                   varchar2(150),
33   cont_attribute5                   varchar2(150),
34   cont_attribute6                   varchar2(150),
35   cont_attribute7                   varchar2(150),
36   cont_attribute8                   varchar2(150),
37   cont_attribute9                   varchar2(150),
38   cont_attribute10                  varchar2(150),
39   cont_attribute11                  varchar2(150),
40   cont_attribute12                  varchar2(150),
41   cont_attribute13                  varchar2(150),
42   cont_attribute14                  varchar2(150),
43   cont_attribute15                  varchar2(150),
44   cont_attribute16                  varchar2(150),
45   cont_attribute17                  varchar2(150),
46   cont_attribute18                  varchar2(150),
47   cont_attribute19                  varchar2(150),
48   cont_attribute20                  varchar2(150),
49   cont_information_category           varchar2(30),
50   cont_information1                   varchar2(150),
51   cont_information2                   varchar2(150),
52   cont_information3                   varchar2(150),
53   cont_information4                   varchar2(150),
54   cont_information5                   varchar2(150),
55   cont_information6                   varchar2(150),
56   cont_information7                   varchar2(150),
57   cont_information8                   varchar2(150),
58   cont_information9                   varchar2(150),
59   cont_information10                  varchar2(150),
60   cont_information11                  varchar2(150),
61   cont_information12                  varchar2(150),
62   cont_information13                  varchar2(150),
63   cont_information14                  varchar2(150),
64   cont_information15                  varchar2(150),
65   cont_information16                  varchar2(150),
66   cont_information17                  varchar2(150),
67   cont_information18                  varchar2(150),
68   cont_information19                  varchar2(150),
69   cont_information20                  varchar2(150),
70   third_party_pay_flag              varchar2(30),
71   bondholder_flag                   varchar2(30),
72   dependent_flag                    varchar2(30),
73   beneficiary_flag                  varchar2(30),
74   object_version_number             number(9)
75   );
76 --
77 -- ----------------------------------------------------------------------------
78 -- |           Global Definitions - Internal Development Use Only             |
79 -- ----------------------------------------------------------------------------
80 --
81 g_old_rec  g_rec_type;                            -- Global record definition
82 g_api_dml  boolean;                               -- Global api dml status
83 --
84 -- ----------------------------------------------------------------------------
85 -- |------------------------< return_api_dml_status >-------------------------|
86 -- ----------------------------------------------------------------------------
87 -- {Start Of Comments}
88 --
89 -- Description:
90 --   This function will return the current g_api_dml private global
91 --   boolean status.
92 --   The g_api_dml status determines if at the time of the function
93 --   being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
94 --   is being issued from within an api.
95 --   If the status is TRUE then a dml statement is being issued from
96 --   within this entity api.
97 --   This function is primarily to support database triggers which
98 --   need to maintain the object_version_number for non-supported
99 --   dml statements (i.e. dml statement issued outside of the api layer).
100 --
101 -- Pre Conditions:
102 --   None.
103 --
104 -- In Parameters:
105 --   None.
106 --
107 -- Post Success:
108 --   Processing continues.
109 --   If the function returns a TRUE value then, dml is being executed from
110 --   within this api.
111 --
112 -- Post Failure:
113 --   None.
114 --
115 -- Access Status:
116 --   Internal Table Handler Use Only.
117 --
118 -- {End Of Comments}
119 -- ----------------------------------------------------------------------------
120 Function return_api_dml_status Return Boolean;
121 --
122 -- ----------------------------------------------------------------------------
123 -- |---------------------------< constraint_error >---------------------------|
124 -- ----------------------------------------------------------------------------
125 -- {Start Of Comments}
126 --
127 -- Description:
128 --   This procedure is called when a constraint has been violated (i.e.
129 --   The exception hr_api.check_integrity_violated,
130 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
131 --   hr_api.unique_integrity_violated has been raised).
132 --   The exceptions can only be raised as follows:
133 --   1) A check constraint can only be violated during an INSERT or UPDATE
134 --      dml operation.
135 --   2) A parent integrity constraint can only be violated during an
136 --      INSERT or UPDATE dml operation.
137 --   3) A child integrity constraint can only be violated during an
138 --      DELETE dml operation.
139 --   4) A unique integrity constraint can only be violated during INSERT or
140 --      UPDATE dml operation.
141 --
142 -- Pre Conditions:
143 --   1) Either hr_api.check_integrity_violated,
144 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
145 --      hr_api.unique_integrity_violated has been raised with the subsequent
146 --      stripping of the constraint name from the generated error message
147 --      text.
148 --   2) Standalone validation test which corresponds with a constraint error.
149 --
150 -- In Parameter:
151 --   p_constraint_name is in upper format and is just the constraint name
152 --   (e.g. not prefixed by brackets, schema owner etc).
153 --
154 -- Post Success:
155 --   Development dependant.
156 --
157 -- Post Failure:
158 --   Developement dependant.
159 --
160 -- Developer Implementation Notes:
161 --   For each constraint being checked the hr system package failure message
162 --   has been generated as a template only. These system error messages should
163 --   be modified as required (i.e. change the system failure message to a user
164 --   friendly defined error message).
165 --
166 -- Access Status:
167 --   Internal Development Use Only.
168 --
169 -- {End Of Comments}
170 -- ----------------------------------------------------------------------------
171 Procedure constraint_error
172             (p_constraint_name in all_constraints.constraint_name%TYPE);
173 --
174 -- ----------------------------------------------------------------------------
175 -- |-----------------------------< api_updating >-----------------------------|
176 -- ----------------------------------------------------------------------------
177 -- {Start Of Comments}
178 --
179 -- Description:
180 --   This function is used to populate the g_old_rec record with the
181 --   current row from the database for the specified primary key
182 --   provided that the primary key exists and is valid and does not
183 --   already match the current g_old_rec. The function will always return
184 --   a TRUE value if the g_old_rec is populated with the current row.
185 --   A FALSE value will be returned if all of the primary key arguments
186 --   are null.
187 --
188 -- Pre Conditions:
189 --   None.
190 --
191 -- In Parameters:
192 --
193 -- Post Success:
194 --   A value of TRUE will be returned indiciating that the g_old_rec
195 --   is current.
196 --   A value of FALSE will be returned if all of the primary key arguments
197 --   have a null value (this indicates that the row has not be inserted into
198 --   the Schema), and therefore could never have a corresponding row.
199 --
200 -- Post Failure:
201 --   A failure can only occur under two circumstances:
202 --   1) The primary key is invalid (i.e. a row does not exist for the
203 --      specified primary key values).
204 --   2) If an object_version_number exists but is NOT the same as the current
205 --      g_old_rec value.
206 --
207 -- Developer Implementation Notes:
208 --   None.
209 --
210 -- Access Status:
211 --   Internal Development Use Only.
212 --
213 -- {End Of Comments}
214 -- ----------------------------------------------------------------------------
215 Function api_updating
216   (
217   p_contact_relationship_id            in number,
218   p_object_version_number              in number
219   )      Return Boolean;
220 --
221 -- ----------------------------------------------------------------------------
222 -- |---------------------------------< lck >----------------------------------|
223 -- ----------------------------------------------------------------------------
224 -- {Start Of Comments}
225 --
226 -- Description:
227 --   The Lck process has two main functions to perform. Firstly, the row to be
228 --   updated or deleted must be locked. The locking of the row will only be
229 --   successful if the row is not currently locked by another user.
230 --   Secondly, during the locking of the row, the row is selected into
231 --   the g_old_rec data structure which enables the current row values from the
232 --   server to be available to the api.
233 --
234 -- Pre Conditions:
235 --   When attempting to call the lock the object version number (if defined)
236 --   is mandatory.
237 --
238 -- In Parameters:
239 --   The arguments to the Lck process are the primary key(s) which uniquely
240 --   identify the row and the object version number of row.
241 --
242 -- Post Success:
243 --   On successful completion of the Lck process the row to be updated or
244 --   deleted will be locked and selected into the global data structure
245 --   g_old_rec.
246 --
247 -- Post Failure:
248 --   The Lck process can fail for three reasons:
249 --   1) When attempting to lock the row the row could already be locked by
250 --      another user. This will raise the HR_Api.Object_Locked exception.
251 --   2) The row which is required to be locked doesn't exist in the HR Schema.
252 --      This error is trapped and reported using the message name
253 --      'HR_7220_INVALID_PRIMARY_KEY'.
254 --   3) The row although existing in the HR Schema has a different object
255 --      version number than the object version number specified.
256 --      This error is trapped and reported using the message name
257 --      'HR_7155_OBJECT_INVALID'.
258 --
259 -- Developer Implementation Notes:
260 --   For each primary key and the object version number arguments add a
261 --   call to hr_api.mandatory_arg_error procedure to ensure that these
262 --   argument values are not null.
263 --
264 -- Access Status:
265 --   Internal Development Use Only.
266 --
267 -- {End Of Comments}
268 -- ----------------------------------------------------------------------------
269 Procedure lck
270   (
271   p_contact_relationship_id            in number,
272   p_object_version_number              in number
273   );
274 --
275 -- ----------------------------------------------------------------------------
276 -- |-----------------------------< convert_args >-----------------------------|
277 -- ----------------------------------------------------------------------------
278 -- {Start Of Comments}
279 --
280 -- Description:
281 --   This function is used to turn attribute parameters into the record
282 --   structure parameter g_rec_type.
283 --
284 -- Pre Conditions:
285 --   This is a private function and can only be called from the ins or upd
286 --   attribute processes.
287 --
288 -- In Parameters:
289 --
290 -- Post Success:
291 --   A returning record structure will be returned.
292 --
293 -- Post Failure:
294 --   No direct error handling is required within this function. Any possible
295 --   errors within this function will be a PL/SQL value error due to conversion
296 --   of datatypes or data lengths.
297 --
298 -- Developer Implementation Notes:
299 --   None.
300 --
301 -- Access Status:
302 --   Internal Table Handler Use Only.
303 --
304 -- {End Of Comments}
305 -- ----------------------------------------------------------------------------
306 Function convert_args
307 	(
308 	p_contact_relationship_id       in number,
309 	p_business_group_id             in number,
310 	p_person_id                     in number,
311 	p_contact_person_id             in number,
312 	p_contact_type                  in varchar2,
313 	p_comments                      in clob, 	-- Bug#13362792
314 	p_primary_contact_flag          in varchar2,
315 	p_request_id                    in number,
316 	p_program_application_id        in number,
317 	p_program_id                    in number,
318 	p_program_update_date           in date,
319         p_date_start                    in date,
320         p_start_life_reason_id          in number,
321         p_date_end                      in date,
322         p_end_life_reason_id            in number,
323         p_rltd_per_rsds_w_dsgntr_flag   in varchar2,
324         p_personal_flag                 in varchar2,
325 	p_sequence_number               in number,
326 	p_cont_attribute_category       in varchar2,
327 	p_cont_attribute1               in varchar2,
328 	p_cont_attribute2               in varchar2,
329 	p_cont_attribute3               in varchar2,
330 	p_cont_attribute4               in varchar2,
331 	p_cont_attribute5               in varchar2,
332 	p_cont_attribute6               in varchar2,
333 	p_cont_attribute7               in varchar2,
334 	p_cont_attribute8               in varchar2,
335 	p_cont_attribute9               in varchar2,
336 	p_cont_attribute10              in varchar2,
337 	p_cont_attribute11              in varchar2,
338 	p_cont_attribute12              in varchar2,
339 	p_cont_attribute13              in varchar2,
340 	p_cont_attribute14              in varchar2,
341 	p_cont_attribute15              in varchar2,
342 	p_cont_attribute16              in varchar2,
343 	p_cont_attribute17              in varchar2,
344 	p_cont_attribute18              in varchar2,
345 	p_cont_attribute19              in varchar2,
346 	p_cont_attribute20              in varchar2,
347 	p_cont_information_category       in varchar2,
348 	p_cont_information1               in varchar2,
349 	p_cont_information2               in varchar2,
350 	p_cont_information3               in varchar2,
351 	p_cont_information4               in varchar2,
352 	p_cont_information5               in varchar2,
353 	p_cont_information6               in varchar2,
354 	p_cont_information7               in varchar2,
355 	p_cont_information8               in varchar2,
356 	p_cont_information9               in varchar2,
357 	p_cont_information10              in varchar2,
358 	p_cont_information11              in varchar2,
359 	p_cont_information12              in varchar2,
360 	p_cont_information13              in varchar2,
361 	p_cont_information14              in varchar2,
362 	p_cont_information15              in varchar2,
363 	p_cont_information16              in varchar2,
364 	p_cont_information17              in varchar2,
365 	p_cont_information18              in varchar2,
366 	p_cont_information19              in varchar2,
367 	p_cont_information20              in varchar2,
368 	p_third_party_pay_flag          in varchar2,
369 	p_bondholder_flag               in varchar2,
370         p_dependent_flag                in varchar2,
371         p_beneficiary_flag              in varchar2,
372 	p_object_version_number         in number
373 	)
374 	Return g_rec_type;
375 --
376 end per_ctr_shd;