DBA Data[Home] [Help]

PACKAGE: APPS.IRC_IOF_SHD

Source


1 Package irc_iof_shd AUTHID CURRENT_USER as
2 /* $Header: iriofrhi.pkh 120.2 2011/01/24 12:14:46 amikukum ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (offer_id                        number(15)
10   ,offer_version                   number(15)
11   ,latest_offer                    varchar2(30)
12   ,offer_status                    varchar2(30)
13   ,discretionary_job_title         varchar2(240)
14   ,offer_extended_method           varchar2(30)
15   ,respondent_id                   number(15)
16   ,expiry_date                     date
17   ,proposed_start_date             date
18   ,offer_letter_tracking_code      varchar2(240)
19   ,offer_postal_service            varchar2(30)
20   ,offer_shipping_date             date
21   ,vacancy_id                      number(15)
22   ,applicant_assignment_id         number(15)
23   ,offer_assignment_id             number(15)
24   ,address_id                      number(15)
25   ,template_id                     number(15)
26   ,offer_letter_file_type          varchar2(30)
27   ,offer_letter_file_name          varchar2(240)
28   ,attribute_category              varchar2(30)
29   ,attribute1                      varchar2(150)
30   ,attribute2                      varchar2(150)
31   ,attribute3                      varchar2(150)
32   ,attribute4                      varchar2(150)
33   ,attribute5                      varchar2(150)
34   ,attribute6                      varchar2(150)
35   ,attribute7                      varchar2(150)
36   ,attribute8                      varchar2(150)
37   ,attribute9                      varchar2(150)
38   ,attribute10                     varchar2(150)
39   ,attribute11                     varchar2(150)
40   ,attribute12                     varchar2(150)
41   ,attribute13                     varchar2(150)
42   ,attribute14                     varchar2(150)
43   ,attribute15                     varchar2(150)
44   ,attribute16                     varchar2(150)
45   ,attribute17                     varchar2(150)
46   ,attribute18                     varchar2(150)
47   ,attribute19                     varchar2(150)
48   ,attribute20                     varchar2(150)
49   ,attribute21                     varchar2(150)
50   ,attribute22                     varchar2(150)
51   ,attribute23                     varchar2(150)
52   ,attribute24                     varchar2(150)
53   ,attribute25                     varchar2(150)
54   ,attribute26                     varchar2(150)
55   ,attribute27                     varchar2(150)
56   ,attribute28                     varchar2(150)
57   ,attribute29                     varchar2(150)
58   ,attribute30                     varchar2(150)
59   ,object_version_number           number(9)
60   );
61 --
62 -- ----------------------------------------------------------------------------
63 -- |           Global Definitions - Internal Development Use Only             |
64 -- ----------------------------------------------------------------------------
65 --
66 g_old_rec  g_rec_type;                            -- Global record definition
67 -- Global table name
68 g_tab_name  constant varchar2(30) := 'IRC_OFFERS';
69 --
70 -- ----------------------------------------------------------------------------
71 -- |---------------------------< constraint_error >---------------------------|
72 -- ----------------------------------------------------------------------------
73 -- {Start Of Comments}
74 --
75 -- Description:
76 --   This procedure is called when a constraint has been violated (i.e.
77 --   The exception hr_api.check_integrity_violated,
78 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
79 --   hr_api.unique_integrity_violated has been raised).
80 --   The exceptions can only be raised as follows:
81 --   1) A check constraint can only be violated during an INSERT or UPDATE
82 --      dml operation.
83 --   2) A parent integrity constraint can only be violated during an
84 --      INSERT or UPDATE dml operation.
85 --   3) A child integrity constraint can only be violated during an
86 --      DELETE dml operation.
87 --   4) A unique integrity constraint can only be violated during INSERT or
88 --      UPDATE dml operation.
89 --
90 -- Prerequisites:
91 --   1) Either 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 with the subsequent
94 --      stripping of the constraint name from the generated error message
95 --      text.
96 --   2) Standalone validation test which corresponds with a constraint error.
97 --
98 -- In Parameter:
99 --   p_constraint_name is in upper format and is just the constraint name
100 --   (e.g. not prefixed by brackets, schema owner etc).
101 --
102 -- Post Success:
103 --   Development dependant.
104 --
105 -- Post Failure:
106 --   Developement dependant.
107 --
108 -- Developer Implementation Notes:
109 --   For each constraint being checked the hr system package failure message
110 --   has been generated as a template only. These system error messages should
111 --   be modified as required (i.e. change the system failure message to a user
112 --   friendly defined error message).
113 --
114 -- Access Status:
115 --   Internal Development Use Only.
116 --
117 -- {End Of Comments}
118 -- ----------------------------------------------------------------------------
119 Procedure constraint_error
120   (p_constraint_name in all_constraints.constraint_name%TYPE);
121 --
122 -- ----------------------------------------------------------------------------
123 -- |-----------------------------< api_updating >-----------------------------|
124 -- ----------------------------------------------------------------------------
125 --  {Start Of Comments}
126 --
127 -- Description:
128 --   This function is used to populate the g_old_rec record with the
129 --   current row from the database for the specified primary key
130 --   provided that the primary key exists and is valid and does not
131 --   already match the current g_old_rec. The function will always return
132 --   a TRUE value if the g_old_rec is populated with the current row.
133 --   A FALSE value will be returned if all of the primary key arguments
134 --   are null.
135 --
136 -- Prerequisites:
137 --   None.
138 --
139 -- In Parameters:
140 --
141 -- Post Success:
142 --   A value of TRUE will be returned indiciating that the g_old_rec
143 --   is current.
144 --   A value of FALSE will be returned if all of the primary key arguments
145 --   have a null value (this indicates that the row has not be inserted into
146 --   the Schema), and therefore could never have a corresponding row.
147 --
148 -- Post Failure:
149 --   A failure can only occur under two circumstances:
150 --   1) The primary key is invalid (i.e. a row does not exist for the
151 --      specified primary key values).
152 --   2) If an object_version_number exists but is NOT the same as the current
153 --      g_old_rec value.
154 --
155 -- Developer Implementation Notes:
156 --   None.
157 --
158 -- Access Status:
159 --   Internal Development Use Only.
160 --
161 -- {End Of Comments}
162 -- ----------------------------------------------------------------------------
163 Function api_updating
164   (p_offer_id                             in     number
165   ,p_object_version_number                in     number
166   )      Return Boolean;
167 --
168 -- ----------------------------------------------------------------------------
169 -- |---------------------------------< lck >----------------------------------|
170 -- ----------------------------------------------------------------------------
171 -- {Start of comments}
172 --
173 -- Description:
174 --   The Lck process has two main functions to perform. Firstly, the row to be
175 --   updated or deleted must be locked. The locking of the row will only be
176 --   successful if the row is not currently locked by another user.
177 --   Secondly, during the locking of the row, the row is selected into
178 --   the g_old_rec data structure which enables the current row values from
179 --   the server to be available to the api.
180 --
181 -- Prerequisites:
182 --   When attempting to call the lock the object version number (if defined)
183 --   is mandatory.
184 --
185 -- In Parameters:
186 --   The arguments to the Lck process are the primary key(s) which uniquely
187 --   identify the row and the object version number of row.
188 --
189 -- Post Success:
190 --   On successful completion of the Lck process the row to be updated or
191 --   deleted will be locked and selected into the global data structure
192 --   g_old_rec.
193 --
194 -- Post Failure:
195 --   The Lck process can fail for three reasons:
196 --   1) When attempting to lock the row the row could already be locked by
197 --      another user. This will raise the HR_Api.Object_Locked exception.
198 --   2) The row which is required to be locked doesn't exist in the HR Schema.
199 --      This error is trapped and reported using the message name
200 --      'HR_7220_INVALID_PRIMARY_KEY'.
201 --   3) The row although existing in the HR Schema has a different object
202 --      version number than the object version number specified.
203 --      This error is trapped and reported using the message name
204 --      'HR_7155_OBJECT_INVALID'.
205 --
206 -- Developer Implementation Notes:
207 --   For each primary key and the object version number arguments add a
208 --   call to hr_api.mandatory_arg_error procedure to ensure that these
209 --   argument values are not null.
210 --
211 -- Access Status:
212 --   Internal Development Use Only.
213 --
214 -- {End of comments}
215 -- ----------------------------------------------------------------------------
216 Procedure lck
217   (p_offer_id                             in     number
218   ,p_object_version_number                in     number
219   );
220 --
221 -- ----------------------------------------------------------------------------
222 -- |-----------------------------< convert_args >-----------------------------|
223 -- ----------------------------------------------------------------------------
224 -- {Start Of Comments}
225 --
226 -- Description:
227 --   This function is used to turn attribute parameters into the record
228 --   structure parameter g_rec_type.
229 --
230 -- Prerequisites:
231 --   This is a private function and can only be called from the ins or upd
232 --   attribute processes.
233 --
234 -- In Parameters:
235 --
236 -- Post Success:
237 --   A returning record structure will be returned.
238 --
239 -- Post Failure:
240 --   No direct error handling is required within this function.  Any possible
241 --   errors within this function will be a PL/SQL value error due to
242 --   conversion of datatypes or data lengths.
243 --
244 -- Developer Implementation Notes:
245 --   None.
246 --
247 -- Access Status:
248 --   Internal Row Handler Use Only.
249 --
250 -- {End Of Comments}
251 -- ----------------------------------------------------------------------------
252 Function convert_args
253   (p_offer_id                       in number
254   ,p_offer_version                  in number
255   ,p_latest_offer                   in varchar2
256   ,p_offer_status                   in varchar2
257   ,p_discretionary_job_title        in varchar2
258   ,p_offer_extended_method          in varchar2
259   ,p_respondent_id                  in number
260   ,p_expiry_date                    in date
261   ,p_proposed_start_date            in date
262   ,p_offer_letter_tracking_code     in varchar2
263   ,p_offer_postal_service           in varchar2
264   ,p_offer_shipping_date            in date
265   ,p_vacancy_id                     in number
266   ,p_applicant_assignment_id        in number
267   ,p_offer_assignment_id            in number
268   ,p_address_id                     in number
269   ,p_template_id                    in number
270   ,p_offer_letter_file_type         in varchar2
271   ,p_offer_letter_file_name         in varchar2
272   ,p_attribute_category             in varchar2
273   ,p_attribute1                     in varchar2
274   ,p_attribute2                     in varchar2
275   ,p_attribute3                     in varchar2
276   ,p_attribute4                     in varchar2
277   ,p_attribute5                     in varchar2
278   ,p_attribute6                     in varchar2
279   ,p_attribute7                     in varchar2
280   ,p_attribute8                     in varchar2
281   ,p_attribute9                     in varchar2
282   ,p_attribute10                    in varchar2
283   ,p_attribute11                    in varchar2
284   ,p_attribute12                    in varchar2
285   ,p_attribute13                    in varchar2
286   ,p_attribute14                    in varchar2
287   ,p_attribute15                    in varchar2
288   ,p_attribute16                    in varchar2
289   ,p_attribute17                    in varchar2
290   ,p_attribute18                    in varchar2
291   ,p_attribute19                    in varchar2
292   ,p_attribute20                    in varchar2
293   ,p_attribute21                    in varchar2
294   ,p_attribute22                    in varchar2
295   ,p_attribute23                    in varchar2
296   ,p_attribute24                    in varchar2
297   ,p_attribute25                    in varchar2
298   ,p_attribute26                    in varchar2
299   ,p_attribute27                    in varchar2
300   ,p_attribute28                    in varchar2
301   ,p_attribute29                    in varchar2
302   ,p_attribute30                    in varchar2
303   ,p_object_version_number          in number
304   )
305   Return g_rec_type;
306 --
307 --
308 -- ----------------------------------------------------------------------------
309 -- |------------------------------< blob_dml >--------------------------------|
310 -- ----------------------------------------------------------------------------
311 -- {Start Of Comments}
312 --
313 -- Description:
314 --   This function is used upload the offer letter blob into an offer record.
315 --
316 -- Prerequisites:
317 --   None
318 --
319 -- In Parameters:
320 --
321 -- Post Success:
322 --   The offer letter will be uploaded into the offer record.
323 --
324 -- Post Failure:
325 --   None
326 --
327 -- Developer Implementation Notes:
328 --   None.
329 --
330 -- Access Status:
331 --   Public
332 --
333 -- {End Of Comments}
334 -- ----------------------------------------------------------------------------
335 Procedure blob_dml
336   (p_offer_letter          in  irc_offers.offer_letter%TYPE
337   ,p_offer_id              in  irc_offers.offer_id%TYPE
338   ,p_object_version_number in  irc_offers.object_version_number%TYPE
339   );
340 --
341 --
342 end irc_iof_shd;