DBA Data[Home] [Help]

PACKAGE: APPS.IRC_INP_SHD

Source


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