DBA Data[Home] [Help]

PACKAGE: APPS.PER_CEO_SHD

Source


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