DBA Data[Home] [Help]

PACKAGE: APPS.PER_APR_SHD

Source


1 Package per_apr_shd AUTHID CURRENT_USER as
2 /* $Header: peaprrhi.pkh 120.4 2009/08/12 14:18:35 rvagvala ship $*/
3 
4 -- ---------------------------------------------------------------------------+
5 -- |                    Global Record Type Specification                      |
6 -- ---------------------------------------------------------------------------+
7 
8 Type g_rec_type Is Record
9   (
10   appraisal_id                      number(15),
11   business_group_id                 number(15),
12   object_version_number             number(9),
13   appraisal_template_id             number(15),
14   appraisee_person_id               number(15),
15   appraiser_person_id               number(15),
16   appraisal_date                    date,
17   appraisal_period_end_date         date,
18   appraisal_period_start_date       date,
19   type                              varchar2(30),
20   next_appraisal_date               date,
21   status                            varchar2(30),
22   group_date 			    date,
23   group_initiator_id		    number(9),
24   comments                          varchar2(2000),   -- pseudo column
25   overall_performance_level_id      number(15),
26   open                              varchar2(30),
27   attribute_category                varchar2(30),
28   attribute1                        varchar2(150),
29   attribute2                        varchar2(150),
30   attribute3                        varchar2(150),
31   attribute4                        varchar2(150),
32   attribute5                        varchar2(150),
33   attribute6                        varchar2(150),
34   attribute7                        varchar2(150),
35   attribute8                        varchar2(150),
36   attribute9                        varchar2(150),
37   attribute10                       varchar2(150),
38   attribute11                       varchar2(150),
39   attribute12                       varchar2(150),
40   attribute13                       varchar2(150),
41   attribute14                       varchar2(150),
42   attribute15                       varchar2(150),
43   attribute16                       varchar2(150),
44   attribute17                       varchar2(150),
45   attribute18                       varchar2(150),
46   attribute19                       varchar2(150),
47   attribute20                       varchar2(150),
48   system_type                       varchar2(60),
49   system_params                     varchar2(500),
50   appraisee_access                  varchar2(30),
51   main_appraiser_id                 number(15),
52   assignment_id                     number(10),
53   assignment_start_date             date,
54   assignment_business_group_id      number(15),
55   assignment_organization_id        number(15),
56   assignment_job_id                 number(15),
57   assignment_position_id            number(15),
58   assignment_grade_id               number(15),
59   appraisal_system_status           varchar2(30),
60   potential_readiness_level 	    varchar2(30),
61   potential_short_term_workopp 	    varchar2(240),
62   potential_long_term_workopp 	    varchar2(240),
63   potential_details 		        varchar2(2000),
64   event_id 			            number(15),
65   show_competency_ratings           varchar2(30),
66   show_objective_ratings            varchar2(30),
67   show_questionnaire_info           varchar2(30),
68   show_participant_details          varchar2(30),
69   show_participant_ratings          varchar2(30),
70   show_participant_names            varchar2(30),
71   show_overall_ratings              varchar2(30),
72   show_overall_comments             varchar2(30),
73   update_appraisal                  varchar2(30),
74   provide_overall_feedback          varchar2(30),
75   appraisee_comments                varchar2(2000),
76   plan_id                           number(15),
77   offline_status                    varchar2(30),
78 retention_potential             varchar2(30),
79   show_participant_comments          varchar2(30)  -- 8651478 bug fix
80   );
81 
82 -- ---------------------------------------------------------------------------+
83 -- |           Global Definitions - Internal Development Use Only             |
84 -- ---------------------------------------------------------------------------+
85 
86 g_old_rec  g_rec_type;                            -- Global record definition
87 g_tab_nam constant varchar2(30) :='PER_APPRAISALS';
88 -- ---------------------------------------------------------------------------+
89 -- |---------------------------< constraint_error >---------------------------|
90 -- ---------------------------------------------------------------------------+
91 -- {Start Of Comments}
92 
93 -- Description:
94 --   This procedure is called when a constraint has been violated (i.e.
95 --   The exception hr_api.check_integrity_violated,
96 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
97 --   hr_api.unique_integrity_violated has been raised).
98 --   The exceptions can only be raised as follows:
99 --   1) A check constraint can only be violated during an INSERT or UPDATE
100 --      dml operation.
101 --   2) A parent integrity constraint can only be violated during an
102 --      INSERT or UPDATE dml operation.
103 --   3) A child integrity constraint can only be violated during an
104 --      DELETE dml operation.
105 --   4) A unique integrity constraint can only be violated during INSERT or
106 --      UPDATE dml operation.
107 
108 -- Pre Conditions:
109 --   1) Either hr_api.check_integrity_violated,
110 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
111 --      hr_api.unique_integrity_violated has been raised with the subsequent
112 --      stripping of the constraint name from the generated error message
113 --      text.
114 --   2) Standalone validation test which corresponds with a constraint error.
115 
116 -- In Parameter:
117 --   p_constraint_name is in upper format and is just the constraint name
118 --   (e.g. not prefixed by brackets, schema owner etc).
119 
120 -- Post Success:
121 --   Development dependant.
122 
123 -- Post Failure:
124 --   Developement dependant.
125 
126 -- Developer Implementation Notes:
127 --   For each constraint being checked the hr system package failure message
128 --   has been generated as a template only. These system error messages should
129 --   be modified as required (i.e. change the system failure message to a user
130 --   friendly defined error message).
131 
132 -- Access Status:
133 --   Internal Development Use Only.
134 
135 -- {End Of Comments}
136 -- ---------------------------------------------------------------------------+
137 Procedure constraint_error
138             (p_constraint_name in all_constraints.constraint_name%TYPE);
139 
140 -- ---------------------------------------------------------------------------+
141 -- |-----------------------------< api_updating >-----------------------------|
142 -- ---------------------------------------------------------------------------+
143 -- {Start Of Comments}
144 
145 -- Description:
146 --   This function is used to populate the g_old_rec record with the
147 --   current row from the database for the specified primary key
148 --   provided that the primary key exists and is valid and does not
149 --   already match the current g_old_rec. The function will always return
150 --   a TRUE value if the g_old_rec is populated with the current row.
151 --   A FALSE value will be returned if all of the primary key arguments
152 --   are null.
153 
154 -- Pre Conditions:
155 --   None.
156 
157 -- In Parameters:
158 
159 -- Post Success:
160 --   A value of TRUE will be returned indiciating that the g_old_rec
161 --   is current.
162 --   A value of FALSE will be returned if all of the primary key arguments
163 --   have a null value (this indicates that the row has not be inserted into
164 --   the Schema), and therefore could never have a corresponding row.
165 
166 -- Post Failure:
167 --   A failure can only occur under two circumstances:
168 --   1) The primary key is invalid (i.e. a row does not exist for the
169 --      specified primary key values).
170 --   2) If an object_version_number exists but is NOT the same as the current
171 --      g_old_rec value.
172 
173 -- Developer Implementation Notes:
174 --   None.
175 
176 -- Access Status:
177 --   Internal Development Use Only.
178 
179 -- {End Of Comments}
180 -- ---------------------------------------------------------------------------+
181 Function api_updating
182   (
183   p_appraisal_id                       in number,
184   p_object_version_number              in number
185   )      Return Boolean;
186 
187 -- ---------------------------------------------------------------------------+
188 -- |---------------------------------< lck >----------------------------------|
189 -- ---------------------------------------------------------------------------+
190 -- {Start Of Comments}
191 
192 -- Description:
193 --   The Lck process has two main functions to perform. Firstly, the row to be
194 --   updated or deleted must be locked. The locking of the row will only be
195 --   successful if the row is not currently locked by another user.
196 --   Secondly, during the locking of the row, the row is selected into
197 --   the g_old_rec data structure which enables the current row values from the
198 --   server to be available to the api.
199 
200 -- Pre Conditions:
201 --   When attempting to call the lock the object version number (if defined)
202 --   is mandatory.
203 
204 -- In Parameters:
205 --   The arguments to the Lck process are the primary key(s) which uniquely
206 --   identify the row and the object version number of row.
207 
208 -- Post Success:
209 --   On successful completion of the Lck process the row to be updated or
210 --   deleted will be locked and selected into the global data structure
211 --   g_old_rec.
212 
213 -- Post Failure:
214 --   The Lck process can fail for three reasons:
215 --   1) When attempting to lock the row the row could already be locked by
216 --      another user. This will raise the HR_Api.Object_Locked exception.
217 --   2) The row which is required to be locked doesn't exist in the HR Schema.
218 --      This error is trapped and reported using the message name
219 --      'HR_7220_INVALID_PRIMARY_KEY'.
220 --   3) The row although existing in the HR Schema has a different object
221 --      version number than the object version number specified.
222 --      This error is trapped and reported using the message name
223 --      'HR_7155_OBJECT_INVALID'.
224 
225 -- Developer Implementation Notes:
226 --   For each primary key and the object version number arguments add a
227 --   call to hr_api.mandatory_arg_error procedure to ensure that these
228 --   argument values are not null.
229 
230 -- Access Status:
231 --   Internal Development Use Only.
232 
233 -- {End Of Comments}
234 -- ---------------------------------------------------------------------------+
235 Procedure lck
236   (
237   p_appraisal_id                       in number,
238   p_object_version_number              in number
239   );
240 
241 -- ---------------------------------------------------------------------------+
242 -- |-----------------------------< convert_args >-----------------------------|
243 -- ---------------------------------------------------------------------------+
244 -- {Start Of Comments}
245 
246 -- Description:
247 --   This function is used to turn attribute parameters into the record
248 --   structure parameter g_rec_type.
249 
250 -- Pre Conditions:
251 --   This is a private function and can only be called from the ins or upd
252 --   attribute processes.
253 
254 -- In Parameters:
255 
256 -- Post Success:
257 --   A returning record structure will be returned.
258 
259 -- Post Failure:
260 --   No direct error handling is required within this function. Any possible
261 --   errors within this function will be a PL/SQL value error due to conversion
262 --   of datatypes or data lengths.
263 
264 -- Developer Implementation Notes:
265 --   None.
266 
267 -- Access Status:
268 --   Internal Table Handler Use Only.
269 
270 -- {End Of Comments}
271 -- ---------------------------------------------------------------------------+
272 Function convert_args
273 	(
274 	p_appraisal_id                  in number,
275 	p_business_group_id             in number,
276 	p_object_version_number         in number,
277 	p_appraisal_template_id         in number,
278 	p_appraisee_person_id           in number,
279 	p_appraiser_person_id           in number,
280 	p_appraisal_date                in date,
281 	p_appraisal_period_end_date     in date,
282 	p_appraisal_period_start_date   in date,
283 	p_type                          in varchar2,
284 	p_next_appraisal_date           in date,
285 	p_status                        in varchar2,
286 	p_group_date			in date,
287 	p_group_initiator_id		in number,
288 	p_comments                      in varchar2,
289 	p_overall_performance_level_id  in number,
290         p_open                          in varchar2,
291 	p_attribute_category            in varchar2,
292 	p_attribute1                    in varchar2,
293 	p_attribute2                    in varchar2,
294 	p_attribute3                    in varchar2,
295 	p_attribute4                    in varchar2,
296 	p_attribute5                    in varchar2,
297 	p_attribute6                    in varchar2,
298 	p_attribute7                    in varchar2,
299 	p_attribute8                    in varchar2,
300 	p_attribute9                    in varchar2,
301 	p_attribute10                   in varchar2,
302 	p_attribute11                   in varchar2,
303 	p_attribute12                   in varchar2,
304 	p_attribute13                   in varchar2,
305 	p_attribute14                   in varchar2,
306 	p_attribute15                   in varchar2,
307 	p_attribute16                   in varchar2,
308 	p_attribute17                   in varchar2,
309 	p_attribute18                   in varchar2,
310 	p_attribute19                   in varchar2,
311 	p_attribute20                   in varchar2,
312         p_system_type                   in varchar2,
313         p_system_params                 in varchar2,
314         p_appraisee_access              in varchar2,
315         p_main_appraiser_id             in number,
316         p_assignment_id                 in number,
317         p_assignment_start_date         in date,
318         p_asg_business_group_id         in number,
319         p_assignment_organization_id    in number,
320         p_assignment_job_id             in number,
321         p_assignment_position_id        in number,
322         p_assignment_grade_id           in number,
323         p_appraisal_system_status       in varchar2,
324         p_potential_readiness_level     in varchar2,
325 	p_potential_short_term_workopp  in varchar2,
326 	p_potential_long_term_workopp   in varchar2,
327 	p_potential_details             in varchar2,
328         p_event_id                      in number,
329         p_show_competency_ratings       in varchar2,
330         p_show_objective_ratings        in varchar2,
331         p_show_questionnaire_info       in varchar2,
332         p_show_participant_details      in varchar2,
333         p_show_participant_ratings      in varchar2,
334         p_show_participant_names        in varchar2,
335         p_show_overall_ratings          in varchar2,
336         p_show_overall_comments         in varchar2,
337         p_update_appraisal              in varchar2,
338         p_provide_overall_feedback      in varchar2,
339         p_appraisee_comments            in varchar2,
340 	p_plan_id                       in number,
341   p_offline_status                in varchar2,
342    p_retention_potential     in        varchar2,
343   p_show_participant_comments     in varchar2   -- 8651478 bug fix
344 	)
345 	Return g_rec_type;
346 
347 end per_apr_shd;