DBA Data[Home] [Help]

PACKAGE: APPS.IRC_IAV_SHD

Source


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