1 Package pqh_fr_validation_periods_api as
2 /* $Header: pqvlpapi.pkh 120.1 2005/10/02 02:28:53 aroussel $ */
3 /*#
4 * This package contains APIs to create, update and delete service periods.
5 * @rep:scope public
6 * @rep:product per
7 * @rep:displayname Service Validation Period for France
8 */
9 --
10 -- ----------------------------------------------------------------------------
11 -- |-------------------------< insert_validation_period >---------------------|
12 -- ----------------------------------------------------------------------------
13 --
14 -- {Start Of Comments}
15 /*#
16 * This API validates and creates a service period record.
17 *
18 * This API validates the new service periods against the already recorded
19 * service periods for overlapping. Only periods that are marked as Validated
20 * are counted for length of service computations.
21 *
22 * <p><b>Licensing</b><br>
23 * This API is licensed for use with Human Resources.
24 *
25 * <p><b>Prerequisites</b><br>
26 * A service period can only be recorded for an existing services validation
27 * record.
28 *
29 * <p><b>Post Success</b><br>
30 * A new service period is created for the services validation in the database.
31 *
32 * <p><b>Post Failure</b><br>
33 * A service period is not created in the database and an error is raised
34 * @param p_effective_date Specifies the reference date for validating lookup
35 * values, applicable within the active date range. This date does not
36 * determine when the changes take effect.
37 * @param p_validation_id Identifier of the service validation for which the
38 * service period is being created. It references PQH_FR_VALIDATIONS.
39 * @param p_start_date Start date of a service period with a previous employer
40 * @param p_end_date End date of a service period with a previous employer
41 * @param p_previous_employer_id Identifier of the previous employer.
42 * References PER_PREVIOUS_EMPLOYERS.
43 * @param p_assignment_category Specifies the working type of the employee with
44 * the previous employer. Valid values are identified by lookup type EMP_CAT.
45 * @param p_normal_hours Number of hours the employee used to work with the
46 * previous employer with respect to the given frequency
47 * @param p_frequency Unit of time with respect to which number of working
48 * hours is provided. It may be day, month etc. Valid values are identified by
49 * lookup type FREQUENCY.
50 * @param p_period_years The total effective service period taken into
51 * consideration for the employee with the employer expressed in terms of
52 * years, months and days, this parameter refers to the year fraction of the
53 * period
54 * @param p_period_months The total effective service period taken into
55 * consideration for the employee with the employer expressed in terms of
56 * years, months and days, this parameter refers to the month fraction of the
57 * period
58 * @param p_period_days The total effective service period taken into
59 * consideration for the employee with the employer expressed in terms of
60 * years, months and days, this parameter refers to the day fraction of the
61 * period
62 * @param p_comments Comment text
63 * @param p_validation_status Indicate whether the service period can be
64 * validated or not. Valid values are identified by lookup type
65 * 'FR_PQH_VALIDATION_STATUS'.
66 * @param p_validation_period_id The process returns the unique validation
67 * period identifier generated for the new service period record
68 * @param p_object_version_number It is set to the version number of the
69 * created service period record
70 * @rep:displayname Create Service Validation Period
71 * @rep:category BUSINESS_ENTITY PQH_FR_SERVICES_VALIDATION
72 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
73 * @rep:scope public
74 * @rep:lifecycle active
75 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
76 */
77 --
78 -- {End Of Comments}
79 --
80 procedure Insert_Validation_Period
81 (p_effective_date in date
82 ,p_validation_id in number
83 ,p_start_date in date default null
84 ,p_end_date in date default null
85 ,p_previous_employer_id in number default null
86 ,p_assignment_category in varchar2 default null
87 ,p_normal_hours in number default null
88 ,p_frequency in varchar2 default null
89 ,p_period_years in number default null
90 ,p_period_months in number default null
91 ,p_period_days in number default null
92 ,p_comments in varchar2 default null
93 ,p_validation_status in varchar2 default null
94 ,p_validation_period_id out nocopy number
95 ,p_object_version_number out nocopy number);
96 --
97 -- ----------------------------------------------------------------------------
98 -- |-------------------------< update_validation_period >---------------------|
99 -- ----------------------------------------------------------------------------
100 --
101 -- {Start Of Comments}
102 /*#
103 * This API validates the record when an existing service period record is
104 * changed and updates the record in the database.
105 *
106 * API validates the updated service period against the existing service
107 * periods to ensure there are no overlapping dates. The record is updated in
108 * PQH_FR_VALIDATION_PERIODS table
109 *
110 * <p><b>Licensing</b><br>
111 * This API is licensed for use with Human Resources.
112 *
113 * <p><b>Prerequisites</b><br>
114 * The record should exist with the specified object version number.
115 *
116 * <p><b>Post Success</b><br>
117 * The service period is updated in the database with the current changes.
118 *
119 * <p><b>Post Failure</b><br>
120 * The service period is not updated in the database and an error is raised
121 * @param p_effective_date Specifies the reference date for validating lookup
122 * values, applicable within the active date range. This date does not
123 * determine when the changes take effect.
124 * @param p_validation_period_id {@rep:casecolumn
125 * PQH_FR_VALIDATION_PERIODS.VALIDATION_PERIOD_ID}
126 * @param p_object_version_number Passes the current version number of the
127 * service period record to be updated. When the API completes the process
128 * returns the new version number of the updated service period record
129 * @param p_validation_id Identifier of the service validation for which the
130 * service period is being created. It references PQH_FR_VALIDATIONS.
131 * @param p_start_date Start date of a service period with a previous employer
132 * @param p_end_date End date of a service period with a previous employer
133 * @param p_previous_employer_id Identifier of the previous employer.
134 * References PER_PREVIOUS_EMPLOYERS.
135 * @param p_assignment_category Specifies the working type of the employee with
136 * the previous employer. Valid values are identified by lookup type EMP_CAT.
137 * @param p_normal_hours Number of hours the employee used to work with the
138 * previous employer with respect to the given frequency
139 * @param p_frequency It is the unit of time with respect to which number of
140 * working hours is provided. It may be day, month etc. Valid values are
141 * identified by lookup type FREQUENCY.
142 * @param p_period_years The total effective service period taken into
143 * consideration for the employee with the employer expressed in terms of
147 * consideration for the employee with the employer expressed in terms of
144 * years, months and days, this parameter refers to the year fraction of the
145 * period
146 * @param p_period_months The total effective service period taken into
148 * years, months and days, this parameter refers to the month fraction of the
149 * period
150 * @param p_period_days The total effective service period taken into
151 * consideration for the employee with the employer expressed in terms of
152 * years, months and days, this parameter refers to the day fraction of the
153 * period
154 * @param p_comments Comment text
155 * @param p_validation_status Indicate whether the Service Period can be
156 * validated or is impossible to validate. Valid values are identified by
157 * lookup type FR_PQH_VALIDATION_STATUS.
158 * @rep:displayname Update Service Validation Period
159 * @rep:category BUSINESS_ENTITY PQH_FR_SERVICES_VALIDATION
160 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
161 * @rep:scope public
162 * @rep:lifecycle active
163 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
164 */
165 --
166 -- {End Of Comments}
167 --
168 procedure Update_Validation_Period
169 (p_effective_date in date
170 ,p_validation_period_id in number
171 ,p_object_version_number in out nocopy number
172 ,p_validation_id in number default hr_api.g_number
173 ,p_start_date in date default hr_api.g_date
174 ,p_end_date in date default hr_api.g_date
175 ,p_previous_employer_id in number default hr_api.g_number
176 ,p_assignment_category in varchar2 default hr_api.g_varchar2
177 ,p_normal_hours in number default hr_api.g_number
178 ,p_frequency in varchar2 default hr_api.g_varchar2
179 ,p_period_years in number default hr_api.g_number
180 ,p_period_months in number default hr_api.g_number
184 );
181 ,p_period_days in number default hr_api.g_number
182 ,p_comments in varchar2 default hr_api.g_varchar2
183 ,p_validation_status in varchar2 default hr_api.g_varchar2
185 --
186 -- ----------------------------------------------------------------------------
187 -- |-------------------------< delete_validation_period >---------------------|
188 -- ----------------------------------------------------------------------------
189 --
190 -- {Start Of Comments}
191 /*#
192 * This API deletes a service period record from the database.
193 *
194 * The record is deleted from PQH_FR_VALIDATION_PERIODS table
195 *
196 * <p><b>Licensing</b><br>
197 * This API is licensed for use with Human Resources.
198 *
199 * <p><b>Prerequisites</b><br>
200 * The record should exist with the specified object version number.
201 *
202 * <p><b>Post Success</b><br>
203 * A service period record is deleted from the database.
204 *
205 * <p><b>Post Failure</b><br>
209 * PQH_FR_VALIDATION_PERIODS.VALIDATION_PERIOD_ID}
206 * A service period record is not deleted from the database and an error is
207 * raised
208 * @param p_validation_period_id {@rep:casecolumn
210 * @param p_object_version_number Current version number of the service period
211 * record to be deleted
212 * @rep:displayname Delete Service Validation Period
213 * @rep:category BUSINESS_ENTITY PQH_FR_SERVICES_VALIDATION
214 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
215 * @rep:scope public
216 * @rep:lifecycle active
217 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
218 */
219 --
220 -- {End Of Comments}
221 --
222 Procedure Delete_Validation_Period
223 (p_validation_period_id in number
224 ,p_object_version_number in number);
225 --
226 end PQH_FR_VALIDATION_PERIODS_API;