DBA Data[Home] [Help]

PACKAGE: APPS.IRC_IDT_SHD

Source


1 Package irc_idt_shd as
2 /* $Header: iridtrhi.pkh 120.0 2005/07/26 15:07:32 mbocutt noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (default_posting_id              number(15)
10   ,language                        varchar2(9)       -- Increased length
11   ,source_language                 varchar2(9)       -- Increased length
12   ,org_name                        varchar2(240)
13   ,org_description_c               clob
14   ,org_description                 varchar2(32767)
15   ,job_title                       varchar2(240)
16   ,brief_description_c             clob
17   ,brief_description               varchar2(32767)
18   ,detailed_description_c          clob
19   ,detailed_description            varchar2(32767)
20   ,job_requirements_c              clob
21   ,job_requirements                varchar2(32767)
22   ,additional_details_c            clob
23   ,additional_details              varchar2(32767)
24   ,how_to_apply_c                  clob
25   ,how_to_apply                    varchar2(32767)
26   ,image_url_c                     clob
27   ,image_url                       varchar2(32767)
28   ,image_url_alt_c                 clob
29   ,image_url_alt                   varchar2(32767)
30   );
31 --
32 -- ----------------------------------------------------------------------------
33 -- |           Global Definitions - Internal Development Use Only             |
34 -- ----------------------------------------------------------------------------
35 --
36 g_old_rec  g_rec_type;                            -- Global record definition
37 --
38 g_org_description_upd boolean default false;
39 g_brief_description_upd boolean default false;
40 g_detailed_description_upd boolean default false;
41 g_job_requirements_upd boolean default false;
42 g_additional_details_upd boolean default false;
43 g_how_to_apply_upd boolean default false;
44 g_image_url_upd boolean default false;
45 g_image_url_alt_upd boolean default false;
46 --
47 -- ----------------------------------------------------------------------------
48 -- |---------------------------< constraint_error >---------------------------|
49 -- ----------------------------------------------------------------------------
50 -- {Start Of Comments}
51 --
52 -- Description:
53 --   This procedure is called when a constraint has been violated (i.e.
54 --   The exception hr_api.check_integrity_violated,
55 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
56 --   hr_api.unique_integrity_violated has been raised).
57 --   The exceptions can only be raised as follows:
58 --   1) A check constraint can only be violated during an INSERT or UPDATE
59 --      dml operation.
60 --   2) A parent integrity constraint can only be violated during an
61 --      INSERT or UPDATE dml operation.
62 --   3) A child integrity constraint can only be violated during an
63 --      DELETE dml operation.
64 --   4) A unique integrity constraint can only be violated during INSERT or
65 --      UPDATE dml operation.
66 --
67 -- Prerequisites:
68 --   1) Either hr_api.check_integrity_violated,
69 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
70 --      hr_api.unique_integrity_violated has been raised with the subsequent
71 --      stripping of the constraint name from the generated error message
72 --      text.
73 --   2) Standalone validation test which corresponds with a constraint error.
74 --
75 -- In Parameter:
76 --   p_constraint_name is in upper format and is just the constraint name
77 --   (e.g. not prefixed by brackets, schema owner etc).
78 --
79 -- Post Success:
80 --   Development dependant.
81 --
82 -- Post Failure:
83 --   Developement dependant.
84 --
85 -- Developer Implementation Notes:
86 --   For each constraint being checked the hr system package failure message
87 --   has been generated as a template only. These system error messages should
88 --   be modified as required (i.e. change the system failure message to a user
89 --   friendly defined error message).
90 --
91 -- Access Status:
92 --   Internal Development Use Only.
93 --
94 -- {End Of Comments}
95 -- ----------------------------------------------------------------------------
96 Procedure constraint_error
97   (p_constraint_name in all_constraints.constraint_name%TYPE);
98 --
99 -- ----------------------------------------------------------------------------
100 -- |-----------------------------< api_updating >-----------------------------|
101 -- ----------------------------------------------------------------------------
102 --  {Start Of Comments}
103 --
104 -- Description:
105 --   This function is used to populate the g_old_rec record with the
106 --   current row from the database for the specified primary key
107 --   provided that the primary key exists and is valid and does not
108 --   already match the current g_old_rec. The function will always return
109 --   a TRUE value if the g_old_rec is populated with the current row.
110 --   A FALSE value will be returned if all of the primary key arguments
111 --   are null.
112 --
113 -- Prerequisites:
114 --   None.
115 --
116 -- In Parameters:
117 --
118 -- Post Success:
119 --   A value of TRUE will be returned indiciating that the g_old_rec
120 --   is current.
121 --   A value of FALSE will be returned if all of the primary key arguments
122 --   have a null value (this indicates that the row has not be inserted into
123 --   the Schema), and therefore could never have a corresponding row.
124 --
125 -- Post Failure:
126 --   A failure can only occur under two circumstances:
127 --   1) The primary key is invalid (i.e. a row does not exist for the
128 --      specified primary key values).
129 --   2) If an object_version_number exists but is NOT the same as the current
130 --      g_old_rec value.
131 --
132 -- Developer Implementation Notes:
133 --   None.
134 --
135 -- Access Status:
136 --   Internal Development Use Only.
137 --
138 -- {End Of Comments}
139 -- ----------------------------------------------------------------------------
140 Function api_updating
141   (p_default_posting_id                   in     number
142   ,p_language                             in     varchar2
143   )      Return Boolean;
144 --
145 -- ----------------------------------------------------------------------------
146 -- |---------------------------------< lck >----------------------------------|
147 -- ----------------------------------------------------------------------------
148 -- {Start of comments}
149 --
150 -- Description:
151 --   The Lck process has two main functions to perform. Firstly, the row to be
152 --   updated or deleted must be locked. The locking of the row will only be
153 --   successful if the row is not currently locked by another user.
154 --   Secondly, during the locking of the row, the row is selected into
155 --   the g_old_rec data structure which enables the current row values from
156 --   the server to be available to the api.
157 --
158 -- Prerequisites:
159 --   When attempting to call the lock the object version number (if defined)
160 --   is mandatory.
161 --
162 -- In Parameters:
163 --   The arguments to the Lck process are the primary key(s) which uniquely
164 --   identify the row and the object version number of row.
165 --
166 -- Post Success:
167 --   On successful completion of the Lck process the row to be updated or
168 --   deleted will be locked and selected into the global data structure
169 --   g_old_rec.
170 --
171 -- Post Failure:
172 --   The Lck process can fail for three reasons:
173 --   1) When attempting to lock the row the row could already be locked by
174 --      another user. This will raise the HR_Api.Object_Locked exception.
175 --   2) The row which is required to be locked doesn't exist in the HR Schema.
176 --      This error is trapped and reported using the message name
177 --      'HR_7220_INVALID_PRIMARY_KEY'.
178 --   3) The row although existing in the HR Schema has a different object
179 --      version number than the object version number specified.
180 --      This error is trapped and reported using the message name
181 --      'HR_7155_OBJECT_INVALID'.
182 --
183 -- Developer Implementation Notes:
184 --   For each primary key and the object version number arguments add a
185 --   call to hr_api.mandatory_arg_error procedure to ensure that these
186 --   argument values are not null.
187 --
188 -- Access Status:
189 --   Internal Development Use Only.
190 --
191 -- {End of comments}
192 -- ----------------------------------------------------------------------------
193 Procedure lck
194   (p_default_posting_id                   in     number
195   ,p_language                             in     varchar2
196   );
197 --
198 -- ----------------------------------------------------------------------------
199 -- |----------------------------< add_language >------------------------------|
200 -- ----------------------------------------------------------------------------
201 -- {Start of Comments}
202 --
203 -- Description:
204 --   Maintains the _TL table.  Ensures there is a translation for every
205 --   installed language, removes any orphaned translation rows and
206 --   corrects and translations which have got out of synchronisation.
207 --
208 -- Pre-requisites:
209 --
210 -- In Parameters:
211 --
212 -- Post Success:
213 --  A translation row exists for every installed language.
214 --
215 -- Post Failure:
216 --  Maintenance is aborted.
217 --
218 -- Developer Implementation Notes:
219 --  None.
220 --
221 -- Access Status:
222 --  Internal Development Use Only.
223 --
224 -- {End of Comments}
225 -- ----------------------------------------------------------------------------
226 Procedure add_language;
227 --
228 -- ----------------------------------------------------------------------------
229 -- |-----------------------------< convert_args >-----------------------------|
230 -- ----------------------------------------------------------------------------
231 -- {Start Of Comments}
232 --
233 -- Description:
234 --   This function is used to turn attribute parameters into the record
235 --   structure parameter g_rec_type.
236 --
237 -- Prerequisites:
238 --   This is a private function and can only be called from the ins or upd
239 --   attribute processes.
240 --
241 -- In Parameters:
242 --
243 -- Post Success:
244 --   A returning record structure will be returned.
245 --
246 -- Post Failure:
247 --   No direct error handling is required within this function.  Any possible
248 --   errors within this function will be a PL/SQL value error due to
249 --   conversion of datatypes or data lengths.
250 --
251 -- Developer Implementation Notes:
252 --   None.
253 --
254 -- Access Status:
255 --   Internal Row Handler Use Only.
256 --
257 -- {End Of Comments}
258 -- ----------------------------------------------------------------------------
259 Function convert_args
260   (p_default_posting_id             in number
261   ,p_language                       in varchar2
262   ,p_source_language                in varchar2
263   ,p_org_name                       in varchar2
264   ,p_org_description                in varchar2
265   ,p_job_title                      in varchar2
266   ,p_brief_description              in varchar2
267   ,p_detailed_description           in varchar2
268   ,p_job_requirements               in varchar2
269   ,p_additional_details             in varchar2
270   ,p_how_to_apply                   in varchar2
271   ,p_image_url                      in varchar2
272   ,p_image_url_alt                  in varchar2
273   )
274   Return g_rec_type;
275 --
276 -- ----------------------------------------------------------------------------
277 -- |------------------------------< clob_dml >--------------------------------|
278 -- ----------------------------------------------------------------------------
279 -- {Start Of Comments}
280 --
281 -- Description:
282 --   This procedure is used to set CLOB values on the table that are passed
283 --   in as VARCHAR2.
284 --
285 -- Prerequisites:
286 --   This is a private function and can only be called from the insert_dml
287 --   or upddate_dml processes.
288 --
289 -- In Parameters:
290 --    p_rec contains the record of the data
291 --    p_api_updating indicates if the procedure is being called at insert
292 --    or at update.
293 --
294 -- Post Success:
295 --   A returning record structure will be returned.
296 --
297 -- Post Failure:
298 --
299 -- Developer Implementation Notes:
300 --   None.
301 --
302 -- Access Status:
303 --   Internal Row Handler Use Only.
304 --
305 -- {End Of Comments}
306 -- ----------------------------------------------------------------------------
307 Procedure clob_dml
308   (p_rec in out nocopy irc_idt_shd.g_rec_type
309   ,p_api_updating boolean
310   );
311 --
312  end irc_idt_shd;