1 Package hr_person_type_usage_api AUTHID CURRENT_USER as
2 /* $Header: peptuapi.pkh 120.3 2005/10/31 02:56:09 jpthomas noship $ */
3 /*#
4 * This package maintains person type usages.
5 * @rep:scope public
6 * @rep:product per
7 * @rep:displayname Person Type Usage
8 */
9 --
10 -- ----------------------------------------------------------------------------
11 -- |-------------------------< update_person_type_usage >---------------------|
12 -- ----------------------------------------------------------------------------
13 --
14 -- {Start Of Comments}
15 /*#
16 * This API updates information held about a type associated with a person.
17 *
18 * A person has a type that defines which business processes can apply to that
19 * person. For example, you can only hire someone who as a person type of
20 * 'Applicant'. A person can have many types at one time, for example, employee
21 * and applicant. This API allows update to flexfield information for a
22 * particular person type usage.
23 *
24 * <p><b>Licensing</b><br>
25 * This API is licensed for use with Human Resources.
26 *
27 * <p><b>Prerequisites</b><br>
28 * A person type usage record must exist before it can be updated.
29 *
30 * <p><b>Post Success</b><br>
31 * The person type usage will be updated.
32 *
33 * <p><b>Post Failure</b><br>
34 * The person type usage will not be updated and an error will be raised.
35 * @param p_validate If true, then validation alone will be performed and the
36 * database will remain unchanged. If false and all validation checks pass,
37 * then the database will be modified.
38 * @param p_person_type_usage_id Uniquely identifies the person type usage
39 * record to update.
40 * @param p_effective_date Determines when the DateTrack operation comes into
41 * force.
42 * @param p_datetrack_mode Indicates which DateTrack mode to use when updating
43 * the record. You must set to either UPDATE, CORRECTION, UPDATE_OVERRIDE or
44 * UPDATE_CHANGE_INSERT. Modes available for use with a particular record
45 * depend on the dates of previous record changes and the effective date of
46 * this change.
47 * @param p_object_version_number Pass in the current version number of the
48 * person type usage to be updated. When the API completes if p_validate is
49 * false, will be set to the new version number of the updated person type
50 * usage. If p_validate is true will be set to the same value which was passed
51 * in.
52 * @param p_person_type_id Uniquely identifies the type associated to the
53 * person. Update of this value is currently unsupported.
54 * @param p_attribute_category This context value determines which flexfield
55 * structure to use with the descriptive flexfield segments.
56 * @param p_attribute1 Descriptive flexfield segment.
57 * @param p_attribute2 Descriptive flexfield segment.
58 * @param p_attribute3 Descriptive flexfield segment.
59 * @param p_attribute4 Descriptive flexfield segment.
60 * @param p_attribute5 Descriptive flexfield segment.
61 * @param p_attribute6 Descriptive flexfield segment.
62 * @param p_attribute7 Descriptive flexfield segment.
63 * @param p_attribute8 Descriptive flexfield segment.
64 * @param p_attribute9 Descriptive flexfield segment.
65 * @param p_attribute10 Descriptive flexfield segment.
66 * @param p_attribute11 Descriptive flexfield segment.
67 * @param p_attribute12 Descriptive flexfield segment.
68 * @param p_attribute13 Descriptive flexfield segment.
69 * @param p_attribute14 Descriptive flexfield segment.
70 * @param p_attribute15 Descriptive flexfield segment.
71 * @param p_attribute16 Descriptive flexfield segment.
72 * @param p_attribute17 Descriptive flexfield segment.
73 * @param p_attribute18 Descriptive flexfield segment.
74 * @param p_attribute19 Descriptive flexfield segment.
75 * @param p_attribute20 Descriptive flexfield segment.
76 * @param p_effective_start_date If p_validate is false, then set to the
77 * effective start date on the updated person type usage which now exists as of
78 * the effective date. If p_validate is true, then set to null.
79 * @param p_effective_end_date If p_validate is false, then set to the
80 * effective end date on the updated person type usage which now exists as of
81 * the effective date. If p_validate is true, then set to null.
82 * @param p_attribute21 Descriptive flexfield segment.
83 * @param p_attribute22 Descriptive flexfield segment.
84 * @param p_attribute23 Descriptive flexfield segment.
85 * @param p_attribute24 Descriptive flexfield segment.
86 * @param p_attribute25 Descriptive flexfield segment.
87 * @param p_attribute26 Descriptive flexfield segment.
88 * @param p_attribute27 Descriptive flexfield segment.
89 * @param p_attribute28 Descriptive flexfield segment.
90 * @param p_attribute29 Descriptive flexfield segment.
91 * @param p_attribute30 Descriptive flexfield segment.
92 * @rep:displayname Update Person Type Usage
93 * @rep:category BUSINESS_ENTITY HR_PERSON
94 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
95 * @rep:scope public
96 * @rep:lifecycle active
97 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
98 */
99 --
100 -- {End Of Comments}
101 --
102 procedure update_person_type_usage
103 (
104 p_validate in boolean default false
105 ,p_person_type_usage_id in number
106 ,p_effective_date in date
107 ,p_datetrack_mode in varchar2
108 ,p_object_version_number in out nocopy number
109 ,p_person_type_id in number default hr_api.g_number
110 ,p_attribute_category in varchar2 default hr_api.g_varchar2
111 ,p_attribute1 in varchar2 default hr_api.g_varchar2
112 ,p_attribute2 in varchar2 default hr_api.g_varchar2
113 ,p_attribute3 in varchar2 default hr_api.g_varchar2
114 ,p_attribute4 in varchar2 default hr_api.g_varchar2
115 ,p_attribute5 in varchar2 default hr_api.g_varchar2
116 ,p_attribute6 in varchar2 default hr_api.g_varchar2
117 ,p_attribute7 in varchar2 default hr_api.g_varchar2
118 ,p_attribute8 in varchar2 default hr_api.g_varchar2
119 ,p_attribute9 in varchar2 default hr_api.g_varchar2
120 ,p_attribute10 in varchar2 default hr_api.g_varchar2
121 ,p_attribute11 in varchar2 default hr_api.g_varchar2
122 ,p_attribute12 in varchar2 default hr_api.g_varchar2
123 ,p_attribute13 in varchar2 default hr_api.g_varchar2
124 ,p_attribute14 in varchar2 default hr_api.g_varchar2
125 ,p_attribute15 in varchar2 default hr_api.g_varchar2
126 ,p_attribute16 in varchar2 default hr_api.g_varchar2
127 ,p_attribute17 in varchar2 default hr_api.g_varchar2
128 ,p_attribute18 in varchar2 default hr_api.g_varchar2
129 ,p_attribute19 in varchar2 default hr_api.g_varchar2
130 ,p_attribute20 in varchar2 default hr_api.g_varchar2
131 ,p_attribute21 in varchar2 default hr_api.g_varchar2
132 ,p_attribute22 in varchar2 default hr_api.g_varchar2
133 ,p_attribute23 in varchar2 default hr_api.g_varchar2
134 ,p_attribute24 in varchar2 default hr_api.g_varchar2
135 ,p_attribute25 in varchar2 default hr_api.g_varchar2
136 ,p_attribute26 in varchar2 default hr_api.g_varchar2
137 ,p_attribute27 in varchar2 default hr_api.g_varchar2
138 ,p_attribute28 in varchar2 default hr_api.g_varchar2
139 ,p_attribute29 in varchar2 default hr_api.g_varchar2
140 ,p_attribute30 in varchar2 default hr_api.g_varchar2
141 ,p_effective_start_date out nocopy date
142 ,p_effective_end_date out nocopy date
143 );
144 --
145 -- ----------------------------------------------------------------------------
146 -- |-------------------------< check_person_type >-----------------------------|
147 -- ----------------------------------------------------------------------------
148 --
149 function check_person_type
150 (
151 p_person_id in number
152 ,p_effective_date in date
153 ,p_person_type in varchar2
154 ) return boolean;
155 --
156 -- ----------------------------------------------------------------------------
157 -- |-------------------------< check_person_ex_type >-------------------------|
158 -- ----------------------------------------------------------------------------
159 --
160 function check_person_ex_type
161 (
162 p_person_id in number
163 ,p_effective_date in date
164 ,p_person_type in varchar2
165 ) return boolean;
166
167 --
168 -- ----------------------------------------------------------------------------
169 -- |-------------------------< create_person_type_usage >---------------------|
170 -- ----------------------------------------------------------------------------
171 --
172 -- {Start Of Comments}
173 /*#
174 * This API creates an association between a type and a person.
175 *
176 * A person has a type that defines which business processes can apply to that
177 * person. For example, you can only hire someone who as a person type of
178 * 'Applicant'. A person can have many types at one time, for example, employee
179 * and applicant. This API associates a type to a person.
180 *
181 * <p><b>Licensing</b><br>
182 * This API is licensed for use with Human Resources.
183 *
184 * <p><b>Prerequisites</b><br>
185 * A person must exist.
186 *
187 * <p><b>Post Success</b><br>
188 * A person type usage record will be created.
189 *
190 * <p><b>Post Failure</b><br>
191 * A person type usage record will not be created and an error will be raised.
192 * @param p_validate If true, then validation alone will be performed and the
193 * database will remain unchanged. If false and all validation checks pass,
194 * then the database will be modified.
195 * @param p_person_id Identifies the person who will be associated with the
196 * specified person type.
197 * @param p_person_type_id The person type for this person
198 * @param p_effective_date Determines when the DateTrack operation comes into
199 * force.
200 * @param p_attribute_category This context value determines which flexfield
201 * structure to use with the descriptive flexfield segments.
202 * @param p_attribute1 Descriptive flexfield segment.
203 * @param p_attribute2 Descriptive flexfield segment.
204 * @param p_attribute3 Descriptive flexfield segment.
205 * @param p_attribute4 Descriptive flexfield segment.
206 * @param p_attribute5 Descriptive flexfield segment.
207 * @param p_attribute6 Descriptive flexfield segment.
208 * @param p_attribute7 Descriptive flexfield segment.
209 * @param p_attribute8 Descriptive flexfield segment.
210 * @param p_attribute9 Descriptive flexfield segment.
211 * @param p_attribute10 Descriptive flexfield segment.
212 * @param p_attribute11 Descriptive flexfield segment.
213 * @param p_attribute12 Descriptive flexfield segment.
214 * @param p_attribute13 Descriptive flexfield segment.
215 * @param p_attribute14 Descriptive flexfield segment.
216 * @param p_attribute15 Descriptive flexfield segment.
217 * @param p_attribute16 Descriptive flexfield segment.
218 * @param p_attribute17 Descriptive flexfield segment.
219 * @param p_attribute18 Descriptive flexfield segment.
220 * @param p_attribute19 Descriptive flexfield segment.
221 * @param p_attribute20 Descriptive flexfield segment.
222 * @param p_person_type_usage_id If p_validate is false, then this uniquely
223 * identifies the created person type usage. If p_validate is true, then set to
224 * null.
225 * @param p_object_version_number If p_validate is false, then set to the
226 * version number of the created person type usage. If p_validate is true, then
227 * the value will be null.
228 * @param p_effective_start_date If p_validate is false, then set to the
229 * earliest effective start date for the created person type usage. If
230 * p_validate is true, then set to null.
231 * @param p_effective_end_date If p_validate is false, then set to the
232 * effective end date for the created person type usage. If p_validate is true,
233 * then set to null.
234 * @param p_attribute21 Descriptive flexfield segment.
235 * @param p_attribute22 Descriptive flexfield segment.
236 * @param p_attribute23 Descriptive flexfield segment.
237 * @param p_attribute24 Descriptive flexfield segment.
238 * @param p_attribute25 Descriptive flexfield segment.
239 * @param p_attribute26 Descriptive flexfield segment.
240 * @param p_attribute27 Descriptive flexfield segment.
241 * @param p_attribute28 Descriptive flexfield segment.
242 * @param p_attribute29 Descriptive flexfield segment.
243 * @param p_attribute30 Descriptive flexfield segment.
244 * @rep:displayname Create Person Type Usage
245 * @rep:category BUSINESS_ENTITY HR_PERSON
246 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
247 * @rep:scope public
248 * @rep:lifecycle active
249 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
250 */
251 --
252 -- {End Of Comments}
253 --
254 procedure create_person_type_usage
255 (
256 p_validate in boolean default false
257 ,p_person_id in number
258 ,p_person_type_id in number
259 ,p_effective_date in date
260 ,p_attribute_category in varchar2 default null
261 ,p_attribute1 in varchar2 default null
262 ,p_attribute2 in varchar2 default null
263 ,p_attribute3 in varchar2 default null
264 ,p_attribute4 in varchar2 default null
265 ,p_attribute5 in varchar2 default null
266 ,p_attribute6 in varchar2 default null
267 ,p_attribute7 in varchar2 default null
268 ,p_attribute8 in varchar2 default null
269 ,p_attribute9 in varchar2 default null
270 ,p_attribute10 in varchar2 default null
271 ,p_attribute11 in varchar2 default null
272 ,p_attribute12 in varchar2 default null
273 ,p_attribute13 in varchar2 default null
274 ,p_attribute14 in varchar2 default null
275 ,p_attribute15 in varchar2 default null
276 ,p_attribute16 in varchar2 default null
277 ,p_attribute17 in varchar2 default null
278 ,p_attribute18 in varchar2 default null
279 ,p_attribute19 in varchar2 default null
280 ,p_attribute20 in varchar2 default null
281 ,p_attribute21 in varchar2 default null
282 ,p_attribute22 in varchar2 default null
283 ,p_attribute23 in varchar2 default null
284 ,p_attribute24 in varchar2 default null
285 ,p_attribute25 in varchar2 default null
286 ,p_attribute26 in varchar2 default null
287 ,p_attribute27 in varchar2 default null
288 ,p_attribute28 in varchar2 default null
289 ,p_attribute29 in varchar2 default null
290 ,p_attribute30 in varchar2 default null
291 ,p_person_type_usage_id out nocopy number
292 ,p_object_version_number out nocopy number
293 ,p_effective_start_date out nocopy date
294 ,p_effective_end_date out nocopy date
295 );
296 --
297 -- ----------------------------------------------------------------------------
298 -- |-------------------------< delete_person_type_usage >---------------------|
299 -- ----------------------------------------------------------------------------
300 --
301 -- {Start Of Comments}
302 /*#
303 * This API deletes a person type usage.
304 *
305 * Many restrictions are placed upon the deletion of person types. For example,
306 * you cannot delete a person type of 'employee' as this is equivalent to a
307 * termination. Instead, the correct business process must be used. It is
308 * possible to delete person type usage records based on user defined person
309 * types.
310 *
311 * <p><b>Licensing</b><br>
312 * This API is licensed for use with Human Resources.
313 *
314 * <p><b>Prerequisites</b><br>
315 * A person type usage must exist
316 *
317 * <p><b>Post Success</b><br>
318 * The person type usage will be deleted.
319 *
320 * <p><b>Post Failure</b><br>
321 * The person type usage will not be deleted and an error will be raised.
322 * @param p_validate If true, then validation alone will be performed and the
323 * database will remain unchanged. If false and all validation checks pass,
324 * then the database will be modified.
325 * @param p_person_type_usage_id Uniquely identifies the person type usage
326 * record to be deleted.
327 * @param p_effective_date Determines when the DateTrack operation comes into
328 * force.
329 * @param p_datetrack_mode Indicates which DateTrack mode to use when deleting
330 * the record. You must set to either ZAP, DELETE, FUTURE_CHANGE or
331 * DELETE_NEXT_CHANGE. Modes available for use with a particular record depend
332 * on the dates of previous record changes and the effective date of this
333 * change.
334 * @param p_object_version_number Current version number of the person type
335 * usage to be deleted.
336 * @param p_effective_start_date If p_validate is false, then set to the
337 * effective start date for the deleted person type usage row which now exists
338 * as of the effective date. If p_validate is true or all row instances have
339 * been deleted then set to null.
340 * @param p_effective_end_date If p_validate is false, then set to the
341 * effective end date for the deleted person type usage row which now exists as
342 * of the effective date. If p_validate is true or all row instances have been
343 * deleted then set to null.
344 * @rep:displayname Delete Person Type Usage
345 * @rep:category BUSINESS_ENTITY HR_PERSON
346 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
347 * @rep:scope public
348 * @rep:lifecycle active
349 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
350 */
351 --
352 -- {End Of Comments}
353 --
354 procedure delete_person_type_usage
355 (
356 p_validate in boolean default false
357 ,p_person_type_usage_id in number
358 ,p_effective_date in date
359 ,p_datetrack_mode in varchar2
360 ,p_object_version_number in out nocopy number
361 ,p_effective_start_date out nocopy date
362 ,p_effective_end_date out nocopy date
363 );
364 end hr_person_type_usage_api;