DBA Data[Home] [Help]

PACKAGE: APPS.PER_GRD_SHD

Source


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