1 Package hr_phone_api as
2 /* $Header: pephnapi.pkh 120.1.12010000.1 2008/07/28 05:16:53 appldev ship $ */
3 /*#
4 * This package contains phone APIs.
5 * @rep:scope public
6 * @rep:product per
7 * @rep:displayname Phone
8 */
9 --
10 -- ----------------------------------------------------------------------------
11 -- |-------------------------------< create_phone >---------------------------|
12 -- ----------------------------------------------------------------------------
13 --
14 -- {Start Of Comments}
15 /*#
16 * This API creates a phone record.
17 *
18 *
19 * <p><b>Licensing</b><br>
20 * This API is licensed for use with Human Resources and HR Foundation.
21 *
22 * <p><b>Prerequisites</b><br>
23 * A person must exist before a phone can be created for them.
24 *
25 * <p><b>Restricted Usage Notes</b><br>
26 * Each phone is linked to a parent table; currently the only supported table
27 * is PER_PEOPLE_F. By HR/TCA merge, party_id is supported. This doesn't
28 * require parent_id and parent_table.
29 *
30 * <p><b>Post Success</b><br>
31 * The phone record is created.
32 *
33 * <p><b>Post Failure</b><br>
34 * Phone record is not created and an error is raised.
35 * @param p_date_from Date phone number becomes effective.
36 * @param p_date_to Date phone number is no longer effective.
37 * @param p_phone_type Type of phone. Valid values are defines by PHONE_TYPE
38 * lookup type.
39 * @param p_phone_number Phone number
40 * @param p_parent_id Identification number of the parent row that this phone
41 * number relates to. Currently the parent_id must relate to a valid person_id
42 * on the PER_PEOPLE_F table.
43 * @param p_parent_table Name of the parent table. Currently, only
44 * PER_ALL_PEOPLE_F table is supported.
45 * @param p_attribute_category This context value determines which flexfield
46 * structure to use with the descriptive flexfield segments.
47 * @param p_attribute1 Descriptive flexfield segment.
48 * @param p_attribute2 Descriptive flexfield segment.
49 * @param p_attribute3 Descriptive flexfield segment.
50 * @param p_attribute4 Descriptive flexfield segment.
51 * @param p_attribute5 Descriptive flexfield segment.
52 * @param p_attribute6 Descriptive flexfield segment.
53 * @param p_attribute7 Descriptive flexfield segment.
54 * @param p_attribute8 Descriptive flexfield segment.
55 * @param p_attribute9 Descriptive flexfield segment.
56 * @param p_attribute10 Descriptive flexfield segment.
57 * @param p_attribute11 Descriptive flexfield segment.
58 * @param p_attribute12 Descriptive flexfield segment.
59 * @param p_attribute13 Descriptive flexfield segment.
60 * @param p_attribute14 Descriptive flexfield segment.
61 * @param p_attribute15 Descriptive flexfield segment.
62 * @param p_attribute16 Descriptive flexfield segment.
63 * @param p_attribute17 Descriptive flexfield segment.
64 * @param p_attribute18 Descriptive flexfield segment.
65 * @param p_attribute19 Descriptive flexfield segment.
66 * @param p_attribute20 Descriptive flexfield segment.
67 * @param p_attribute21 Descriptive flexfield segment.
68 * @param p_attribute22 Descriptive flexfield segment.
69 * @param p_attribute23 Descriptive flexfield segment.
70 * @param p_attribute24 Descriptive flexfield segment.
71 * @param p_attribute25 Descriptive flexfield segment.
72 * @param p_attribute26 Descriptive flexfield segment.
73 * @param p_attribute27 Descriptive flexfield segment.
74 * @param p_attribute28 Descriptive flexfield segment.
75 * @param p_attribute29 Descriptive flexfield segment.
76 * @param p_attribute30 Descriptive flexfield segment.
77 * @param p_validate If true, then validation alone will be performed and the
78 * database will remain unchanged. If false and all validation checks pass,
79 * then the database will be modified.
80 * @param p_effective_date Reference date for validating lookup values are
81 * applicable during the start to end active date range. This date does not
82 * determine when the changes take effect.
83 * @param p_party_id Identification of the party record that this phone number
84 * relates to.
85 * @param p_validity Valid times phone numbers can be used. Valid values are
86 * defined by IRC_CONTACT_TIMES lookup type.
87 * @param p_object_version_number If p_validate is false, then set to the
88 * version number of the created person. If p_validate is true, then the value
89 * will be null.
90 * @param p_phone_id If p_validate is false, then this uniquely identifies the
91 * phone created. If p_validate is true, then set to null.
92 * @rep:displayname Create Phone
93 * @rep:category BUSINESS_ENTITY PER_PHONE
94 * @rep:category MISC_EXTENSIONS HR_DATAPUMP
95 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
96 * @rep:scope public
97 * @rep:lifecycle active
98 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
99 */
100 --
101 -- {End Of Comments}
102 --
103 procedure create_phone
104 (p_date_from in date,
105 p_date_to in date default null,
106 p_phone_type in varchar2,
107 p_phone_number in varchar2,
108 p_parent_id in number default null,
109 p_parent_table in varchar2 default null,
110 p_attribute_category in varchar2 default null,
111 p_attribute1 in varchar2 default null,
112 p_attribute2 in varchar2 default null,
113 p_attribute3 in varchar2 default null,
114 p_attribute4 in varchar2 default null,
115 p_attribute5 in varchar2 default null,
116 p_attribute6 in varchar2 default null,
117 p_attribute7 in varchar2 default null,
118 p_attribute8 in varchar2 default null,
119 p_attribute9 in varchar2 default null,
120 p_attribute10 in varchar2 default null,
121 p_attribute11 in varchar2 default null,
122 p_attribute12 in varchar2 default null,
123 p_attribute13 in varchar2 default null,
124 p_attribute14 in varchar2 default null,
125 p_attribute15 in varchar2 default null,
126 p_attribute16 in varchar2 default null,
127 p_attribute17 in varchar2 default null,
128 p_attribute18 in varchar2 default null,
129 p_attribute19 in varchar2 default null,
130 p_attribute20 in varchar2 default null,
131 p_attribute21 in varchar2 default null,
132 p_attribute22 in varchar2 default null,
133 p_attribute23 in varchar2 default null,
134 p_attribute24 in varchar2 default null,
135 p_attribute25 in varchar2 default null,
136 p_attribute26 in varchar2 default null,
137 p_attribute27 in varchar2 default null,
138 p_attribute28 in varchar2 default null,
139 p_attribute29 in varchar2 default null,
140 p_attribute30 in varchar2 default null,
141 p_validate in boolean default false,
142 p_effective_date in date,
143 p_party_id in number default null,
144 p_validity in varchar2 default null,
145 p_object_version_number out nocopy number,
146 p_phone_id out nocopy number
147 ); -- HR/TCA merge
148 --
149 -- ----------------------------------------------------------------------------
150 -- |-------------------------------< update_phone >---------------------------|
151 -- ----------------------------------------------------------------------------
152 --
153 -- {Start Of Comments}
154 /*#
155 * This API updates the phone record for a person.
156 *
157 *
158 * <p><b>Licensing</b><br>
159 * This API is licensed for use with Human Resources and HR Foundation.
160 *
161 * <p><b>Prerequisites</b><br>
162 * The phone record to be updated must exist.
163 *
164 * <p><b>Post Success</b><br>
165 * Phone record is updated.
166 *
167 * <p><b>Post Failure</b><br>
168 * Phone record is not updated and an error is raised.
169 * @param p_phone_id Identifies the phone record to be updated.
170 * @param p_date_from Date from which the phone number is valid.
171 * @param p_date_to Date when the phone number is no longer valid.
172 * @param p_phone_type Type of phone. Valid values are defines by PHONE_TYPE
173 * lookup type.
174 * @param p_phone_number Phone number
175 * @param p_attribute_category This context value determines which flexfield
176 * structure to use with the descriptive flexfield segments.
177 * @param p_attribute1 Descriptive flexfield segment.
178 * @param p_attribute2 Descriptive flexfield segment.
179 * @param p_attribute3 Descriptive flexfield segment.
180 * @param p_attribute4 Descriptive flexfield segment.
181 * @param p_attribute5 Descriptive flexfield segment.
182 * @param p_attribute6 Descriptive flexfield segment.
183 * @param p_attribute7 Descriptive flexfield segment.
184 * @param p_attribute8 Descriptive flexfield segment.
185 * @param p_attribute9 Descriptive flexfield segment.
186 * @param p_attribute10 Descriptive flexfield segment.
187 * @param p_attribute11 Descriptive flexfield segment.
188 * @param p_attribute12 Descriptive flexfield segment.
189 * @param p_attribute13 Descriptive flexfield segment.
190 * @param p_attribute14 Descriptive flexfield segment.
191 * @param p_attribute15 Descriptive flexfield segment.
192 * @param p_attribute16 Descriptive flexfield segment.
193 * @param p_attribute17 Descriptive flexfield segment.
194 * @param p_attribute18 Descriptive flexfield segment.
195 * @param p_attribute19 Descriptive flexfield segment.
196 * @param p_attribute20 Descriptive flexfield segment.
197 * @param p_attribute21 Descriptive flexfield segment.
198 * @param p_attribute22 Descriptive flexfield segment.
199 * @param p_attribute23 Descriptive flexfield segment.
200 * @param p_attribute24 Descriptive flexfield segment.
201 * @param p_attribute25 Descriptive flexfield segment.
202 * @param p_attribute26 Descriptive flexfield segment.
203 * @param p_attribute27 Descriptive flexfield segment.
204 * @param p_attribute28 Descriptive flexfield segment.
205 * @param p_attribute29 Descriptive flexfield segment.
206 * @param p_attribute30 Descriptive flexfield segment.
207 * @param p_object_version_number Pass in the current version number of the
208 * phone record to be updated. When the API completes if p_validate is false,
209 * will be set to the new version number of the updated phone record. If
210 * p_validate is true will be set to the same value which was passed in.
211 * @param p_validate If true, then validation alone will be performed and the
212 * database will remain unchanged. If false and all validation checks pass,
213 * then the database will be modified.
214 * @param p_effective_date Reference date for validating lookup values are
215 * applicable during the start to end active date range. This date does not
216 * determine when the changes take effect.
217 * @param p_party_id Identification of the party record that this phone number
218 * relates to
219 * @param p_validity Valid times phone numbers can be used. Valid values are
220 * defined by IRC_CONTACT_TIMES lookup type.
221 * @rep:displayname Update Phone
222 * @rep:category BUSINESS_ENTITY PER_PHONE
223 * @rep:category MISC_EXTENSIONS HR_DATAPUMP
224 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
225 * @rep:scope public
226 * @rep:lifecycle active
227 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
228 */
229 --
230 -- {End Of Comments}
231 --
232 procedure update_phone
233 (p_phone_id in number,
234 p_date_from in date default hr_api.g_date,
235 p_date_to in date default hr_api.g_date,
236 p_phone_type in varchar2 default hr_api.g_varchar2,
237 p_phone_number in varchar2 default hr_api.g_varchar2,
238 p_attribute_category in varchar2 default hr_api.g_varchar2,
239 p_attribute1 in varchar2 default hr_api.g_varchar2,
240 p_attribute2 in varchar2 default hr_api.g_varchar2,
241 p_attribute3 in varchar2 default hr_api.g_varchar2,
242 p_attribute4 in varchar2 default hr_api.g_varchar2,
243 p_attribute5 in varchar2 default hr_api.g_varchar2,
244 p_attribute6 in varchar2 default hr_api.g_varchar2,
245 p_attribute7 in varchar2 default hr_api.g_varchar2,
246 p_attribute8 in varchar2 default hr_api.g_varchar2,
247 p_attribute9 in varchar2 default hr_api.g_varchar2,
248 p_attribute10 in varchar2 default hr_api.g_varchar2,
249 p_attribute11 in varchar2 default hr_api.g_varchar2,
250 p_attribute12 in varchar2 default hr_api.g_varchar2,
251 p_attribute13 in varchar2 default hr_api.g_varchar2,
252 p_attribute14 in varchar2 default hr_api.g_varchar2,
253 p_attribute15 in varchar2 default hr_api.g_varchar2,
254 p_attribute16 in varchar2 default hr_api.g_varchar2,
255 p_attribute17 in varchar2 default hr_api.g_varchar2,
256 p_attribute18 in varchar2 default hr_api.g_varchar2,
257 p_attribute19 in varchar2 default hr_api.g_varchar2,
258 p_attribute20 in varchar2 default hr_api.g_varchar2,
259 p_attribute21 in varchar2 default hr_api.g_varchar2,
260 p_attribute22 in varchar2 default hr_api.g_varchar2,
261 p_attribute23 in varchar2 default hr_api.g_varchar2,
265 p_attribute27 in varchar2 default hr_api.g_varchar2,
262 p_attribute24 in varchar2 default hr_api.g_varchar2,
263 p_attribute25 in varchar2 default hr_api.g_varchar2,
264 p_attribute26 in varchar2 default hr_api.g_varchar2,
266 p_attribute28 in varchar2 default hr_api.g_varchar2,
267 p_attribute29 in varchar2 default hr_api.g_varchar2,
268 p_attribute30 in varchar2 default hr_api.g_varchar2,
269 p_object_version_number in out nocopy number,
270 p_validate in boolean default false,
271 p_effective_date in date,
272 p_party_id in number default hr_api.g_number,
273 p_validity in varchar2 default hr_api.g_varchar2
274 );
275 --
276 -- ----------------------------------------------------------------------------
277 -- |-------------------------------< delete_phone >---------------------------|
278 -- ----------------------------------------------------------------------------
279 --
280 -- {Start Of Comments}
281 /*#
282 * This API deletes a phone record.
283 *
284 * Use this API to delete a phone record on the PER_PHONES table.
285 *
286 * <p><b>Licensing</b><br>
287 * This API is licensed for use with Human Resources and HR Foundation.
288 *
289 * <p><b>Prerequisites</b><br>
290 * The phone record to be deleted must exist.
291 *
292 * <p><b>Post Success</b><br>
293 * Phone record is deleted.
294 *
295 * <p><b>Post Failure</b><br>
296 * Phone record is not deleted and an error is raised.
297 * @param p_validate If true, then validation alone will be performed and the
298 * database will remain unchanged. If false and all validation checks pass,
299 * then the database will be modified.
300 * @param p_phone_id Identifies the phone record to delete.
301 * @param p_object_version_number Current version number of the phone to be
302 * deleted.
303 * @rep:displayname Delete Phone
304 * @rep:category BUSINESS_ENTITY PER_PHONE
305 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
306 * @rep:scope public
307 * @rep:lifecycle active
308 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
309 */
310 --
311 -- {End Of Comments}
312 --
313 procedure delete_phone
314 (p_validate in boolean default false
315 ,p_phone_id in number
316 ,p_object_version_number in number
317 );
318 --
319 -- ----------------------------------------------------------------------------
320 -- |--------------------------< create_or_update_phone >----------------------|
321 -- ----------------------------------------------------------------------------
322 --
323 -- {Start Of Comments}
324 /*#
325 * This API updates the phone record if exists, else creates a new phone
326 * record.
327 *
328 * This API creates a new phone record if one does not exist. If the phone
329 * record exists, then this API updates that phone record. This API helps in
330 * case the user is not sure whether the phone record already exists or not. By
331 * calling this API, if the record exists, then that record is updated,
332 * otherwise a new phone record is created for that person.
333 *
334 * <p><b>Licensing</b><br>
335 * This API is licensed for use with Human Resources.
336 *
337 * <p><b>Prerequisites</b><br>
338 * The parent entity specified by p_parent_id must exist on the parent table
339 * specified by p_parent_table.
340 *
341 * <p><b>Post Success</b><br>
342 * Creates the phone if phone record doesn't exist or updates the existing
343 * phone record.
344 *
345 * <p><b>Post Failure</b><br>
346 * Phone record is not created or updated and an error is raised.
347 * @param p_update_mode If an existing PHONE record is being modified,
348 * indicates which mode to use when updating the record. You must set to either
349 * UPDATE or CORRECT. Modes available for use with a particular record depend
350 * on the dates of previous record changes and the effective date of this
351 * change.
352 * @param p_phone_id Identifies the phone record.
353 * @param p_object_version_number Pass in the current version number of the
354 * phone to be updated. When the API completes if p_validate is false, will be
355 * set to the new version number of the updated phone. If p_validate is true
356 * will be set to the same value which was passed in.
357 * @param p_date_from Date from which the phone number is valid.
358 * @param p_date_to Date when the phone number is no longer valid.
359 * @param p_phone_type Type of phone. Valid values are defines by PHONE_TYPE
360 * lookup type.
361 * @param p_phone_number Phone number
362 * @param p_parent_id Identification number of the parent row that this phone
363 * number relates to. Currently the parent_id must relate to a valid person_id
364 * on the PER_PEOPLE_F table.
365 * @param p_parent_table Name of the parent table. Currently, only
366 * PER_ALL_PEOPLE_F table is supported.
367 * @param p_attribute_category This context value determines which flexfield
368 * structure to use with the descriptive flexfield segments.
369 * @param p_attribute1 Descriptive flexfield segment.
370 * @param p_attribute2 Descriptive flexfield segment.
371 * @param p_attribute3 Descriptive flexfield segment.
372 * @param p_attribute4 Descriptive flexfield segment.
373 * @param p_attribute5 Descriptive flexfield segment.
377 * @param p_attribute9 Descriptive flexfield segment.
374 * @param p_attribute6 Descriptive flexfield segment.
375 * @param p_attribute7 Descriptive flexfield segment.
376 * @param p_attribute8 Descriptive flexfield segment.
378 * @param p_attribute10 Descriptive flexfield segment.
379 * @param p_attribute11 Descriptive flexfield segment.
380 * @param p_attribute12 Descriptive flexfield segment.
381 * @param p_attribute13 Descriptive flexfield segment.
382 * @param p_attribute14 Descriptive flexfield segment.
383 * @param p_attribute15 Descriptive flexfield segment.
384 * @param p_attribute16 Descriptive flexfield segment.
385 * @param p_attribute17 Descriptive flexfield segment.
386 * @param p_attribute18 Descriptive flexfield segment.
387 * @param p_attribute19 Descriptive flexfield segment.
388 * @param p_attribute20 Descriptive flexfield segment.
389 * @param p_attribute21 Descriptive flexfield segment.
390 * @param p_attribute22 Descriptive flexfield segment.
391 * @param p_attribute23 Descriptive flexfield segment.
392 * @param p_attribute24 Descriptive flexfield segment.
393 * @param p_attribute25 Descriptive flexfield segment.
394 * @param p_attribute26 Descriptive flexfield segment.
395 * @param p_attribute27 Descriptive flexfield segment.
396 * @param p_attribute28 Descriptive flexfield segment.
397 * @param p_attribute29 Descriptive flexfield segment.
398 * @param p_attribute30 Descriptive flexfield segment.
399 * @param p_validate If true, then validation alone will be performed and the
400 * database will remain unchanged. If false and all validation checks pass,
401 * then the database will be modified.
402 * @param p_effective_date Reference date for validating lookup values are
403 * applicable during the start to end active date range. This date does not
404 * determine when the changes take effect.
405 * @param p_party_id Identification of the party record that this phone number
406 * relates to.
407 * @param p_validity Valid times phone numbers can be used. Valid values are
408 * defined by IRC_CONTACT_TIMES lookup type.
409 * @rep:displayname Create or Update Phone
410 * @rep:category BUSINESS_ENTITY PER_PHONE
411 * @rep:scope public
412 * @rep:lifecycle active
413 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
414 */
415 --
416 -- {End Of Comments}
417 --
418 procedure create_or_update_phone
419 (p_update_mode in varchar2 default hr_api.g_correction,
420 p_phone_id in out nocopy number,
421 p_object_version_number in out nocopy number,
422 p_date_from in date default hr_api.g_date,
423 p_date_to in date default hr_api.g_date,
424 p_phone_type in varchar2 default hr_api.g_varchar2,
425 p_phone_number in varchar2 default hr_api.g_varchar2,
426 p_parent_id in number default hr_api.g_number,
427 p_parent_table in varchar2 default hr_api.g_varchar2,
428 p_attribute_category in varchar2 default hr_api.g_varchar2,
429 p_attribute1 in varchar2 default hr_api.g_varchar2,
430 p_attribute2 in varchar2 default hr_api.g_varchar2,
431 p_attribute3 in varchar2 default hr_api.g_varchar2,
432 p_attribute4 in varchar2 default hr_api.g_varchar2,
433 p_attribute5 in varchar2 default hr_api.g_varchar2,
434 p_attribute6 in varchar2 default hr_api.g_varchar2,
435 p_attribute7 in varchar2 default hr_api.g_varchar2,
436 p_attribute8 in varchar2 default hr_api.g_varchar2,
437 p_attribute9 in varchar2 default hr_api.g_varchar2,
438 p_attribute10 in varchar2 default hr_api.g_varchar2,
439 p_attribute11 in varchar2 default hr_api.g_varchar2,
440 p_attribute12 in varchar2 default hr_api.g_varchar2,
441 p_attribute13 in varchar2 default hr_api.g_varchar2,
442 p_attribute14 in varchar2 default hr_api.g_varchar2,
443 p_attribute15 in varchar2 default hr_api.g_varchar2,
444 p_attribute16 in varchar2 default hr_api.g_varchar2,
445 p_attribute17 in varchar2 default hr_api.g_varchar2,
446 p_attribute18 in varchar2 default hr_api.g_varchar2,
447 p_attribute19 in varchar2 default hr_api.g_varchar2,
448 p_attribute20 in varchar2 default hr_api.g_varchar2,
449 p_attribute21 in varchar2 default hr_api.g_varchar2,
450 p_attribute22 in varchar2 default hr_api.g_varchar2,
451 p_attribute23 in varchar2 default hr_api.g_varchar2,
452 p_attribute24 in varchar2 default hr_api.g_varchar2,
453 p_attribute25 in varchar2 default hr_api.g_varchar2,
454 p_attribute26 in varchar2 default hr_api.g_varchar2,
455 p_attribute27 in varchar2 default hr_api.g_varchar2,
456 p_attribute28 in varchar2 default hr_api.g_varchar2,
457 p_attribute29 in varchar2 default hr_api.g_varchar2,
458 p_attribute30 in varchar2 default hr_api.g_varchar2,
459 p_validate in boolean default false,
460 p_effective_date in date,
461 p_party_id in number default hr_api.g_number,
462 p_validity in varchar2 default hr_api.g_varchar2
463 );
464 --
465 end hr_phone_api;