DBA Data[Home] [Help]

PACKAGE: APPS.PER_PPB_SHD

Source


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