DBA Data[Home] [Help]

PACKAGE: APPS.PER_PYP_SHD

Source


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