DBA Data[Home] [Help]

PACKAGE: APPS.PER_CPO_SHD

Source


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