DBA Data[Home] [Help]

PACKAGE: APPS.OTA_ACI_SHD

Source


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