DBA Data[Home] [Help]

PACKAGE: APPS.PER_EVT_SHD

Source


1 Package per_evt_shd as
2 /* $Header: peevtrhi.pkh 120.0 2005/05/31 08:38:01 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (event_id                        number(15)
10   ,business_group_id               number(15)
11   ,location_id                     number(15)
12   ,internal_contact_person_id      number(10)
13   ,organization_run_by_id          number(15)
14   ,assignment_id                   number(10)
15   ,date_start                      date
16   ,type                            varchar2(30)
17   ,comments                        varchar2(2000)    -- pseudo column
18   ,contact_telephone_number        varchar2(60)
19   ,date_end                        date
20   ,emp_or_apl                      varchar2(9)       -- Increased length
21   ,event_or_interview              varchar2(30)
22   ,external_contact                varchar2(80)
23   ,time_end                        varchar2(9)       -- Increased length
24   ,time_start                      varchar2(9)       -- Increased length
25   ,request_id                      number(15)
26   ,program_application_id          number(15)
27   ,program_id                      number(15)
28   ,program_update_date             date
29   ,attribute_category              varchar2(30)
30   ,attribute1                      varchar2(150)
31   ,attribute2                      varchar2(150)
32   ,attribute3                      varchar2(150)
33   ,attribute4                      varchar2(150)
34   ,attribute5                      varchar2(150)
35   ,attribute6                      varchar2(150)
36   ,attribute7                      varchar2(150)
37   ,attribute8                      varchar2(150)
38   ,attribute9                      varchar2(150)
39   ,attribute10                     varchar2(150)
40   ,attribute11                     varchar2(150)
41   ,attribute12                     varchar2(150)
42   ,attribute13                     varchar2(150)
43   ,attribute14                     varchar2(150)
44   ,attribute15                     varchar2(150)
45   ,attribute16                     varchar2(150)
46   ,attribute17                     varchar2(150)
47   ,attribute18                     varchar2(150)
48   ,attribute19                     varchar2(150)
49   ,attribute20                     varchar2(150)
50   ,party_id                        number(15)
51   ,object_version_number           number(9)
52   );
53 --
54 -- ----------------------------------------------------------------------------
55 -- |           Global Definitions - Internal Development Use Only             |
56 -- ----------------------------------------------------------------------------
57 --
58 g_old_rec  g_rec_type;                            -- Global record definition
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 Function return_api_dml_status Return Boolean;
98 --
99 -- ----------------------------------------------------------------------------
100 -- |---------------------------< constraint_error >---------------------------|
101 -- ----------------------------------------------------------------------------
102 -- {Start Of Comments}
103 --
104 -- Description:
105 --   This procedure is called when a constraint has been violated (i.e.
106 --   The exception hr_api.check_integrity_violated,
107 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
108 --   hr_api.unique_integrity_violated has been raised).
109 --   The exceptions can only be raised as follows:
110 --   1) A check constraint can only be violated during an INSERT or UPDATE
111 --      dml operation.
112 --   2) A parent integrity constraint can only be violated during an
113 --      INSERT or UPDATE dml operation.
114 --   3) A child integrity constraint can only be violated during an
115 --      DELETE dml operation.
116 --   4) A unique integrity constraint can only be violated during INSERT or
117 --      UPDATE dml operation.
118 --
119 -- Prerequisites:
120 --   1) Either hr_api.check_integrity_violated,
121 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
122 --      hr_api.unique_integrity_violated has been raised with the subsequent
123 --      stripping of the constraint name from the generated error message
124 --      text.
125 --   2) Standalone validation test which corresponds with a constraint error.
126 --
127 -- In Parameter:
128 --   p_constraint_name is in upper format and is just the constraint name
129 --   (e.g. not prefixed by brackets, schema owner etc).
130 --
131 -- Post Success:
132 --   Development dependant.
133 --
134 -- Post Failure:
135 --   Developement dependant.
136 --
137 -- Developer Implementation Notes:
138 --   For each constraint being checked the hr system package failure message
139 --   has been generated as a template only. These system error messages should
140 --   be modified as required (i.e. change the system failure message to a user
141 --   friendly defined error message).
142 --
143 -- Access Status:
144 --   Internal Development Use Only.
145 --
146 -- {End Of Comments}
147 -- ----------------------------------------------------------------------------
148 Procedure constraint_error
149   (p_constraint_name in all_constraints.constraint_name%TYPE);
150 --
151 -- ----------------------------------------------------------------------------
152 -- |-----------------------------< api_updating >-----------------------------|
153 -- ----------------------------------------------------------------------------
154 --  {Start Of Comments}
155 --
156 -- Description:
157 --   This function is used to populate the g_old_rec record with the
158 --   current row from the database for the specified primary key
159 --   provided that the primary key exists and is valid and does not
160 --   already match the current g_old_rec. The function will always return
161 --   a TRUE value if the g_old_rec is populated with the current row.
162 --   A FALSE value will be returned if all of the primary key arguments
163 --   are null.
164 --
165 -- Prerequisites:
166 --   None.
167 --
168 -- In Parameters:
169 --
170 -- Post Success:
171 --   A value of TRUE will be returned indiciating that the g_old_rec
172 --   is current.
173 --   A value of FALSE will be returned if all of the primary key arguments
174 --   have a null value (this indicates that the row has not be inserted into
175 --   the Schema), and therefore could never have a corresponding row.
176 --
177 -- Post Failure:
178 --   A failure can only occur under two circumstances:
179 --   1) The primary key is invalid (i.e. a row does not exist for the
180 --      specified primary key values).
181 --   2) If an object_version_number exists but is NOT the same as the current
182 --      g_old_rec value.
183 --
184 -- Developer Implementation Notes:
185 --   None.
186 --
187 -- Access Status:
188 --   Internal Development Use Only.
189 --
190 -- {End Of Comments}
191 -- ----------------------------------------------------------------------------
192 Function api_updating
193   (p_event_id                             in     number
194   ,p_object_version_number                in     number
195   )      Return Boolean;
196 --
197 -- ----------------------------------------------------------------------------
198 -- |---------------------------------< lck >----------------------------------|
199 -- ----------------------------------------------------------------------------
200 -- {Start of comments}
201 --
202 -- Description:
203 --   The Lck process has two main functions to perform. Firstly, the row to be
204 --   updated or deleted must be locked. The locking of the row will only be
205 --   successful if the row is not currently locked by another user.
206 --   Secondly, during the locking of the row, the row is selected into
207 --   the g_old_rec data structure which enables the current row values from
208 --   the server to be available to the api.
209 --
210 -- Prerequisites:
211 --   When attempting to call the lock the object version number (if defined)
212 --   is mandatory.
213 --
214 -- In Parameters:
215 --   The arguments to the Lck process are the primary key(s) which uniquely
216 --   identify the row and the object version number of row.
217 --
218 -- Post Success:
219 --   On successful completion of the Lck process the row to be updated or
220 --   deleted will be locked and selected into the global data structure
221 --   g_old_rec.
222 --
223 -- Post Failure:
224 --   The Lck process can fail for three reasons:
225 --   1) When attempting to lock the row the row could already be locked by
226 --      another user. This will raise the HR_Api.Object_Locked exception.
227 --   2) The row which is required to be locked doesn't exist in the HR Schema.
228 --      This error is trapped and reported using the message name
229 --      'HR_7220_INVALID_PRIMARY_KEY'.
230 --   3) The row although existing in the HR Schema has a different object
231 --      version number than the object version number specified.
232 --      This error is trapped and reported using the message name
233 --      'HR_7155_OBJECT_INVALID'.
234 --
235 -- Developer Implementation Notes:
236 --   For each primary key and the object version number arguments add a
237 --   call to hr_api.mandatory_arg_error procedure to ensure that these
238 --   argument values are not null.
239 --
240 -- Access Status:
241 --   Internal Development Use Only.
242 --
243 -- {End of comments}
244 -- ----------------------------------------------------------------------------
245 Procedure lck
246   (p_event_id                             in     number
247   ,p_object_version_number                in     number
248   );
249 --
250 -- ----------------------------------------------------------------------------
251 -- |-----------------------------< convert_args >-----------------------------|
252 -- ----------------------------------------------------------------------------
253 -- {Start Of Comments}
254 --
255 -- Description:
256 --   This function is used to turn attribute parameters into the record
257 --   structure parameter g_rec_type.
258 --
259 -- Prerequisites:
260 --   This is a private function and can only be called from the ins or upd
261 --   attribute processes.
262 --
263 -- In Parameters:
264 --
265 -- Post Success:
266 --   A returning record structure will be returned.
267 --
268 -- Post Failure:
269 --   No direct error handling is required within this function.  Any possible
270 --   errors within this function will be a PL/SQL value error due to
271 --   conversion of datatypes or data lengths.
272 --
273 -- Developer Implementation Notes:
274 --   None.
275 --
276 -- Access Status:
277 --   Internal Row Handler Use Only.
278 --
279 -- {End Of Comments}
280 -- ----------------------------------------------------------------------------
281 Function convert_args
282   (p_event_id                       in number
283   ,p_business_group_id              in number
284   ,p_location_id                    in number
285   ,p_internal_contact_person_id     in number
286   ,p_organization_run_by_id         in number
287   ,p_assignment_id                  in number
288   ,p_date_start                     in date
289   ,p_type                           in varchar2
290   ,p_comments                       in varchar2
291   ,p_contact_telephone_number       in varchar2
292   ,p_date_end                       in date
293   ,p_emp_or_apl                     in varchar2
294   ,p_event_or_interview             in varchar2
295   ,p_external_contact               in varchar2
296   ,p_time_end                       in varchar2
297   ,p_time_start                     in varchar2
298   ,p_request_id                     in number
299   ,p_program_application_id         in number
300   ,p_program_id                     in number
301   ,p_program_update_date            in date
302   ,p_attribute_category             in varchar2
303   ,p_attribute1                     in varchar2
304   ,p_attribute2                     in varchar2
305   ,p_attribute3                     in varchar2
306   ,p_attribute4                     in varchar2
307   ,p_attribute5                     in varchar2
308   ,p_attribute6                     in varchar2
309   ,p_attribute7                     in varchar2
310   ,p_attribute8                     in varchar2
311   ,p_attribute9                     in varchar2
312   ,p_attribute10                    in varchar2
313   ,p_attribute11                    in varchar2
314   ,p_attribute12                    in varchar2
315   ,p_attribute13                    in varchar2
316   ,p_attribute14                    in varchar2
317   ,p_attribute15                    in varchar2
318   ,p_attribute16                    in varchar2
319   ,p_attribute17                    in varchar2
320   ,p_attribute18                    in varchar2
321   ,p_attribute19                    in varchar2
322   ,p_attribute20                    in varchar2
323   ,p_party_id                       in number  default null
324   ,p_object_version_number          in number
325   )
326   Return g_rec_type;
327 --
328 end per_evt_shd;