DBA Data[Home] [Help]

PACKAGE: APPS.PER_CPN_SHD

Source


1 Package per_cpn_shd as
2 /* $Header: pecpnrhi.pkh 120.0 2005/05/31 07:14:20 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (
10   competence_id                     number(15),
11   name                              varchar2(700),  --bug#2925181
12   business_group_id                 number(15),
13   object_version_number             number(9),
14   description                       varchar2(2000),
15   date_from 			    date,
16   date_to 			    date,
17   behavioural_indicator             varchar2(2000),
18   certification_required            varchar2(30),
19   evaluation_method                 varchar2(30),
20   renewal_period_frequency          number(17,2),     -- Increased length
21   renewal_period_units              varchar2(30),
22   min_level			    number(15),
23   max_level			    number(15),
24   rating_scale_id		    number(15),
25   attribute_category                varchar2(30),
26   attribute1                        varchar2(150),
27   attribute2                        varchar2(150),
28   attribute3                        varchar2(150),
29   attribute4                        varchar2(150),
30   attribute5                        varchar2(150),
31   attribute6                        varchar2(150),
32   attribute7                        varchar2(150),
33   attribute8                        varchar2(150),
34   attribute9                        varchar2(150),
35   attribute10                       varchar2(150),
36   attribute11                       varchar2(150),
37   attribute12                       varchar2(150),
38   attribute13                       varchar2(150),
39   attribute14                       varchar2(150),
40   attribute15                       varchar2(150),
41   attribute16                       varchar2(150),
42   attribute17                       varchar2(150),
43   attribute18                       varchar2(150),
44   attribute19                       varchar2(150),
45   attribute20                       varchar2(150),
46   competence_alias                  varchar2(30),
47   competence_definition_id          number(15)
48  ,competence_cluster                varchar2(100)   -- BUG3356369
49  ,unit_standard_id                  varchar2(40)
50  ,credit_type                       varchar2(100)
51  ,credits                           number(10)
52  ,level_type                        varchar2(100)
53  ,level_number                      number(10)
54  ,field                             varchar2(150)
55  ,sub_field                         varchar2(150)
56  ,provider                          varchar2(150)
57  ,qa_organization                   varchar2(150)
58  ,information_category              varchar2(30)
59  ,information1                      varchar2(150)
60  ,information2                      varchar2(150)
61  ,information3                      varchar2(150)
62  ,information4                      varchar2(150)
63  ,information5                      varchar2(150)
64  ,information6                      varchar2(150)
65  ,information7                      varchar2(150)
66  ,information8                      varchar2(150)
67  ,information9                      varchar2(150)
68  ,information10                     varchar2(150)
69  ,information11                     varchar2(150)
70  ,information12                     varchar2(150)
71  ,information13                     varchar2(150)
72  ,information14                     varchar2(150)
73  ,information15                     varchar2(150)
74  ,information16                     varchar2(150)
75  ,information17                     varchar2(150)
76  ,information18                     varchar2(150)
77  ,information19                     varchar2(150)
78  ,information20                     varchar2(150)
79   );
80 --
81 -- ----------------------------------------------------------------------------
82 -- |           Global Definitions - Internal Development Use Only             |
83 -- ----------------------------------------------------------------------------
84 --
85 g_old_rec  g_rec_type;                            -- Global record definition
86 --
87 -- ----------------------------------------------------------------------------
88 -- |---------------------------< constraint_error >---------------------------|
89 -- ----------------------------------------------------------------------------
90 -- {Start Of Comments}
91 --
92 -- Description:
93 --   This procedure is called when a constraint has been violated (i.e.
94 --   The exception hr_api.check_integrity_violated,
95 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
96 --   hr_api.unique_integrity_violated has been raised).
97 --   The exceptions can only be raised as follows:
98 --   1) A check constraint can only be violated during an INSERT or UPDATE
99 --      dml operation.
100 --   2) A parent integrity constraint can only be violated during an
101 --      INSERT or UPDATE dml operation.
102 --   3) A child integrity constraint can only be violated during an
103 --      DELETE dml operation.
104 --   4) A unique integrity constraint can only be violated during INSERT or
105 --      UPDATE dml operation.
106 --
107 -- Pre Conditions:
108 --   1) Either hr_api.check_integrity_violated,
109 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
110 --      hr_api.unique_integrity_violated has been raised with the subsequent
111 --      stripping of the constraint name from the generated error message
112 --      text.
113 --   2) Standalone validation test which corresponds with a constraint error.
114 --
115 -- In Parameter:
116 --   p_constraint_name is in upper format and is just the constraint name
117 --   (e.g. not prefixed by brackets, schema owner etc).
118 --
119 -- Post Success:
120 --   Development dependant.
121 --
122 -- Post Failure:
123 --   Developement dependant.
124 --
125 -- Developer Implementation Notes:
126 --   For each constraint being checked the hr system package failure message
127 --   has been generated as a template only. These system error messages should
128 --   be modified as required (i.e. change the system failure message to a user
129 --   friendly defined error message).
130 --
131 -- Access Status:
132 --   Internal Development Use Only.
133 --
134 -- {End Of Comments}
135 -- ----------------------------------------------------------------------------
136 Procedure constraint_error
137             (p_constraint_name in all_constraints.constraint_name%TYPE);
138 --
139 -- ----------------------------------------------------------------------------
140 -- |-----------------------------< api_updating >-----------------------------|
141 -- ----------------------------------------------------------------------------
142 -- {Start Of Comments}
143 --
144 -- Description:
145 --   This function is used to populate the g_old_rec record with the
146 --   current row from the database for the specified primary key
147 --   provided that the primary key exists and is valid and does not
148 --   already match the current g_old_rec. The function will always return
149 --   a TRUE value if the g_old_rec is populated with the current row.
150 --   A FALSE value will be returned if all of the primary key arguments
151 --   are null.
152 --
153 -- Pre Conditions:
154 --   None.
155 --
156 -- In Parameters:
157 --
158 -- Post Success:
159 --   A value of TRUE will be returned indiciating that the g_old_rec
160 --   is current.
161 --   A value of FALSE will be returned if all of the primary key arguments
162 --   have a null value (this indicates that the row has not be inserted into
163 --   the Schema), and therefore could never have a corresponding row.
164 --
165 -- Post Failure:
166 --   A failure can only occur under two circumstances:
167 --   1) The primary key is invalid (i.e. a row does not exist for the
168 --      specified primary key values).
169 --   2) If an object_version_number exists but is NOT the same as the current
170 --      g_old_rec value.
171 --
172 -- Developer Implementation Notes:
173 --   None.
174 --
175 -- Access Status:
176 --   Internal Development Use Only.
177 --
178 -- {End Of Comments}
179 -- ----------------------------------------------------------------------------
180 Function api_updating
181   (
182   p_competence_id                      in number,
183   p_object_version_number              in number
184   )      Return Boolean;
185 --
186 -- ----------------------------------------------------------------------------
187 -- |---------------------------------< lck >----------------------------------|
188 -- ----------------------------------------------------------------------------
189 -- {Start Of Comments}
190 --
191 -- Description:
192 --   The Lck process has two main functions to perform. Firstly, the row to be
193 --   updated or deleted must be locked. The locking of the row will only be
194 --   successful if the row is not currently locked by another user.
195 --   Secondly, during the locking of the row, the row is selected into
196 --   the g_old_rec data structure which enables the current row values from the
197 --   server to be available to the api.
198 --
199 -- Pre Conditions:
200 --   When attempting to call the lock the object version number (if defined)
201 --   is mandatory.
202 --
203 -- In Parameters:
204 --   The arguments to the Lck process are the primary key(s) which uniquely
205 --   identify the row and the object version number of row.
206 --
207 -- Post Success:
208 --   On successful completion of the Lck process the row to be updated or
209 --   deleted will be locked and selected into the global data structure
210 --   g_old_rec.
211 --
212 -- Post Failure:
213 --   The Lck process can fail for three reasons:
214 --   1) When attempting to lock the row the row could already be locked by
215 --      another user. This will raise the HR_Api.Object_Locked exception.
216 --   2) The row which is required to be locked doesn't exist in the HR Schema.
217 --      This error is trapped and reported using the message name
218 --      'HR_7220_INVALID_PRIMARY_KEY'.
219 --   3) The row although existing in the HR Schema has a different object
220 --      version number than the object version number specified.
221 --      This error is trapped and reported using the message name
222 --      'HR_7155_OBJECT_INVALID'.
223 --
224 -- Developer Implementation Notes:
225 --   For each primary key and the object version number arguments add a
226 --   call to hr_api.mandatory_arg_error procedure to ensure that these
227 --   argument values are not null.
228 --
229 -- Access Status:
230 --   Internal Development Use Only.
231 --
232 -- {End Of Comments}
233 -- ----------------------------------------------------------------------------
234 Procedure lck
235   (
236   p_competence_id                      in number,
237   p_object_version_number              in number
238   );
239 --
240 -- ----------------------------------------------------------------------------
241 -- |-----------------------------< convert_args >-----------------------------|
242 -- ----------------------------------------------------------------------------
243 -- {Start Of Comments}
244 --
245 -- Description:
246 --   This function is used to turn attribute parameters into the record
247 --   structure parameter g_rec_type.
248 --
249 -- Pre Conditions:
250 --   This is a private function and can only be called from the ins or upd
251 --   attribute processes.
252 --
253 -- In Parameters:
254 --
255 -- Post Success:
256 --   A returning record structure will be returned.
257 --
258 -- Post Failure:
259 --   No direct error handling is required within this function. Any possible
260 --   errors within this function will be a PL/SQL value error due to conversion
261 --   of datatypes or data lengths.
262 --
263 -- Developer Implementation Notes:
264 --   None.
265 --
266 -- Access Status:
267 --   Internal Table Handler Use Only.
268 --
269 -- {End Of Comments}
270 -- ----------------------------------------------------------------------------
271 Function convert_args
272 	(
273 	p_competence_id                 in number,
274 	p_name                          in varchar2,
275 	p_business_group_id             in number,
276 	p_object_version_number         in number,
277 	p_description                   in varchar2,
278 	p_date_from 			in date,
279 	p_date_to 			in date,
280 	p_behavioural_indicator         in varchar2,
281 	p_certification_required        in varchar2,
282 	p_evaluation_method             in varchar2,
283 	p_renewal_period_frequency      in number,
284 	p_renewal_period_units          in varchar2,
285 	p_min_level                     in number,
289         p_attribute1                    in varchar2,
286   	p_max_level                     in number,
287         p_rating_scale_id               in number,
288         p_attribute_category            in varchar2,
290         p_attribute2                    in varchar2,
291         p_attribute3                    in varchar2,
292         p_attribute4                    in varchar2,
293         p_attribute5                    in varchar2,
294         p_attribute6                    in varchar2,
295         p_attribute7                    in varchar2,
296         p_attribute8                    in varchar2,
297         p_attribute9                    in varchar2,
298         p_attribute10                   in varchar2,
299         p_attribute11                   in varchar2,
300         p_attribute12                   in varchar2,
301         p_attribute13                   in varchar2,
302         p_attribute14                   in varchar2,
303         p_attribute15                   in varchar2,
304         p_attribute16                   in varchar2,
305         p_attribute17                   in varchar2,
306         p_attribute18                   in varchar2,
307         p_attribute19                   in varchar2,
308         p_attribute20                   in varchar2,
309         p_competence_alias              in varchar2,
310         p_competence_definition_id      in number
311        ,p_competence_cluster            in varchar2   -- BUG3356369
312        ,p_unit_standard_id              in varchar2
313        ,p_credit_type                   in varchar2
314        ,p_credits                       in number
315        ,p_level_type                    in varchar2
316        ,p_level_number                  in number
317        ,p_field                         in varchar2
318        ,p_sub_field                     in varchar2
319        ,p_provider                      in varchar2
320        ,p_qa_organization               in varchar2
321        ,p_information_category          in varchar2
322        ,p_information1                  in varchar2
323        ,p_information2                  in varchar2
324        ,p_information3                  in varchar2
325        ,p_information4                  in varchar2
326        ,p_information5                  in varchar2
327        ,p_information6                  in varchar2
328        ,p_information7                  in varchar2
329        ,p_information8                  in varchar2
330        ,p_information9                  in varchar2
331        ,p_information10                 in varchar2
332        ,p_information11                 in varchar2
333        ,p_information12                 in varchar2
334        ,p_information13                 in varchar2
335        ,p_information14                 in varchar2
336        ,p_information15                 in varchar2
337        ,p_information16                 in varchar2
338        ,p_information17                 in varchar2
339        ,p_information18                 in varchar2
340        ,p_information19                 in varchar2
341        ,p_information20                 in varchar2
342 	)
343 	Return g_rec_type;
344 --
345 end per_cpn_shd;
346 --