DBA Data[Home] [Help]

PACKAGE: APPS.PER_JOB_SHD

Source


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