DBA Data[Home] [Help]

PACKAGE: APPS.PER_PEM_SHD

Source


1 Package per_pem_shd as
2 /* $Header: pepemrhi.pkh 120.0.12010000.3 2008/08/06 09:22:15 ubhat ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (previous_employer_id            number(15)
10   ,business_group_id               number(15)
11   ,person_id                       number(15)
12   ,party_id                        number(15)
13   ,start_date                      date
14   ,end_date                        date
15   ,period_years                    number(9)         -- Increased length
16   ,period_days                     number(9)         -- Increased length
17   ,employer_name                   varchar2(240)
18   ,employer_country                varchar2(30)
19   ,employer_address                varchar2(4000)
20   ,employer_type                   varchar2(30)
21   ,employer_subtype                varchar2(30)
22   ,description                     varchar2(4000)
23   ,pem_attribute_category          varchar2(30)
24   ,pem_attribute1                  varchar2(150)
25   ,pem_attribute2                  varchar2(150)
26   ,pem_attribute3                  varchar2(150)
27   ,pem_attribute4                  varchar2(150)
28   ,pem_attribute5                  varchar2(150)
29   ,pem_attribute6                  varchar2(150)
30   ,pem_attribute7                  varchar2(150)
31   ,pem_attribute8                  varchar2(150)
32   ,pem_attribute9                  varchar2(150)
33   ,pem_attribute10                 varchar2(150)
34   ,pem_attribute11                 varchar2(150)
35   ,pem_attribute12                 varchar2(150)
36   ,pem_attribute13                 varchar2(150)
37   ,pem_attribute14                 varchar2(150)
38   ,pem_attribute15                 varchar2(150)
39   ,pem_attribute16                 varchar2(150)
40   ,pem_attribute17                 varchar2(150)
41   ,pem_attribute18                 varchar2(150)
42   ,pem_attribute19                 varchar2(150)
43   ,pem_attribute20                 varchar2(150)
44   ,pem_attribute21                 varchar2(150)
45   ,pem_attribute22                 varchar2(150)
46   ,pem_attribute23                 varchar2(150)
47   ,pem_attribute24                 varchar2(150)
48   ,pem_attribute25                 varchar2(150)
49   ,pem_attribute26                 varchar2(150)
50   ,pem_attribute27                 varchar2(150)
51   ,pem_attribute28                 varchar2(150)
52   ,pem_attribute29                 varchar2(150)
53   ,pem_attribute30                 varchar2(150)
54   ,pem_information_category        varchar2(30)
55   ,pem_information1                varchar2(150)
56   ,pem_information2                varchar2(150)
57   ,pem_information3                varchar2(150)
58   ,pem_information4                varchar2(150)
59   ,pem_information5                varchar2(150)
60   ,pem_information6                varchar2(150)
61   ,pem_information7                varchar2(150)
62   ,pem_information8                varchar2(150)
63   ,pem_information9                varchar2(150)
64   ,pem_information10               varchar2(150)
65   ,pem_information11               varchar2(150)
66   ,pem_information12               varchar2(150)
67   ,pem_information13               varchar2(150)
68   ,pem_information14               varchar2(150)
69   ,pem_information15               varchar2(150)
70   ,pem_information16               varchar2(150)
71   ,pem_information17               varchar2(150)
72   ,pem_information18               varchar2(150)
73   ,pem_information19               varchar2(150)
74   ,pem_information20               varchar2(150)
75   ,pem_information21               varchar2(150)
76   ,pem_information22               varchar2(150)
77   ,pem_information23               varchar2(150)
78   ,pem_information24               varchar2(150)
79   ,pem_information25               varchar2(150)
80   ,pem_information26               varchar2(150)
81   ,pem_information27               varchar2(150)
82   ,pem_information28               varchar2(150)
83   ,pem_information29               varchar2(150)
84   ,pem_information30               varchar2(150)
85   ,object_version_number           number(9)
86   ,all_assignments                 varchar2(9)       -- Increased length
87   ,period_months                   number(9)
88   );
89 --
90 -- ----------------------------------------------------------------------------
91 -- |           Global Definitions - Internal Development Use Only             |
92 -- ----------------------------------------------------------------------------
93 --
94 g_old_rec  g_rec_type;                            -- Global record definition
95 g_tab_nam  constant varchar2(30) := 'PER_PREVIOUS_EMPLOYERS';
96 --
97 -- ----------------------------------------------------------------------------
98 -- |---------------------------< constraint_error >---------------------------|
99 -- ----------------------------------------------------------------------------
100 -- {Start Of Comments}
101 --
102 -- Description:
103 --   This procedure is called when a constraint has been violated (i.e.
104 --   The exception hr_api.check_integrity_violated,
105 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
106 --   hr_api.unique_integrity_violated has been raised).
107 --   The exceptions can only be raised as follows:
108 --   1) A check constraint can only be violated during an INSERT or UPDATE
109 --      dml operation.
110 --   2) A parent integrity constraint can only be violated during an
111 --      INSERT or UPDATE dml operation.
112 --   3) A child integrity constraint can only be violated during an
113 --      DELETE dml operation.
114 --   4) A unique integrity constraint can only be violated during INSERT or
115 --      UPDATE dml operation.
116 --
117 -- Prerequisites:
118 --   1) Either 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 with the subsequent
121 --      stripping of the constraint name from the generated error message
122 --      text.
123 --   2) Standalone validation test which corresponds with a constraint error.
124 --
125 -- In Parameter:
126 --   p_constraint_name is in upper format and is just the constraint name
127 --   (e.g. not prefixed by brackets, schema owner etc).
128 --
129 -- Post Success:
130 --   Development dependant.
131 --
132 -- Post Failure:
133 --   Developement dependant.
134 --
135 -- Developer Implementation Notes:
136 --   For each constraint being checked the hr system package failure message
137 --   has been generated as a template only. These system error messages should
138 --   be modified as required (i.e. change the system failure message to a user
139 --   friendly defined error message).
140 --
141 -- Access Status:
142 --   Internal Development Use Only.
143 --
144 -- {End Of Comments}
145 -- ----------------------------------------------------------------------------
146 Procedure constraint_error
147   (p_constraint_name in all_constraints.constraint_name%TYPE);
148 --
149 -- ----------------------------------------------------------------------------
150 -- |-----------------------------< api_updating >-----------------------------|
151 -- ----------------------------------------------------------------------------
152 --  {Start Of Comments}
153 --
154 -- Description:
155 --   This function is used to populate the g_old_rec record with the
156 --   current row from the database for the specified primary key
157 --   provided that the primary key exists and is valid and does not
158 --   already match the current g_old_rec. The function will always return
159 --   a TRUE value if the g_old_rec is populated with the current row.
160 --   A FALSE value will be returned if all of the primary key arguments
161 --   are null.
162 --
163 -- Prerequisites:
164 --   None.
165 --
166 -- In Parameters:
167 --
168 -- Post Success:
169 --   A value of TRUE will be returned indiciating that the g_old_rec
170 --   is current.
171 --   A value of FALSE will be returned if all of the primary key arguments
172 --   have a null value (this indicates that the row has not be inserted into
173 --   the Schema), and therefore could never have a corresponding row.
174 --
175 -- Post Failure:
176 --   A failure can only occur under two circumstances:
177 --   1) The primary key is invalid (i.e. a row does not exist for the
178 --      specified primary key values).
179 --   2) If an object_version_number exists but is NOT the same as the current
180 --      g_old_rec value.
181 --
182 -- Developer Implementation Notes:
183 --   None.
184 --
185 -- Access Status:
186 --   Internal Development Use Only.
187 --
188 -- {End Of Comments}
189 -- ----------------------------------------------------------------------------
190 Function api_updating
191   (p_previous_employer_id                 in     number
192   ,p_object_version_number                in     number
193   )      Return Boolean;
194 --
195 -- ----------------------------------------------------------------------------
196 -- |---------------------------------< lck >----------------------------------|
197 -- ----------------------------------------------------------------------------
198 -- {Start of comments}
199 --
200 -- Description:
201 --   The Lck process has two main functions to perform. Firstly, the row to be
202 --   updated or deleted must be locked. The locking of the row will only be
203 --   successful if the row is not currently locked by another user.
204 --   Secondly, during the locking of the row, the row is selected into
205 --   the g_old_rec data structure which enables the current row values from
206 --   the server to be available to the api.
207 --
208 -- Prerequisites:
209 --   When attempting to call the lock the object version number (if defined)
210 --   is mandatory.
211 --
212 -- In Parameters:
213 --   The arguments to the Lck process are the primary key(s) which uniquely
214 --   identify the row and the object version number of row.
215 --
216 -- Post Success:
217 --   On successful completion of the Lck process the row to be updated or
218 --   deleted will be locked and selected into the global data structure
219 --   g_old_rec.
220 --
221 -- Post Failure:
222 --   The Lck process can fail for three reasons:
223 --   1) When attempting to lock the row the row could already be locked by
224 --      another user. This will raise the HR_Api.Object_Locked exception.
225 --   2) The row which is required to be locked doesn't exist in the HR Schema.
226 --      This error is trapped and reported using the message name
227 --      'HR_7220_INVALID_PRIMARY_KEY'.
228 --   3) The row although existing in the HR Schema has a different object
229 --      version number than the object version number specified.
230 --      This error is trapped and reported using the message name
231 --      'HR_7155_OBJECT_INVALID'.
232 --
233 -- Developer Implementation Notes:
234 --   For each primary key and the object version number arguments add a
235 --   call to hr_api.mandatory_arg_error procedure to ensure that these
236 --   argument values are not null.
237 --
238 -- Access Status:
239 --   Internal Development Use Only.
240 --
241 -- {End of comments}
242 -- ----------------------------------------------------------------------------
243 Procedure lck
244   (p_previous_employer_id                 in     number
245   ,p_object_version_number                in     number
246   );
247 --
248 -- ----------------------------------------------------------------------------
249 -- |-----------------------------< convert_args >-----------------------------|
250 -- ----------------------------------------------------------------------------
251 -- {Start Of Comments}
252 --
253 -- Description:
254 --   This function is used to turn attribute parameters into the record
255 --   structure parameter g_rec_type.
256 --
257 -- Prerequisites:
258 --   This is a private function and can only be called from the ins or upd
259 --   attribute processes.
260 --
261 -- In Parameters:
262 --
263 -- Post Success:
264 --   A returning record structure will be returned.
265 --
266 -- Post Failure:
267 --   No direct error handling is required within this function.  Any possible
268 --   errors within this function will be a PL/SQL value error due to
269 --   conversion of datatypes or data lengths.
270 --
271 -- Developer Implementation Notes:
272 --   None.
276 --
273 --
274 -- Access Status:
275 --   Internal Row Handler Use Only.
277 -- {End Of Comments}
278 -- ----------------------------------------------------------------------------
279 Function convert_args
280   (p_previous_employer_id           in number
281   ,p_business_group_id              in number
282   ,p_person_id                      in number
283   ,p_party_id                       in number
284   ,p_start_date                     in date
285   ,p_end_date                       in date
286   ,p_period_years                   in number
287   ,p_period_days                    in number
288   ,p_employer_name                  in varchar2
289   ,p_employer_country               in varchar2
290   ,p_employer_address               in varchar2
291   ,p_employer_type                  in varchar2
292   ,p_employer_subtype               in varchar2
293   ,p_description                    in varchar2
294   ,p_pem_attribute_category         in varchar2
295   ,p_pem_attribute1                 in varchar2
296   ,p_pem_attribute2                 in varchar2
297   ,p_pem_attribute3                 in varchar2
298   ,p_pem_attribute4                 in varchar2
299   ,p_pem_attribute5                 in varchar2
300   ,p_pem_attribute6                 in varchar2
301   ,p_pem_attribute7                 in varchar2
302   ,p_pem_attribute8                 in varchar2
303   ,p_pem_attribute9                 in varchar2
304   ,p_pem_attribute10                in varchar2
305   ,p_pem_attribute11                in varchar2
306   ,p_pem_attribute12                in varchar2
307   ,p_pem_attribute13                in varchar2
308   ,p_pem_attribute14                in varchar2
309   ,p_pem_attribute15                in varchar2
310   ,p_pem_attribute16                in varchar2
311   ,p_pem_attribute17                in varchar2
312   ,p_pem_attribute18                in varchar2
313   ,p_pem_attribute19                in varchar2
314   ,p_pem_attribute20                in varchar2
315   ,p_pem_attribute21                in varchar2
316   ,p_pem_attribute22                in varchar2
317   ,p_pem_attribute23                in varchar2
318   ,p_pem_attribute24                in varchar2
319   ,p_pem_attribute25                in varchar2
320   ,p_pem_attribute26                in varchar2
321   ,p_pem_attribute27                in varchar2
322   ,p_pem_attribute28                in varchar2
323   ,p_pem_attribute29                in varchar2
324   ,p_pem_attribute30                in varchar2
325   ,p_pem_information_category       in varchar2
326   ,p_pem_information1               in varchar2
327   ,p_pem_information2               in varchar2
328   ,p_pem_information3               in varchar2
329   ,p_pem_information4               in varchar2
330   ,p_pem_information5               in varchar2
331   ,p_pem_information6               in varchar2
332   ,p_pem_information7               in varchar2
333   ,p_pem_information8               in varchar2
334   ,p_pem_information9               in varchar2
335   ,p_pem_information10              in varchar2
336   ,p_pem_information11              in varchar2
337   ,p_pem_information12              in varchar2
338   ,p_pem_information13              in varchar2
339   ,p_pem_information14              in varchar2
340   ,p_pem_information15              in varchar2
341   ,p_pem_information16              in varchar2
342   ,p_pem_information17              in varchar2
343   ,p_pem_information18              in varchar2
344   ,p_pem_information19              in varchar2
345   ,p_pem_information20              in varchar2
346   ,p_pem_information21              in varchar2
347   ,p_pem_information22              in varchar2
348   ,p_pem_information23              in varchar2
349   ,p_pem_information24              in varchar2
350   ,p_pem_information25              in varchar2
351   ,p_pem_information26              in varchar2
352   ,p_pem_information27              in varchar2
353   ,p_pem_information28              in varchar2
354   ,p_pem_information29              in varchar2
355   ,p_pem_information30              in varchar2
356   ,p_object_version_number          in number
357   ,p_all_assignments                in varchar2
358   ,p_period_months                  in number
359   )
360   Return g_rec_type;
361 --
362 end per_pem_shd;