DBA Data[Home] [Help]

PACKAGE: APPS.HR_PDT_SHD

Source


1 Package hr_pdt_shd AUTHID CURRENT_USER as
2 /* $Header: hrpdtrhi.pkh 120.1.12010000.1 2008/07/28 03:39:04 appldev ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (person_deployment_id            number(15)
10   ,object_version_number           number(15)
11   ,from_business_group_id          number(15)
12   ,to_business_group_id            number(15)
13   ,from_person_id                  number(15)
14   ,to_person_id                    number(15)
15   ,person_type_id                   number(15)
16   ,start_date                      date
17   ,end_date                        date
18   ,deployment_reason               varchar2(30)
19   ,employee_number                 varchar2(30)
20   ,leaving_reason                  varchar2(30)
21   ,leaving_person_type_id          number(15)
22   ,permanent                       varchar2(9)       -- Increased length
23   ,status                          varchar2(30)
24   ,status_change_reason            varchar2(30)
25   ,status_change_date              date
26   ,deplymt_policy_id               number(15)
27   ,organization_id                 number(15)
28   ,location_id                     number(15)
29   ,job_id                          number(15)
30   ,position_id                     number(15)
31   ,grade_id                        number(15)
32   ,supervisor_id                   number(15)
33   ,supervisor_assignment_id        number(15)
34   ,retain_direct_reports           varchar2(9)       -- Increased length
35   ,payroll_id                      number(15)
36   ,pay_basis_id                    number(15)
37   ,proposed_salary                 varchar2(60)
38   ,people_group_id                 number(15)
39   ,soft_coding_keyflex_id          number(15)
40   ,assignment_status_type_id       number(15)
41   ,ass_status_change_reason        varchar2(30)
42   ,assignment_category             varchar2(30)
43   ,per_information_category        varchar2(30)
44   ,per_information1                varchar2(150)
45   ,per_information2                varchar2(150)
46   ,per_information3                varchar2(150)
47   ,per_information4                varchar2(150)
48   ,per_information5                varchar2(150)
49   ,per_information6                varchar2(150)
50   ,per_information7                varchar2(150)
51   ,per_information8                varchar2(150)
52   ,per_information9                varchar2(150)
53   ,per_information10               varchar2(150)
54   ,per_information11               varchar2(150)
55   ,per_information12               varchar2(150)
56   ,per_information13               varchar2(150)
57   ,per_information14               varchar2(150)
58   ,per_information15               varchar2(150)
59   ,per_information16               varchar2(150)
60   ,per_information17               varchar2(150)
61   ,per_information18               varchar2(150)
62   ,per_information19               varchar2(150)
63   ,per_information20               varchar2(150)
64   ,per_information21               varchar2(150)
65   ,per_information22               varchar2(150)
66   ,per_information23               varchar2(150)
67   ,per_information24               varchar2(150)
68   ,per_information25               varchar2(150)
69   ,per_information26               varchar2(150)
70   ,per_information27               varchar2(150)
71   ,per_information28               varchar2(150)
72   ,per_information29               varchar2(150)
73   ,per_information30               varchar2(150)
74   );
75 --
76 -- ----------------------------------------------------------------------------
77 -- |           Global Definitions - Internal Development Use Only             |
78 -- ----------------------------------------------------------------------------
79 --
80 g_old_rec  g_rec_type;                            -- Global record definition
81 -- Global table name
82 g_tab_nam  constant varchar2(30) := 'HR_PERSON_DEPLOYMENTS';
83 --
84 -- ----------------------------------------------------------------------------
85 -- |---------------------------< constraint_error >---------------------------|
86 -- ----------------------------------------------------------------------------
87 -- {Start Of Comments}
88 --
89 -- Description:
90 --   This procedure is called when a constraint has been violated (i.e.
91 --   The exception hr_api.check_integrity_violated,
92 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
93 --   hr_api.unique_integrity_violated has been raised).
94 --   The exceptions can only be raised as follows:
95 --   1) A check constraint can only be violated during an INSERT or UPDATE
96 --      dml operation.
97 --   2) A parent integrity constraint can only be violated during an
98 --      INSERT or UPDATE dml operation.
99 --   3) A child integrity constraint can only be violated during an
100 --      DELETE dml operation.
101 --   4) A unique integrity constraint can only be violated during INSERT or
102 --      UPDATE dml operation.
103 --
104 -- Prerequisites:
105 --   1) Either hr_api.check_integrity_violated,
106 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
107 --      hr_api.unique_integrity_violated has been raised with the subsequent
108 --      stripping of the constraint name from the generated error message
109 --      text.
110 --   2) Standalone validation test which corresponds with a constraint error.
111 --
112 -- In Parameter:
113 --   p_constraint_name is in upper format and is just the constraint name
114 --   (e.g. not prefixed by brackets, schema owner etc).
115 --
116 -- Post Success:
117 --   Development dependant.
118 --
119 -- Post Failure:
120 --   Developement dependant.
121 --
122 -- Developer Implementation Notes:
123 --   For each constraint being checked the hr system package failure message
124 --   has been generated as a template only. These system error messages should
125 --   be modified as required (i.e. change the system failure message to a user
126 --   friendly defined error message).
127 --
128 -- Access Status:
129 --   Internal Development Use Only.
130 --
131 -- {End Of Comments}
132 -- ----------------------------------------------------------------------------
133 Procedure constraint_error
134   (p_constraint_name in all_constraints.constraint_name%TYPE);
135 --
136 -- ----------------------------------------------------------------------------
137 -- |-----------------------------< api_updating >-----------------------------|
138 -- ----------------------------------------------------------------------------
139 --  {Start Of Comments}
140 --
141 -- Description:
142 --   This function is used to populate the g_old_rec record with the
143 --   current row from the database for the specified primary key
144 --   provided that the primary key exists and is valid and does not
145 --   already match the current g_old_rec. The function will always return
146 --   a TRUE value if the g_old_rec is populated with the current row.
147 --   A FALSE value will be returned if all of the primary key arguments
148 --   are null.
149 --
150 -- Prerequisites:
151 --   None.
152 --
153 -- In Parameters:
154 --
155 -- Post Success:
156 --   A value of TRUE will be returned indiciating that the g_old_rec
157 --   is current.
158 --   A value of FALSE will be returned if all of the primary key arguments
159 --   have a null value (this indicates that the row has not be inserted into
160 --   the Schema), and therefore could never have a corresponding row.
161 --
162 -- Post Failure:
163 --   A failure can only occur under two circumstances:
164 --   1) The primary key is invalid (i.e. a row does not exist for the
165 --      specified primary key values).
166 --   2) If an object_version_number exists but is NOT the same as the current
167 --      g_old_rec value.
168 --
169 -- Developer Implementation Notes:
170 --   None.
171 --
172 -- Access Status:
173 --   Internal Development Use Only.
174 --
175 -- {End Of Comments}
176 -- ----------------------------------------------------------------------------
177 Function api_updating
178   (p_person_deployment_id                 in     number
179   ,p_object_version_number                in     number
180   )      Return Boolean;
181 --
182 -- ----------------------------------------------------------------------------
183 -- |---------------------------------< lck >----------------------------------|
184 -- ----------------------------------------------------------------------------
185 -- {Start of comments}
186 --
187 -- Description:
188 --   The Lck process has two main functions to perform. Firstly, the row to be
189 --   updated or deleted must be locked. The locking of the row will only be
190 --   successful if the row is not currently locked by another user.
191 --   Secondly, during the locking of the row, the row is selected into
192 --   the g_old_rec data structure which enables the current row values from
193 --   the server to be available to the api.
194 --
195 -- Prerequisites:
196 --   When attempting to call the lock the object version number (if defined)
197 --   is mandatory.
198 --
199 -- In Parameters:
200 --   The arguments to the Lck process are the primary key(s) which uniquely
201 --   identify the row and the object version number of row.
202 --
203 -- Post Success:
204 --   On successful completion of the Lck process the row to be updated or
205 --   deleted will be locked and selected into the global data structure
206 --   g_old_rec.
207 --
208 -- Post Failure:
209 --   The Lck process can fail for three reasons:
210 --   1) When attempting to lock the row the row could already be locked by
211 --      another user. This will raise the HR_Api.Object_Locked exception.
212 --   2) The row which is required to be locked doesn't exist in the HR Schema.
213 --      This error is trapped and reported using the message name
214 --      'HR_7220_INVALID_PRIMARY_KEY'.
215 --   3) The row although existing in the HR Schema has a different object
216 --      version number than the object version number specified.
217 --      This error is trapped and reported using the message name
218 --      'HR_7155_OBJECT_INVALID'.
219 --
220 -- Developer Implementation Notes:
221 --   For each primary key and the object version number arguments add a
222 --   call to hr_api.mandatory_arg_error procedure to ensure that these
223 --   argument values are not null.
224 --
225 -- Access Status:
226 --   Internal Development Use Only.
227 --
228 -- {End of comments}
229 -- ----------------------------------------------------------------------------
230 Procedure lck
231   (p_person_deployment_id                 in     number
232   ,p_object_version_number                in     number
233   );
234 --
235 -- ----------------------------------------------------------------------------
236 -- |-----------------------------< convert_args >-----------------------------|
237 -- ----------------------------------------------------------------------------
238 -- {Start Of Comments}
239 --
240 -- Description:
241 --   This function is used to turn attribute parameters into the record
242 --   structure parameter g_rec_type.
243 --
244 -- Prerequisites:
245 --   This is a private function and can only be called from the ins or upd
246 --   attribute processes.
247 --
248 -- In Parameters:
249 --
250 -- Post Success:
251 --   A returning record structure will be returned.
252 --
253 -- Post Failure:
254 --   No direct error handling is required within this function.  Any possible
255 --   errors within this function will be a PL/SQL value error due to
256 --   conversion of datatypes or data lengths.
257 --
258 -- Developer Implementation Notes:
259 --   None.
260 --
261 -- Access Status:
262 --   Internal Row Handler Use Only.
263 --
264 -- {End Of Comments}
265 -- ----------------------------------------------------------------------------
266 Function convert_args
267   (p_person_deployment_id           in number
268   ,p_object_version_number          in number
269   ,p_from_business_group_id         in number
270   ,p_to_business_group_id           in number
271   ,p_from_person_id                 in number
272   ,p_to_person_id                   in number
273   ,p_person_type_id                 in number
274   ,p_start_date                     in date
275   ,p_end_date                       in date
276   ,p_deployment_reason              in varchar2
277   ,p_employee_number                in varchar2
278   ,p_leaving_reason                 in varchar2
279   ,p_leaving_person_type_id         in number
280   ,p_permanent                      in varchar2
281   ,p_status                         in varchar2
282   ,p_status_change_reason           in varchar2
283   ,p_status_change_date             in date
284   ,p_deplymt_policy_id              in number
285   ,p_organization_id                in number
286   ,p_location_id                    in number
287   ,p_job_id                         in number
288   ,p_position_id                    in number
289   ,p_grade_id                       in number
290   ,p_supervisor_id                  in number
291   ,p_supervisor_assignment_id       in number
292   ,p_retain_direct_reports          in varchar2
293   ,p_payroll_id                     in number
294   ,p_pay_basis_id                   in number
295   ,p_proposed_salary                in varchar2
296   ,p_people_group_id                in number
297   ,p_soft_coding_keyflex_id         in number
298   ,p_assignment_status_type_id      in number
299   ,p_ass_status_change_reason       in varchar2
300   ,p_assignment_category            in varchar2
301   ,p_per_information_category       in varchar2
302   ,p_per_information1               in varchar2
303   ,p_per_information2               in varchar2
304   ,p_per_information3               in varchar2
305   ,p_per_information4               in varchar2
306   ,p_per_information5               in varchar2
307   ,p_per_information6               in varchar2
308   ,p_per_information7               in varchar2
309   ,p_per_information8               in varchar2
310   ,p_per_information9               in varchar2
311   ,p_per_information10              in varchar2
312   ,p_per_information11              in varchar2
313   ,p_per_information12              in varchar2
314   ,p_per_information13              in varchar2
315   ,p_per_information14              in varchar2
316   ,p_per_information15              in varchar2
317   ,p_per_information16              in varchar2
318   ,p_per_information17              in varchar2
319   ,p_per_information18              in varchar2
320   ,p_per_information19              in varchar2
321   ,p_per_information20              in varchar2
322   ,p_per_information21              in varchar2
323   ,p_per_information22              in varchar2
324   ,p_per_information23              in varchar2
325   ,p_per_information24              in varchar2
326   ,p_per_information25              in varchar2
327   ,p_per_information26              in varchar2
328   ,p_per_information27              in varchar2
329   ,p_per_information28              in varchar2
330   ,p_per_information29              in varchar2
331   ,p_per_information30              in varchar2
332   )
333   Return g_rec_type;
334 --
335 end hr_pdt_shd;