DBA Data[Home] [Help]

PACKAGE: APPS.HR_POS_HIERARCHY_ELE_API

Source


1 Package hr_pos_hierarchy_ele_api as
2 /* $Header: pepseapi.pkh 120.1.12000000.1 2007/01/22 02:04:37 appldev noship $ */
3 /*#
4  * This package contains APIs that create and maintain position hierarchy
5  * elements.
6  * @rep:scope public
7  * @rep:product per
8  * @rep:displayname Position Hierarchy Element
9 */
10 --
11 -- ----------------------------------------------------------------------------
12 -- |-------------------------< create_pos_hierarchy_ele >---------------------|
13 -- ----------------------------------------------------------------------------
14 --
15 -- {Start Of Comments}
16 /*#
17  * This API creates Position Hierarchy Elements.
18  *
19  * This business process creates a new parent-child position element. If the
20  * child already exists in the hierarchy, the element is deleted and a new
21  * element is created in its place.
22  *
23  * <p><b>Licensing</b><br>
24  * This API is licensed for use with Human Resources and HR Foundation.
25  *
26  * <p><b>Prerequisites</b><br>
27  * Position should already exist.
28  *
29  * <p><b>Post Success</b><br>
30  * Position hierarchy element record will be created.
31  *
32  * <p><b>Post Failure</b><br>
33  * Position hierarchy element record will not be created and error is returned.
34  * @param p_validate If true, then validation alone will be performed and the
35  * database will remain unchanged. If false and all validation checks pass,
36  * then the database will be modified.
37  * @param p_parent_position_id Uniquely identifies the parent position of the
38  * parent-child element the process creates.
39  * @param p_pos_structure_version_id Uniquely identifies the position hierarchy
40  * version associated with the element the process creates.
41  * @param p_subordinate_position_id Uniquely identifies the subordinate
42  * position of the parent-child element the process creates.
43  * @param p_business_group_id Uniquely identifies the business group associated
44  * with the position hierarchy.
45  * @param p_hr_installed Flag specifying if HRMS is installed.
46  * @param p_effective_date Reference date for validating lookup values are
47  * applicable during the start to end active date range. This date does not
48  * determine when the changes take effect.
49  * @param p_pos_structure_element_id If p_validate is false, then this uniquely
50  * identifies the Position Hierarchy Element created. If p_validate is true,
51  * then set to null.
52  * @param p_object_version_number If p_validate is false, then set to the
53  * version number of the created Position Hierarchy Element. If p_validate is
54  * true, then set to null.
55  * @rep:displayname Create Position Hierarchy Element
56  * @rep:category BUSINESS_ENTITY PER_POSITION_HIERARCHY
57  * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
58  * @rep:scope public
59  * @rep:lifecycle active
60  * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
61 */
62 --
63 -- {End Of Comments}
64 --
65 procedure create_pos_hierarchy_ele
66   (p_validate                      in     boolean  default false
67   ,p_parent_position_id            in     number
68   ,p_pos_structure_version_id      in     number
69   ,p_subordinate_position_id       in     number
70   ,p_business_group_id             in     number
71   ,p_hr_installed                  in     VARCHAR2
72   ,p_effective_date                in     date
73   ,p_pos_structure_element_id         out nocopy number
74   ,p_object_version_number            out nocopy number
75   );
76 --
77 -- ----------------------------------------------------------------------------
78 -- |-------------------------< update_pos_hierarchy_ele >---------------------|
79 -- ----------------------------------------------------------------------------
80 --
81 -- {Start Of Comments}
82 /*#
83  * This API updates a parent to a new child or a child to a new parent.
84  *
85  *
86  * <p><b>Licensing</b><br>
87  * This API is licensed for use with Human Resources and HR Foundation.
88  *
89  * <p><b>Prerequisites</b><br>
90  * Position hierarchy element record should exist.
91  *
92  * <p><b>Post Success</b><br>
93  * Position hierarchy element record will be updated.
94  *
95  * <p><b>Post Failure</b><br>
96  * Position hierarchy record will not be updated and error is returned.
97  * @param p_validate If true, then validation alone will be performed and the
98  * database will remain unchanged. If false and all validation checks pass,
99  * then the database will be modified.
100  * @param p_pos_structure_element_id Identifies the position hierarchy element
101  * record to update.
102  * @param p_effective_date Reference date for validating lookup values are
103  * applicable during the start to end active date range. This date does not
104  * determine when the changes take effect.
105  * @param p_parent_position_id Uniquely identifies the parent position of the
106  * parent-child element the process updates.
107  * @param p_subordinate_position_id Uniquely identifies the subordinate
108  * position of the parent-child element the process updates.
109  * @param p_object_version_number Pass in the current version number of the
110  * position hierarchy element to be updated. When the API completes if
111  * p_validate is false, will be set to the new version number of the updated
112  * position hierarchy element. If p_validate is true will be set to the same
113  * value which was passed in.
114  * @rep:displayname Update Position Hierarchy Element
115  * @rep:category BUSINESS_ENTITY PER_POSITION_HIERARCHY
116  * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
117  * @rep:scope public
118  * @rep:lifecycle active
119  * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
120 */
121 --
122 -- {End Of Comments}
123 --
124 procedure update_pos_hierarchy_ele
125   (p_validate                      in     boolean  default false
126   ,p_pos_structure_element_id      in     number
127   ,p_effective_date                in     date
128   ,p_parent_position_id            in     number   default hr_api.g_number
129   ,p_subordinate_position_id       in     number   default hr_api.g_number
130   ,p_object_version_number         in out nocopy number
131   );
132 --
133 -- ----------------------------------------------------------------------------
134 -- |-------------------------< delete_pos_hierarchy_ele >---------------------|
135 -- ----------------------------------------------------------------------------
136 --
137 -- {Start Of Comments}
138 /*#
139  * This API deletes a Position Hierarchy Element.
140  *
141  *
142  * <p><b>Licensing</b><br>
143  * This API is licensed for use with Human Resources and HR Foundation.
144  *
145  * <p><b>Prerequisites</b><br>
146  * Position hierarchy record should exist.
147  *
148  * <p><b>Post Success</b><br>
149  * Position hierarchy record is deleted.
150  *
151  * <p><b>Post Failure</b><br>
152  * Position hierarchy is not deleted and error is returned.
153  * @param p_validate If true, then validation alone will be performed and the
154  * database will remain unchanged. If false and all validation checks pass,
155  * then the database will be modified.
156  * @param p_pos_structure_element_id Uniquely identifies the position hierarchy
157  * element record to be deleted.
158  * @param p_object_version_number Current version number of the Position
159  * Hierarchy Element to be deleted.
160  * @param p_hr_installed Flag specifying if HRMS is installed.
161  * @rep:displayname Delete Position Hierarchy Element
162  * @rep:category BUSINESS_ENTITY PER_POSITION_HIERARCHY
163  * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
164  * @rep:scope public
165  * @rep:lifecycle active
166  * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
167 */
168 --
169 -- {End Of Comments}
170 --
171 procedure delete_pos_hierarchy_ele
172   (p_validate                      in     boolean  default false
173   ,p_pos_structure_element_id      in     number
174   ,p_object_version_number         in     number
175   ,p_hr_installed                  in     VARCHAR2
176   );
177 --
178 --
179 -- ----------------------------------------------------------------------------
180 -- |--------------------------< create_pos_hier_elem_internal >--------------------|
181 -- ----------------------------------------------------------------------------
182 --
183 -- {Start Of Comments}
184 --
185 -- Description:
186 --   This alternative interface creates a new parent-child element. If the child
187 --   already exists in the hierarchy the element is deleted and a new element
188 --   is created in its place. It simply calls the create_pos_hierarchy_ele
189 --   business process with p_validate set to false.
190 --
191 -- Prerequisites:
192 --
193 -- In Parameters:
194 --  Name                           Reqd Type     Description
195 --  p_parent_position_id           yes  number   fk to per_all_positions
196 --  p_pos_structure_version_id     yes  number   fk to per_pos_structure_versions
197 --  p_subordinate_position_id      yes  number   fk to per_all_positions
198 --  p_business_group_id            yes  number   business group context
199 --  p_hr_installed                 yes  VARCHAR2 check fnd_product_installations
200 --                                               set to 'I' if installed
201 --  p_effective_date                    date     effective date.
202 --
203 -- Post Success:
204 --  row is created
205 --
206 --
207 -- Post Failure:
208 --
209 --   The procedure will raise an error.
210 --
211 -- Access Status:
212 --   Public.
213 --
214 -- {End Of Comments}
215 --
216 procedure create_pos_hier_elem_internal
217   (p_parent_position_id            in     number
218   ,p_pos_structure_version_id      in     number
219   ,p_subordinate_position_id       in     number
220   ,p_business_group_id             in     number
221   ,p_hr_installed                  in     VARCHAR2
222   ,p_effective_date                in     date
223   ,p_pos_structure_element_id         out nocopy number
224   ,p_object_version_number            out nocopy number
225   );
226 --
227 -- ----------------------------------------------------------------------------
228 -- |--------------------------< update_pos_hier_elem_internal >--------------------|
229 -- ----------------------------------------------------------------------------
230 -- {Start Of Comments}
231 --
232 -- Description:
233 --   This business process is used to update move a parent to a new child
234 --   or a child to a new parent. When called from here p_validate is
235 --   always set to false
236 --
237 -- Prerequisites:
238 --   none
239 --
240 -- In Parameters:
241 --  Name                           Reqd Type     Description
242 --  p_pos_structure_element_id     yes  number   primary key
243 --  p_parent_position_id           yes  number   fk to per_all_positions
244 --  p_subordinate_position_id      yes  number   fk to per_all_positions
245 --  p_object_version_number        yes  number   object version number
246 --  p_effective_date               yes  date     effective date
247 --
248 --
249 -- Post Success:
250 --  row is updated
251 --
252 -- Post Failure:
253 --
254 --   The procedure will raise an error.
255 --
256 -- Access Status:
257 --   Public.
258 --
259 -- {End Of Comments}
260 --
261 procedure update_pos_hier_elem_internal
262   (p_pos_structure_element_id      in     number
263   ,p_parent_position_id            in     number   default hr_api.g_number
264   ,p_subordinate_position_id       in     number   default hr_api.g_number
265   ,p_effective_date                in     date
266   ,p_object_version_number         in out nocopy number
267   );
268 --
269 -- ----------------------------------------------------------------------------
270 -- |--------------------------< delete_pos_hier_elem_internal >--------------------|
271 -- ----------------------------------------------------------------------------
272 --
273 -- {Start Of Comments}
274 --
275 -- Description:
276 --   This alternative interface is used to remove an pos hierarchy element
277 --   When called from here p_validate is always set to false
278 --
279 -- Prerequisites:
280 --   element cannot be deleted if children exist.
281 --
282 --
283 -- In Parameters:
284 --  Name                           Reqd Type     Description
285 --  p_pos_structure_element_id     yes  number   primary key
286 --  p_object_version_number        yes  number   object version number
287 --  p_hr_installed                 yes  VARCHAR2 check fnd_product_installations
288 --                                               set to 'I' if installed
289 --
290 --
291 -- Post Success:
292 --  row is deleted
293 --
294 --
295 -- Post Failure:
296 --
297 --   The procedure will raise an error.
298 --
299 -- Access Status:
300 --   Public.
301 --
302 -- {End Of Comments}
303 --
304 procedure delete_pos_hier_elem_internal
305   (p_pos_structure_element_id      in     number
306   ,p_object_version_number         in     number
307   ,p_hr_installed                  in     VARCHAR2
308   );
309 --
310 end hr_pos_hierarchy_ele_api;