DBA Data[Home] [Help]

PACKAGE: APPS.PER_SIP_SHD

Source


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