DBA Data[Home] [Help]

PACKAGE: APPS.PER_JBR_SHD

Source


1 Package per_jbr_shd as
2 /* $Header: pejbrrhi.pkh 120.0 2005/05/31 10:34:33 appldev noship $ */
3 --
4 -- ---------------------------------------------------------------------------+
5 -- |                    Global Record Type Specification                      |
6 -- ---------------------------------------------------------------------------+
7 --
8 Type g_rec_type Is Record
9   (
10   job_requirement_id                number(15),
11   business_group_id                 number(15),
12   analysis_criteria_id              number(15),
13   comments                          varchar2(2000),   -- pseudo column
14   date_from                         date,
15   date_to                           date,
16   essential                         varchar2(30),
17   job_id                            number(15),
18   position_id                       number(15),
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   object_version_number             number(9)
45   );
46 --
47 -- ---------------------------------------------------------------------------+
48 -- |           Global Definitions - Internal Development Use Only             |
49 -- ---------------------------------------------------------------------------+
50 --
51 g_old_rec  g_rec_type;                            -- Global record definition
52 g_api_dml  boolean;                               -- Global api dml status
53 --
54 -- ---------------------------------------------------------------------------+
55 -- |------------------------< return_api_dml_status >-------------------------|
56 -- ---------------------------------------------------------------------------+
57 -- {Start Of Comments}
58 --
59 -- Description:
60 --   This function will return the current g_api_dml private global
61 --   boolean status.
62 --   The g_api_dml status determines if at the time of the function
63 --   being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
64 --   is being issued from within an api.
65 --   If the status is TRUE then a dml statement is being issued from
66 --   within this entity api.
67 --   This function is primarily to support database triggers which
68 --   need to maintain the object_version_number for non-supported
69 --   dml statements (i.e. dml statement issued outside of the api layer).
70 --
71 -- Pre Conditions:
72 --   None.
73 --
74 -- In Arguments:
75 --   None.
76 --
77 -- Post Success:
78 --   Processing continues.
79 --   If the function returns a TRUE value then, dml is being executed from
80 --   within this api.
81 --
82 -- Post Failure:
83 --   None.
84 --
85 -- Access Status:
86 --   Internal Table Handler Use Only.
87 --
88 -- {End Of Comments}
89 -- ---------------------------------------------------------------------------+
90 Function return_api_dml_status Return Boolean;
91 --
92 -- ---------------------------------------------------------------------------+
93 -- |---------------------------< constraint_error >---------------------------|
94 -- ---------------------------------------------------------------------------+
95 -- {Start Of Comments}
96 --
97 -- Description:
98 --   This procedure is called when a constraint has been violated (i.e.
99 --   The exception hr_api.check_integrity_violated,
100 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
101 --   hr_api.unique_integrity_violated has been raised).
102 --   The exceptions can only be raised as follows:
103 --   1) A check constraint can only be violated during an INSERT or UPDATE
104 --      dml operation.
105 --   2) A parent integrity constraint can only be violated during an
106 --      INSERT or UPDATE dml operation.
107 --   3) A child integrity constraint can only be violated during an
108 --      DELETE dml operation.
109 --   4) A unique integrity constraint can only be violated during INSERT or
110 --      UPDATE dml operation.
111 --
112 -- Pre Conditions:
113 --   1) Either hr_api.check_integrity_violated,
114 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
115 --      hr_api.unique_integrity_violated has been raised with the subsequent
116 --      stripping of the constraint name from the generated error message
117 --      text.
118 --   2) Standalone validation test which correspond with a constraint error.
119 --
120 -- In Arguments:
121 --   p_constraint_name is in upper format and is just the constraint name
122 --   (e.g. not prefixed by brackets, schema owner etc).
123 --
124 -- Post Success:
125 --   Development dependant.
126 --
127 -- Post Failure:
128 --   Developement dependant.
129 --
130 -- Developer Implementation Notes:
131 --   For each constraint being checked the hr system package failure message
132 --   has been generated as a template only. These system error messages should
133 --   be modified as required (i.e. change the system failure message to a user
134 --   friendly defined error message).
135 --
136 -- Access Status:
137 --   Internal Development Use Only.
138 --
139 -- {End Of Comments}
140 -- ---------------------------------------------------------------------------+
141 Procedure constraint_error
142             (p_constraint_name in all_constraints.constraint_name%TYPE);
143 --
144 -- ---------------------------------------------------------------------------+
145 -- |-----------------------------< api_updating >-----------------------------|
146 -- ---------------------------------------------------------------------------+
147 -- {Start Of Comments}
148 --
149 -- Description:
150 --   This function is used to populate the g_old_rec record with the
151 --   current row from the database for the specified primary key
152 --   provided that the primary key exists and is valid and does not
153 --   already match the current g_old_rec. The function will always return
154 --   a TRUE value if the g_old_rec is populated with the current row.
155 --   A FALSE value will be returned if all of the primary key arguments
156 --   are null.
157 --
158 -- Pre Conditions:
159 --   None.
160 --
161 -- In Arguments:
162 --
163 -- Post Success:
164 --   A value of TRUE will be returned indiciating that the g_old_rec
165 --   is current.
166 --   A value of FALSE will be returned if all of the primary key arguments
167 --   have a null value (this indicates that the row has not be inserted into
168 --   the Schema), and therefore could never have a corresponding row.
169 --
170 -- Post Failure:
171 --   A failure can only occur under two circumstances:
172 --   1) The primary key is invalid (i.e. a row does not exist for the
173 --      specified primary key values).
174 --   2) If an object_version_number exists but is NOT the same as the current
175 --      g_old_rec value.
176 --
177 -- Developer Implementation Notes:
178 --   None.
179 --
180 -- Access Status:
181 --   Internal Development Use Only.
182 --
183 -- {End Of Comments}
184 -- ---------------------------------------------------------------------------+
185 Function api_updating
186   (
187    p_job_requirement_id                 in number,
188    p_object_version_number              in number
189   )      Return Boolean;
190 --
191 -- ---------------------------------------------------------------------------+
192 -- |---------------------------------< lck >----------------------------------|
193 -- ---------------------------------------------------------------------------+
194 -- {Start Of Comments}
195 --
196 -- Description:
197 --   The Lck process has two main functions to perform. Firstly, the row to be
198 --   updated or deleted must be locked. The locking of the row will only be
199 --   successful if the row is not currently locked by another user.
200 --   Secondly, during the locking of the row, the row is selected into
201 --   the g_old_rec data structure which enables the current row values from the
202 --   server to be available to the api.
203 --
204 -- Pre Conditions:
205 --   When attempting to call the lock the object version number (if defined)
206 --   is mandatory.
207 --
208 -- In Arguments:
209 --   The arguments to the Lck process are the primary key(s) which uniquely
210 --   identify the row and the object version number of row.
211 --
212 -- Post Success:
213 --   On successful completion of the Lck process the row to be updated or
214 --   deleted will be locked and selected into the global data structure
215 --   g_old_rec.
216 --
217 -- Post Failure:
218 --   The Lck process can fail for three reasons:
219 --   1) When attempting to lock the row the row could already be locked by
220 --      another user. This will raise the HR_Api.Object_Locked exception.
221 --   2) The row which is required to be locked doesn't exist in the HR Schema.
222 --      This error is trapped and reported using the message name
223 --      'HR_7220_INVALID_PRIMARY_KEY'.
224 --   3) The row although existing in the HR Schema has a different object
225 --      version number than the object version number specified.
226 --      This error is trapped and reported using the message name
227 --      'HR_7155_OBJECT_INVALID'.
228 --
229 -- Developer Implementation Notes:
230 --   For each primary key and the object version number arguments add a
231 --   call to hr_api.mandatory_arg_error procedure to ensure that these
232 --   argument values are not null.
233 --
234 -- Access Status:
235 --   Internal Development Use Only.
236 --
237 -- {End Of Comments}
238 -- ---------------------------------------------------------------------------+
239 Procedure lck
240   (
241    p_job_requirement_id                 in number,
242    p_object_version_number              in number
243   );
244 --
245 -- ---------------------------------------------------------------------------+
246 -- |-----------------------------< convert_args >-----------------------------|
247 -- ---------------------------------------------------------------------------+
248 -- {Start Of Comments}
249 --
250 -- Description:
251 --   This function is used to turn attribute arguments into the record
252 --   structure g_rec_type.
253 --
254 -- Pre Conditions:
255 --   This is a private function and can only be called from the ins or upd
256 --   attribute processes.
257 --
258 -- In Arguments:
259 --
260 -- Post Success:
261 --   A returning record structure will be returned.
262 --
263 -- Post Failure:
264 --   No direct error handling is required within this function. Any possible
265 --   errors within this function will be a PL/SQL value error due to conversion
266 --   of datatypes or data lengths.
267 --
268 -- Developer Implementation Notes:
269 --   None.
270 --
271 -- Access Status:
272 --   Internal Table Handler Use Only.
273 --
274 -- {End Of Comments}
275 -- ---------------------------------------------------------------------------+
276 Function convert_args
277   (
278     p_job_requirement_id            in number,
279     p_business_group_id             in number,
280     p_analysis_criteria_id          in number,
281     p_comments                      in varchar2,
282     p_date_from                     in date,
283     p_date_to                       in date,
284     p_essential                     in varchar2,
285     p_job_id                        in number,
286     p_position_id                   in number,
287     p_request_id                    in number,
288     p_program_application_id        in number,
289     p_program_id                    in number,
290     p_program_update_date           in date,
291     p_attribute_category            in varchar2,
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_object_version_number         in number
313     )
314     Return g_rec_type;
315     --
316 end per_jbr_shd;