DBA Data[Home] [Help]

PACKAGE: APPS.PER_PJO_SHD

Source


1 Package per_pjo_shd AUTHID CURRENT_USER as
2 /* $Header: pepjorhi.pkh 120.1 2008/07/08 13:07:49 brsinha noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (previous_job_id                 number(15)
10   ,previous_employer_id            number(15)
11   ,start_date                      date
12   ,end_date                        date
13   ,period_years                    number(9)         -- Increased length
14   ,period_days                     number(9)         -- Increased length
15   ,job_name                        varchar2(240)
16   ,employment_category             varchar2(30)
17   ,description                     varchar2(4000)
18   ,pjo_attribute_category          varchar2(30)
19   ,pjo_attribute1                  varchar2(150)
20   ,pjo_attribute2                  varchar2(150)
21   ,pjo_attribute3                  varchar2(150)
22   ,pjo_attribute4                  varchar2(150)
23   ,pjo_attribute5                  varchar2(150)
24   ,pjo_attribute6                  varchar2(150)
25   ,pjo_attribute7                  varchar2(150)
26   ,pjo_attribute8                  varchar2(150)
27   ,pjo_attribute9                  varchar2(150)
28   ,pjo_attribute10                 varchar2(150)
29   ,pjo_attribute11                 varchar2(150)
30   ,pjo_attribute12                 varchar2(150)
31   ,pjo_attribute13                 varchar2(150)
32   ,pjo_attribute14                 varchar2(150)
33   ,pjo_attribute15                 varchar2(150)
34   ,pjo_attribute16                 varchar2(150)
35   ,pjo_attribute17                 varchar2(150)
36   ,pjo_attribute18                 varchar2(150)
37   ,pjo_attribute19                 varchar2(150)
38   ,pjo_attribute20                 varchar2(150)
39   ,pjo_attribute21                 varchar2(150)
40   ,pjo_attribute22                 varchar2(150)
41   ,pjo_attribute23                 varchar2(150)
42   ,pjo_attribute24                 varchar2(150)
43   ,pjo_attribute25                 varchar2(150)
44   ,pjo_attribute26                 varchar2(150)
45   ,pjo_attribute27                 varchar2(150)
46   ,pjo_attribute28                 varchar2(150)
47   ,pjo_attribute29                 varchar2(150)
48   ,pjo_attribute30                 varchar2(150)
49   ,pjo_information_category        varchar2(30)
50   ,pjo_information1                varchar2(150)
51   ,pjo_information2                varchar2(150)
52   ,pjo_information3                varchar2(150)
53   ,pjo_information4                varchar2(150)
54   ,pjo_information5                varchar2(150)
55   ,pjo_information6                varchar2(150)
56   ,pjo_information7                varchar2(150)
57   ,pjo_information8                varchar2(150)
58   ,pjo_information9                varchar2(150)
59   ,pjo_information10               varchar2(150)
60   ,pjo_information11               varchar2(150)
61   ,pjo_information12               varchar2(150)
62   ,pjo_information13               varchar2(150)
63   ,pjo_information14               varchar2(150)
64   ,pjo_information15               varchar2(150)
65   ,pjo_information16               varchar2(150)
66   ,pjo_information17               varchar2(150)
67   ,pjo_information18               varchar2(150)
68   ,pjo_information19               varchar2(150)
69   ,pjo_information20               varchar2(150)
70   ,pjo_information21               varchar2(150)
71   ,pjo_information22               varchar2(150)
72   ,pjo_information23               varchar2(150)
73   ,pjo_information24               varchar2(150)
74   ,pjo_information25               varchar2(150)
75   ,pjo_information26               varchar2(150)
76   ,pjo_information27               varchar2(150)
77   ,pjo_information28               varchar2(150)
78   ,pjo_information29               varchar2(150)
79   ,pjo_information30               varchar2(150)
80   ,object_version_number           number(9)
81   ,all_assignments                 varchar2(9)       -- Increased length
82   ,period_months                   number(9)
83   );
84 --
85 -- ----------------------------------------------------------------------------
86 -- |           Global Definitions - Internal Development Use Only             |
87 -- ----------------------------------------------------------------------------
88 --
89 g_old_rec  g_rec_type;                            -- Global record definition
90 g_tab_nam  constant varchar2(30) := 'PER_PREVIOUS_JOBS';
91 --
92 -- ----------------------------------------------------------------------------
93 -- |---------------------------< constraint_error >---------------------------|
94 -- ----------------------------------------------------------------------------
95 -- {Start Of Comments}
96 --
97 -- Description:
98 --   This procedure is called when a constraint has been violated (i.e.
99 --   The exception hr_api.check_integrity_violated,
100 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
101 --   hr_api.unique_integrity_violated has been raised).
102 --   The exceptions can only be raised as follows:
103 --   1) A check constraint can only be violated during an INSERT or UPDATE
104 --      dml operation.
105 --   2) A parent integrity constraint can only be violated during an
106 --      INSERT or UPDATE dml operation.
107 --   3) A child integrity constraint can only be violated during an
108 --      DELETE dml operation.
109 --   4) A unique integrity constraint can only be violated during INSERT or
110 --      UPDATE dml operation.
111 --
112 -- Prerequisites:
113 --   1) Either hr_api.check_integrity_violated,
114 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
115 --      hr_api.unique_integrity_violated has been raised with the subsequent
116 --      stripping of the constraint name from the generated error message
117 --      text.
118 --   2) Standalone validation test which corresponds with a constraint error.
119 --
120 -- In Parameter:
121 --   p_constraint_name is in upper format and is just the constraint name
122 --   (e.g. not prefixed by brackets, schema owner etc).
123 --
124 -- Post Success:
125 --   Development dependant.
126 --
127 -- Post Failure:
128 --   Developement dependant.
129 --
130 -- Developer Implementation Notes:
131 --   For each constraint being checked the hr system package failure message
132 --   has been generated as a template only. These system error messages should
133 --   be modified as required (i.e. change the system failure message to a user
134 --   friendly defined error message).
135 --
136 -- Access Status:
137 --   Internal Development Use Only.
138 --
139 -- {End Of Comments}
140 -- ----------------------------------------------------------------------------
141 Procedure constraint_error
142   (p_constraint_name in all_constraints.constraint_name%TYPE);
143 --
144 -- ----------------------------------------------------------------------------
145 -- |-----------------------------< api_updating >-----------------------------|
146 -- ----------------------------------------------------------------------------
147 --  {Start Of Comments}
148 --
149 -- Description:
150 --   This function is used to populate the g_old_rec record with the
151 --   current row from the database for the specified primary key
152 --   provided that the primary key exists and is valid and does not
153 --   already match the current g_old_rec. The function will always return
154 --   a TRUE value if the g_old_rec is populated with the current row.
155 --   A FALSE value will be returned if all of the primary key arguments
156 --   are null.
157 --
158 -- Prerequisites:
159 --   None.
160 --
161 -- In Parameters:
162 --
163 -- Post Success:
164 --   A value of TRUE will be returned indiciating that the g_old_rec
165 --   is current.
166 --   A value of FALSE will be returned if all of the primary key arguments
167 --   have a null value (this indicates that the row has not be inserted into
168 --   the Schema), and therefore could never have a corresponding row.
169 --
170 -- Post Failure:
171 --   A failure can only occur under two circumstances:
172 --   1) The primary key is invalid (i.e. a row does not exist for the
173 --      specified primary key values).
174 --   2) If an object_version_number exists but is NOT the same as the current
175 --      g_old_rec value.
176 --
177 -- Developer Implementation Notes:
178 --   None.
179 --
180 -- Access Status:
181 --   Internal Development Use Only.
182 --
183 -- {End Of Comments}
184 -- ----------------------------------------------------------------------------
185 Function api_updating
186   (p_previous_job_id                      in     number
187   ,p_object_version_number                in     number
188   )      Return Boolean;
189 --
190 -- ----------------------------------------------------------------------------
191 -- |---------------------------------< lck >----------------------------------|
192 -- ----------------------------------------------------------------------------
193 -- {Start of comments}
194 --
195 -- Description:
196 --   The Lck process has two main functions to perform. Firstly, the row to be
197 --   updated or deleted must be locked. The locking of the row will only be
198 --   successful if the row is not currently locked by another user.
199 --   Secondly, during the locking of the row, the row is selected into
200 --   the g_old_rec data structure which enables the current row values from
201 --   the server to be available to the api.
202 --
203 -- Prerequisites:
204 --   When attempting to call the lock the object version number (if defined)
205 --   is mandatory.
206 --
207 -- In Parameters:
208 --   The arguments to the Lck process are the primary key(s) which uniquely
209 --   identify the row and the object version number of row.
210 --
211 -- Post Success:
212 --   On successful completion of the Lck process the row to be updated or
213 --   deleted will be locked and selected into the global data structure
214 --   g_old_rec.
215 --
216 -- Post Failure:
217 --   The Lck process can fail for three reasons:
218 --   1) When attempting to lock the row the row could already be locked by
219 --      another user. This will raise the HR_Api.Object_Locked exception.
220 --   2) The row which is required to be locked doesn't exist in the HR Schema.
221 --      This error is trapped and reported using the message name
222 --      'HR_7220_INVALID_PRIMARY_KEY'.
223 --   3) The row although existing in the HR Schema has a different object
224 --      version number than the object version number specified.
225 --      This error is trapped and reported using the message name
226 --      'HR_7155_OBJECT_INVALID'.
227 --
228 -- Developer Implementation Notes:
229 --   For each primary key and the object version number arguments add a
230 --   call to hr_api.mandatory_arg_error procedure to ensure that these
231 --   argument values are not null.
232 --
233 -- Access Status:
234 --   Internal Development Use Only.
235 --
236 -- {End of comments}
237 -- ----------------------------------------------------------------------------
238 Procedure lck
239   (p_previous_job_id                      in     number
240   ,p_object_version_number                in     number
241   );
242 --
243 -- ----------------------------------------------------------------------------
244 -- |-----------------------------< convert_args >-----------------------------|
245 -- ----------------------------------------------------------------------------
246 -- {Start Of Comments}
247 --
248 -- Description:
249 --   This function is used to turn attribute parameters into the record
250 --   structure parameter g_rec_type.
251 --
252 -- Prerequisites:
253 --   This is a private function and can only be called from the ins or upd
254 --   attribute processes.
255 --
256 -- In Parameters:
257 --
258 -- Post Success:
259 --   A returning record structure will be returned.
260 --
261 -- Post Failure:
262 --   No direct error handling is required within this function.  Any possible
263 --   errors within this function will be a PL/SQL value error due to
264 --   conversion of datatypes or data lengths.
265 --
266 -- Developer Implementation Notes:
267 --   None.
268 --
269 -- Access Status:
270 --   Internal Row Handler Use Only.
271 --
272 -- {End Of Comments}
273 -- ----------------------------------------------------------------------------
274 Function convert_args
275   (p_previous_job_id                in number
276   ,p_previous_employer_id           in number
277   ,p_start_date                     in date
278   ,p_end_date                       in date
279   ,p_period_years                   in number
280   ,p_period_days                    in number
281   ,p_job_name                       in varchar2
282   ,p_employment_category            in varchar2
283   ,p_description                    in varchar2
284   ,p_pjo_attribute_category         in varchar2
285   ,p_pjo_attribute1                 in varchar2
286   ,p_pjo_attribute2                 in varchar2
287   ,p_pjo_attribute3                 in varchar2
288   ,p_pjo_attribute4                 in varchar2
289   ,p_pjo_attribute5                 in varchar2
290   ,p_pjo_attribute6                 in varchar2
291   ,p_pjo_attribute7                 in varchar2
292   ,p_pjo_attribute8                 in varchar2
293   ,p_pjo_attribute9                 in varchar2
294   ,p_pjo_attribute10                in varchar2
295   ,p_pjo_attribute11                in varchar2
296   ,p_pjo_attribute12                in varchar2
297   ,p_pjo_attribute13                in varchar2
298   ,p_pjo_attribute14                in varchar2
299   ,p_pjo_attribute15                in varchar2
300   ,p_pjo_attribute16                in varchar2
301   ,p_pjo_attribute17                in varchar2
302   ,p_pjo_attribute18                in varchar2
303   ,p_pjo_attribute19                in varchar2
304   ,p_pjo_attribute20                in varchar2
305   ,p_pjo_attribute21                in varchar2
306   ,p_pjo_attribute22                in varchar2
307   ,p_pjo_attribute23                in varchar2
308   ,p_pjo_attribute24                in varchar2
309   ,p_pjo_attribute25                in varchar2
310   ,p_pjo_attribute26                in varchar2
311   ,p_pjo_attribute27                in varchar2
312   ,p_pjo_attribute28                in varchar2
313   ,p_pjo_attribute29                in varchar2
314   ,p_pjo_attribute30                in varchar2
315   ,p_pjo_information_category       in varchar2
316   ,p_pjo_information1               in varchar2
317   ,p_pjo_information2               in varchar2
318   ,p_pjo_information3               in varchar2
319   ,p_pjo_information4               in varchar2
320   ,p_pjo_information5               in varchar2
321   ,p_pjo_information6               in varchar2
322   ,p_pjo_information7               in varchar2
323   ,p_pjo_information8               in varchar2
324   ,p_pjo_information9               in varchar2
325   ,p_pjo_information10              in varchar2
326   ,p_pjo_information11              in varchar2
327   ,p_pjo_information12              in varchar2
328   ,p_pjo_information13              in varchar2
329   ,p_pjo_information14              in varchar2
330   ,p_pjo_information15              in varchar2
331   ,p_pjo_information16              in varchar2
332   ,p_pjo_information17              in varchar2
333   ,p_pjo_information18              in varchar2
334   ,p_pjo_information19              in varchar2
335   ,p_pjo_information20              in varchar2
336   ,p_pjo_information21              in varchar2
337   ,p_pjo_information22              in varchar2
338   ,p_pjo_information23              in varchar2
339   ,p_pjo_information24              in varchar2
340   ,p_pjo_information25              in varchar2
341   ,p_pjo_information26              in varchar2
342   ,p_pjo_information27              in varchar2
343   ,p_pjo_information28              in varchar2
344   ,p_pjo_information29              in varchar2
345   ,p_pjo_information30              in varchar2
346   ,p_object_version_number          in number
347   ,p_all_assignments                in varchar2
348   ,p_period_months                  in number
349   )
350   Return g_rec_type;
351 --
352 end per_pjo_shd;