1 PACKAGE hr_cagr_entitlement_api AS
2 /* $Header: pepceapi.pkh 120.2 2006/10/18 09:14:12 grreddy noship $ */
3 /*#
4 * This package contains APIs that maintain entitlements used by collective
5 * agreements.
6 * @rep:scope public
7 * @rep:product per
8 * @rep:displayname Collective Agreement Entitlement
9 */
10 --
11 -- ----------------------------------------------------------------------------
12 -- |-------------------------< create_cagr_entitlement >----------------------|
13 -- ----------------------------------------------------------------------------
14 --
15 -- {Start Of Comments}
16 /*#
17 * This API creates a collective agreement entitlement.
18 *
19 * An entitlement is a dated instance of an entitlement item for a specific
20 * collective agreement. If the entitlement uses fast formula to calculate its
21 * value, then there will not be any child entitlement lines under the
22 * entitlement. If the entitlement does not use a fast formula, then there will
23 * be one or more entitlement lines (each linked to an eligibility profile).
24 *
25 * <p><b>Licensing</b><br>
26 * This API is licensed for use with Human Resources.
27 *
28 * <p><b>Prerequisites</b><br>
29 * The collective agreement and entitlement item must exist.
30 *
31 * <p><b>Post Success</b><br>
32 * The entitlement record is created.
33 *
34 * <p><b>Post Failure</b><br>
35 * The entitlement record is not created and an error is realised.
36 * @param p_validate If true, then validation alone will be performed and the
37 * database will remain unchanged. If false and all validation checks pass,
38 * then the database will be modified.
39 * @param p_effective_date Reference date for validating lookup values are
40 * applicable during the start to end active date range. This date does not
41 * determine when the changes take effect.
42 * @param p_cagr_entitlement_item_id Uniquely identifies the parent entitlement
43 * item.
44 * @param p_collective_agreement_id Uniquely identifies the parent collective
45 * agreement.
46 * @param p_end_date The end date of the entitlement.
47 * @param p_status The status of the record. Valid values are defined by the
48 * 'CAGR_STATUS' lookup type.
49 * @param p_formula_criteria Indicates whether the entitlement's value should
50 * be calculated by fast formula or determined from eligibility processing of
51 * entitlement lines. Valid values are defined by the 'CAGR_CRITERIA_TYPE'
52 * lookup type.
53 * @param p_formula_id The fast formula to be used to determine the entitlement
54 * value, for a formula based entitlement.
55 * @param p_units_of_measure The unit of measure the entitlement value is
56 * expressed in. Valid values are defined by the 'UNITS' lookup type.
57 * @param p_message_level Identifies whether an error or a warning may be
58 * produced during processing of the entitlement. Valid values are defined by
59 * the 'CAGR_MESSAGE_LEVEL' lookup type.
60 * @param p_object_version_number If p_validate is false, then set to the
61 * version number of the created entitlement. If p_validate is true, then the
62 * value will be null.
63 * @param p_cagr_entitlement_id If p_validate is false, then this uniquely
64 * identifies the entitlement created. If p_validate is true, then set to null.
65 * @rep:displayname Create Collective Agreement Entitlement
66 * @rep:category BUSINESS_ENTITY PER_COLLECTIVE_AGREEMENT
67 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
68 * @rep:scope public
69 * @rep:lifecycle active
70 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
71 */
72 --
73 -- {End Of Comments}
74 --
75 PROCEDURE create_cagr_entitlement
76 (p_validate IN BOOLEAN DEFAULT FALSE
77 ,p_effective_date IN DATE
78 ,p_cagr_entitlement_item_id IN NUMBER
79 ,p_collective_agreement_id IN NUMBER
80 ,p_end_date IN DATE DEFAULT NULL
81 ,p_status IN VARCHAR2
82 ,p_formula_criteria IN VARCHAR2
83 ,p_formula_id IN NUMBER DEFAULT NULL
84 ,p_units_of_measure IN VARCHAR2 DEFAULT NULL
85 ,p_message_level IN VARCHAR2 DEFAULT NULL
86 ,p_object_version_number OUT NOCOPY NUMBER
87 ,p_cagr_entitlement_id OUT NOCOPY NUMBER
88 );
89 --
90 -- ----------------------------------------------------------------------------
91 -- |-------------------------< update_cagr_entitlement >----------------------|
92 -- ----------------------------------------------------------------------------
93 --
94 -- {Start Of Comments}
95 /*#
96 * This API updates a collective agreement entitlement.
97 *
98 * An entitlement is a dated instance of an entitlement item for a specific
99 * collective agreement. If the entitlement uses a fast formula to calculate
100 * its value, then there will not be child entitlement lines under the
101 * entitlement. If the entitlement does not use a fast formula, then there will
102 * be one or more entitlement lines (each linked to an eligibility profile).
103 *
104 * <p><b>Licensing</b><br>
105 * This API is licensed for use with Human Resources.
106 *
107 * <p><b>Prerequisites</b><br>
108 * The entitlement must exist.
109 *
110 * <p><b>Post Success</b><br>
111 * The entitlement is updated.
112 *
113 * <p><b>Post Failure</b><br>
114 * The entitlement is not updated and an error is raised.
115 * @param p_validate If true, then validation alone will be performed and the
116 * database will remain unchanged. If false and all validation checks pass,
117 * then the database will be modified.
118 * @param p_effective_date Reference date for validating lookup values are
119 * applicable during the start to end active date range. This date does not
120 * determine when the changes take effect.
121 * @param p_cagr_entitlement_id Uniquely identifies the entitlement to be
122 * updated.
123 * @param p_cagr_entitlement_item_id Uniquely identifies the parent entitlement
124 * item.
125 * @param p_collective_agreement_id Uniquely identifies the parent collective
126 * agreement.
127 * @param p_status The status of the record. Valid values are defined by the
128 * 'CAGR_STATUS' lookup type.
129 * @param p_end_date The end date of the entitlement.
130 * @param p_formula_criteria Indicates whether the entitlement's value should
131 * be calculated by fast formula or determined from eligibility processing of
132 * entitlement lines. Valid values are defined by the 'CAGR_CRITERIA_TYPE'
133 * lookup type.
134 * @param p_formula_id The fast formula to be used to determine the entitlement
135 * value, for a formula based entitlement.
136 * @param p_units_of_measure The unit of measure the entitlement value is
137 * expressed in. Valid values are defined by the 'UNITS' lookup type.
138 * @param p_message_level Identifies whether an error or a warning may be
139 * produced during processing of the entitlement. Valid values are defined by
140 * the 'CAGR_MESSAGE_LEVEL' lookup type.
141 * @param p_object_version_number Pass in the current version number of the
142 * entitlement to be updated. When the API completes if p_validate is false,
143 * will be set to the new version number of the updated entitlement. If
144 * p_validate is true will be set to the same value which was passed in.
145 * @rep:displayname Update Collective Agreement Entitlement
146 * @rep:category BUSINESS_ENTITY PER_COLLECTIVE_AGREEMENT
147 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
148 * @rep:scope public
149 * @rep:lifecycle active
150 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
151 */
152 --
153 -- {End Of Comments}
154 --
155 PROCEDURE update_cagr_entitlement
156 (p_validate IN BOOLEAN DEFAULT false
157 ,p_effective_date IN DATE
158 ,p_cagr_entitlement_id IN NUMBER DEFAULT hr_api.g_number
159 ,p_cagr_entitlement_item_id IN NUMBER DEFAULT hr_api.g_number
160 ,p_collective_agreement_id IN NUMBER DEFAULT hr_api.g_number
161 ,p_status IN VARCHAR2 DEFAULT hr_api.g_varchar2
162 ,p_end_date IN DATE DEFAULT hr_api.g_date
163 ,p_formula_criteria IN VARCHAR2 DEFAULT hr_api.g_varchar2
164 ,p_formula_id IN NUMBER DEFAULT hr_api.g_number
165 ,p_units_of_measure IN VARCHAR2 DEFAULT hr_api.g_varchar2
166 ,p_message_level IN VARCHAR2 DEFAULT hr_api.g_varchar2
167 ,p_object_version_number IN OUT NOCOPY NUMBER
168 );
169 --
170 -- ----------------------------------------------------------------------------
171 -- |-------------------------< delete_cagr_entitlement >----------------------|
172 -- ----------------------------------------------------------------------------
173 --
174 -- {Start Of Comments}
175 /*#
176 * This API deletes a collective agreement entitlement.
177 *
178 * An entitlement is a dated instance of an entitlement item for a specific
179 * collective agreement. If the entitlement uses fast formula to calculate its
180 * value, then there will not be any child entitlement lines under the
181 * entitlement. If the entitlement does not use a fast formula, then there will
182 * be one or more entitlement lines (each linked to an eligibility profile).
183 *
184 * <p><b>Licensing</b><br>
185 * This API is licensed for use with Human Resources.
186 *
187 * <p><b>Prerequisites</b><br>
188 * The entitlement must exist.
189 *
190 * <p><b>Post Success</b><br>
191 * The entitlement is deleted.
192 *
193 * <p><b>Post Failure</b><br>
194 * The entitlement is not deleted and an error is raised.
195 * @param p_validate If true, then validation alone will be performed and the
196 * database will remain unchanged. If false and all validation checks pass,
197 * then the database will be modified.
198 * @param p_effective_date Reference date for validating lookup values are
199 * applicable during the start to end active date range. This date does not
200 * determine when the changes take effect.
201 * @param p_cagr_entitlement_id Uniquely identifies the entitlement to be
202 * deleted.
203 * @param p_object_version_number Current version number of the entitlement to
204 * be deleted.
205 * @rep:displayname Delete Collective Agreement Entitlement
206 * @rep:category BUSINESS_ENTITY PER_COLLECTIVE_AGREEMENT
207 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
208 * @rep:scope public
209 * @rep:lifecycle active
210 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
211 */
212 --
213 -- {End Of Comments}
214 --
215 PROCEDURE delete_cagr_entitlement
216 (p_validate IN BOOLEAN DEFAULT false
217 ,p_effective_date IN DATE
218 ,p_cagr_entitlement_id IN per_cagr_entitlements.cagr_entitlement_id%TYPE
219 ,p_object_version_number IN OUT NOCOPY NUMBER
220 );
221 --
222 END hr_cagr_entitlement_api;