DBA Data[Home] [Help]

PACKAGE: APPS.OTA_PMM_SHD

Source


1 Package ota_pmm_shd AUTHID CURRENT_USER as
2 /* $Header: otpmm01t.pkh 115.0 99/07/16 00:53:11 porting ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (
10   program_membership_id             number(9),
11   event_id                          number(9),
12   program_event_id                  number(9),
13   object_version_number             number(9),        -- Increased length
14   comments                          varchar2(2000),
15   group_name                        varchar2(80),
16   required_flag                     varchar2(30),
17   role                              varchar2(30),
18   sequence                          number(9),
19   pmm_information_category          varchar2(30),
20   pmm_information1                  varchar2(150),
21   pmm_information2                  varchar2(150),
22   pmm_information3                  varchar2(150),
23   pmm_information4                  varchar2(150),
24   pmm_information5                  varchar2(150),
25   pmm_information6                  varchar2(150),
26   pmm_information7                  varchar2(150),
27   pmm_information8                  varchar2(150),
28   pmm_information9                  varchar2(150),
29   pmm_information10                 varchar2(150),
30   pmm_information11                 varchar2(150),
31   pmm_information12                 varchar2(150),
32   pmm_information13                 varchar2(150),
33   pmm_information14                 varchar2(150),
34   pmm_information15                 varchar2(150),
35   pmm_information16                 varchar2(150),
36   pmm_information17                 varchar2(150),
37   pmm_information18                 varchar2(150),
38   pmm_information19                 varchar2(150),
39   pmm_information20                 varchar2(150)
40   );
41 --
42 -- ----------------------------------------------------------------------------
43 -- |           Global Definitions - Internal Development Use Only             |
44 -- ----------------------------------------------------------------------------
45 --
46 g_old_rec  g_rec_type;                            -- Global record definition
47 g_api_dml  boolean;                               -- Global api dml status
48 --
49 -- ----------------------------------------------------------------------------
50 -- |------------------------< return_api_dml_status >-------------------------|
51 -- ----------------------------------------------------------------------------
52 -- {Start Of Comments}
53 --
54 -- Description:
55 --   This function will return the current g_api_dml private global
56 --   boolean status.
57 --   The g_api_dml status determines if at the time of the function
58 --   being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
59 --   is being issued from within an api.
60 --   If the status is TRUE then a dml statement is being issued from
61 --   within this entity api.
62 --   This function is primarily to support database triggers which
63 --   need to maintain the object_version_number for non-supported
64 --   dml statements (i.e. dml statement issued outside of the api layer).
65 --
66 -- Pre Conditions:
67 --   None.
68 --
69 -- In Arguments:
70 --   None.
71 --
72 -- Post Success:
73 --   Processing continues.
74 --   If the function returns a TRUE value then, dml is being executed from
75 --   within this api.
76 --
77 -- Post Failure:
78 --   None.
79 --
80 -- Access Status:
81 --   Public.
82 --
83 -- {End Of Comments}
84 -- ----------------------------------------------------------------------------
85 Function return_api_dml_status Return Boolean;
86 --
87 -- ----------------------------------------------------------------------------
88 -- |---------------------------< constraint_error >---------------------------|
89 -- ----------------------------------------------------------------------------
90 -- {Start Of Comments}
91 --
92 -- Description:
93 --   This procedure is called when a constraint has been violated (i.e.
94 --   The exception hr_api.check_integrity_violated,
95 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
96 --   hr_api.unique_integrity_violated has been raised).
97 --   The exceptions can only be raised as follows:
98 --   1) A check constraint can only be violated during an INSERT or UPDATE
99 --      dml operation.
100 --   2) A parent integrity constraint can only be violated during an
101 --      INSERT or UPDATE dml operation.
102 --   3) A child integrity constraint can only be violated during an
103 --      DELETE dml operation.
104 --   4) A unique integrity constraint can only be violated during INSERT or
105 --      UPDATE dml operation.
106 --
107 -- Pre Conditions:
108 --   1) Either hr_api.check_integrity_violated,
109 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
110 --      hr_api.unique_integrity_violated has been raised with the subsequent
111 --      stripping of the constraint name from the generated error message
112 --      text.
113 --   2) Standalone validation test which correspond with a constraint error.
114 --
115 -- In Arguments:
116 --   p_constraint_name is in upper format and is just the constraint name
117 --   (e.g. not prefixed by brackets, schema owner etc).
118 --
119 -- Post Success:
120 --   Development dependant.
121 --
122 -- Post Failure:
123 --   Developement dependant.
124 --
125 -- Developer Implementation Notes:
126 --   For each constraint being checked the hr system package failure message
127 --   has been generated as a template only. These system error messages should
128 --   be modified as required (i.e. change the system failure message to a user
129 --   friendly defined error message).
130 --
131 -- Access Status:
132 --   Public.
133 --
134 -- {End Of Comments}
135 -- ----------------------------------------------------------------------------
136 Procedure constraint_error
137             (p_constraint_name in varchar2);
138 --
139 -- ----------------------------------------------------------------------------
140 -- |-----------------------------< api_updating >-----------------------------|
141 -- ----------------------------------------------------------------------------
142 -- {Start Of Comments}
143 --
144 -- Description:
145 --   This function is used to populate the g_old_rec record with the
146 --   current row from the database for the specified primary key
147 --   provided that the primary key exists and is valid and does not
148 --   already match the current g_old_rec. The function will always return
149 --   a TRUE value if the g_old_rec is populated with the current row.
150 --   A FALSE value will be returned if all of the primary key arguments
151 --   are null.
152 --
153 -- Pre Conditions:
154 --   None.
155 --
156 -- In Arguments:
157 --
158 -- Post Success:
159 --   A value of TRUE will be returned indiciating that the g_old_rec
160 --   is current.
161 --   A value of FALSE will be returned if all of the primary key arguments
162 --   have a null value (this indicates that the row has not be inserted into
163 --   the Schema), and therefore could never have a corresponding row.
164 --
165 -- Post Failure:
166 --   A failure can only occur under two circumstances:
167 --   1) The primary key is invalid (i.e. a row does not exist for the
168 --      specified primary key values).
169 --   2) If an object_version_number exists but is NOT the same as the current
170 --      g_old_rec value.
171 --
172 -- Developer Implementation Notes:
173 --   None.
174 --
175 -- Access Status:
176 --   Internal Development Use Only.
177 --
178 -- {End Of Comments}
179 -- ----------------------------------------------------------------------------
180 Function api_updating
181   (
182   p_program_membership_id              in number,
183   p_object_version_number              in number
184   )      Return Boolean;
185 --
186 -- ----------------------------------------------------------------------------
187 -- |---------------------------------< lck >----------------------------------|
188 -- ----------------------------------------------------------------------------
189 -- {Start Of Comments}
190 --
191 -- Description:
192 --   The Lck process has two main functions to perform. Firstly, the row to be
193 --   updated or deleted must be locked. The locking of the row will only be
194 --   successful if the row is not currently locked by another user.
195 --   Secondly, during the locking of the row, the row is selected into
196 --   the g_old_rec data structure which enables the current row values from the
197 --   server to be available to the api.
198 --
199 -- Pre Conditions:
200 --   When attempting to call the lock the object version number (if defined)
201 --   is mandatory.
202 --
203 -- In Arguments:
204 --   The arguments to the Lck process are the primary key(s) which uniquely
205 --   identify the row and the object version number of row.
206 --
207 -- Post Success:
208 --   On successful completion of the Lck process the row to be updated or
209 --   deleted will be locked and selected into the global data structure
210 --   g_old_rec.
211 --
212 -- Post Failure:
213 --   The Lck process can fail for three reasons:
214 --   1) When attempting to lock the row the row could already be locked by
215 --      another user. This will raise the HR_Api.Object_Locked exception.
216 --   2) The row which is required to be locked doesn't exist in the HR Schema.
217 --      This error is trapped and reported using the message name
218 --      'HR_7220_INVALID_PRIMARY_KEY'.
219 --   3) The row although existing in the HR Schema has a different object
220 --      version number than the object version number specified.
221 --      This error is trapped and reported using the message name
222 --      'HR_7155_OBJECT_INVALID'.
223 --
224 -- Developer Implementation Notes:
225 --   For each primary key and the object version number arguments add a
226 --   call to hr_api.mandatory_arg_error procedure to ensure that these
227 --   argument values are not null.
228 --
229 -- Access Status:
230 --   Public.
231 --
232 -- {End Of Comments}
233 -- ----------------------------------------------------------------------------
234 Procedure lck
235   (
236   p_program_membership_id              in number,
237   p_object_version_number              in number
238   );
239 --
240 -- ----------------------------------------------------------------------------
241 -- |-----------------------------< convert_args >-----------------------------|
242 -- ----------------------------------------------------------------------------
243 -- {Start Of Comments}
244 --
245 -- Description:
246 --   This function is used to turn attribute arguments into the record
247 --   structure g_rec_type.
248 --
249 -- Pre Conditions:
250 --   This is a private function and can only be called from the ins or upd
251 --   attribute processes.
252 --
253 -- In Arguments:
254 --
255 -- Post Success:
256 --   A returning record structure will be returned.
257 --
258 -- Post Failure:
259 --   No direct error handling is required within this function. Any possible
260 --   errors within this function will be a PL/SQL value error due to conversion
261 --   of datatypes or data lengths.
262 --
263 -- Developer Implementation Notes:
264 --   None.
265 --
266 -- Access Status:
267 --   Internal Development Use Only.
268 --
269 -- {End Of Comments}
270 -- ----------------------------------------------------------------------------
271 Function convert_args
272 	(
273 	p_program_membership_id         in number,
274 	p_event_id                      in number,
275 	p_program_event_id              in number,
276 	p_object_version_number         in number,
277 	p_comments                      in varchar2,
278 	p_group_name                    in varchar2,
279 	p_required_flag                 in varchar2,
280 	p_role                          in varchar2,
281 	p_sequence                      in number,
282 	p_pmm_information_category      in varchar2,
283 	p_pmm_information1              in varchar2,
284 	p_pmm_information2              in varchar2,
285 	p_pmm_information3              in varchar2,
286 	p_pmm_information4              in varchar2,
287 	p_pmm_information5              in varchar2,
288 	p_pmm_information6              in varchar2,
289 	p_pmm_information7              in varchar2,
290 	p_pmm_information8              in varchar2,
291 	p_pmm_information9              in varchar2,
292 	p_pmm_information10             in varchar2,
293 	p_pmm_information11             in varchar2,
294 	p_pmm_information12             in varchar2,
295 	p_pmm_information13             in varchar2,
296 	p_pmm_information14             in varchar2,
297 	p_pmm_information15             in varchar2,
298 	p_pmm_information16             in varchar2,
299 	p_pmm_information17             in varchar2,
300 	p_pmm_information18             in varchar2,
301 	p_pmm_information19             in varchar2,
302 	p_pmm_information20             in varchar2
303 	)
304 	Return g_rec_type;
305 --
306 end ota_pmm_shd;