DBA Data[Home] [Help]

PACKAGE: APPS.OTA_RUD_SHD

Source


1 PACKAGE OTA_RUD_SHD AUTHID CURRENT_USER as
2 /* $Header: otrudrhi.pkh 120.0 2005/05/29 07:32:29 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (resource_usage_id               number(9)
10   ,supplied_resource_id            number(9)
11   ,activity_version_id             number(9)
12   ,object_version_number           number(9)         -- Increased length
13   ,required_flag                   varchar2(30)
14   ,start_date                      date
15   ,comments                        varchar2(2000)    -- pseudo column
16   ,end_date                        date
17   ,quantity                        number
18   ,resource_type                   varchar2(30)
19   ,role_to_play                    varchar2(30)
20   ,usage_reason                    varchar2(30)
21   ,rud_information_category        varchar2(30)
22   ,rud_information1                varchar2(150)
23   ,rud_information2                varchar2(150)
24   ,rud_information3                varchar2(150)
25   ,rud_information4                varchar2(150)
26   ,rud_information5                varchar2(150)
27   ,rud_information6                varchar2(150)
28   ,rud_information7                varchar2(150)
29   ,rud_information8                varchar2(150)
30   ,rud_information9                varchar2(150)
31   ,rud_information10               varchar2(150)
32   ,rud_information11               varchar2(150)
33   ,rud_information12               varchar2(150)
34   ,rud_information13               varchar2(150)
35   ,rud_information14               varchar2(150)
36   ,rud_information15               varchar2(150)
37   ,rud_information16               varchar2(150)
38   ,rud_information17               varchar2(150)
39   ,rud_information18               varchar2(150)
40   ,rud_information19               varchar2(150)
41   ,rud_information20               varchar2(150)
42   ,offering_id                     number(9)
43   );
44 --
45 -- ----------------------------------------------------------------------------
46 -- |           Global Definitions - Internal Development Use Only             |
47 -- ----------------------------------------------------------------------------
48 --
49 g_old_rec  g_rec_type;                            -- Global record definition
50 -- Global table name
51 g_tab_nam  constant varchar2(30) := 'OTA_RESOURCE_USAGES';
52 --
53 -- ----------------------------------------------------------------------------
54 -- |---------------------------< constraint_error >---------------------------|
55 -- ----------------------------------------------------------------------------
56 -- {Start Of Comments}
57 --
58 -- Description:
59 --   This procedure is called when a constraint has been violated (i.e.
60 --   The exception hr_api.check_integrity_violated,
61 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
62 --   hr_api.unique_integrity_violated has been raised).
63 --   The exceptions can only be raised as follows:
64 --   1) A check constraint can only be violated during an INSERT or UPDATE
65 --      dml operation.
66 --   2) A parent integrity constraint can only be violated during an
67 --      INSERT or UPDATE dml operation.
68 --   3) A child integrity constraint can only be violated during an
69 --      DELETE dml operation.
70 --   4) A unique integrity constraint can only be violated during INSERT or
71 --      UPDATE dml operation.
72 --
73 -- Prerequisites:
74 --   1) Either hr_api.check_integrity_violated,
75 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
76 --      hr_api.unique_integrity_violated has been raised with the subsequent
77 --      stripping of the constraint name from the generated error message
78 --      text.
79 --   2) Standalone validation test which corresponds with a constraint error.
80 --
81 -- In Parameter:
82 --   p_constraint_name is in upper format and is just the constraint name
83 --   (e.g. not prefixed by brackets, schema owner etc).
84 --
85 -- Post Success:
86 --   Development dependant.
87 --
88 -- Post Failure:
89 --   Developement dependant.
90 --
91 -- Developer Implementation Notes:
92 --   For each constraint being checked the hr system package failure message
93 --   has been generated as a template only. These system error messages should
94 --   be modified as required (i.e. change the system failure message to a user
95 --   friendly defined error message).
96 --
97 -- Access Status:
98 --   Internal Development Use Only.
99 --
100 -- {End Of Comments}
101 -- ----------------------------------------------------------------------------
102 Procedure constraint_error
103   (p_constraint_name in all_constraints.constraint_name%TYPE);
104 --
105 -- ----------------------------------------------------------------------------
106 -- |-----------------------------< api_updating >-----------------------------|
107 -- ----------------------------------------------------------------------------
108 --  {Start Of Comments}
109 --
110 -- Description:
111 --   This function is used to populate the g_old_rec record with the
112 --   current row from the database for the specified primary key
113 --   provided that the primary key exists and is valid and does not
114 --   already match the current g_old_rec. The function will always return
115 --   a TRUE value if the g_old_rec is populated with the current row.
116 --   A FALSE value will be returned if all of the primary key arguments
117 --   are null.
118 --
119 -- Prerequisites:
120 --   None.
121 --
122 -- In Parameters:
123 --
124 -- Post Success:
125 --   A value of TRUE will be returned indiciating that the g_old_rec
126 --   is current.
127 --   A value of FALSE will be returned if all of the primary key arguments
128 --   have a null value (this indicates that the row has not be inserted into
129 --   the Schema), and therefore could never have a corresponding row.
130 --
131 -- Post Failure:
132 --   A failure can only occur under two circumstances:
133 --   1) The primary key is invalid (i.e. a row does not exist for the
134 --      specified primary key values).
135 --   2) If an object_version_number exists but is NOT the same as the current
136 --      g_old_rec value.
137 --
138 -- Developer Implementation Notes:
139 --   None.
140 --
141 -- Access Status:
142 --   Internal Development Use Only.
143 --
144 -- {End Of Comments}
145 -- ----------------------------------------------------------------------------
146 Function api_updating
147   (p_resource_usage_id                    in     number
148   ,p_object_version_number                in     number
149   )      Return Boolean;
150 --
151 -- ----------------------------------------------------------------------------
152 -- |---------------------------------< lck >----------------------------------|
153 -- ----------------------------------------------------------------------------
154 -- {Start of comments}
155 --
156 -- Description:
157 --   The Lck process has two main functions to perform. Firstly, the row to be
158 --   updated or deleted must be locked. The locking of the row will only be
159 --   successful if the row is not currently locked by another user.
160 --   Secondly, during the locking of the row, the row is selected into
161 --   the g_old_rec data structure which enables the current row values from
162 --   the server to be available to the api.
163 --
164 -- Prerequisites:
165 --   When attempting to call the lock the object version number (if defined)
166 --   is mandatory.
167 --
168 -- In Parameters:
169 --   The arguments to the Lck process are the primary key(s) which uniquely
170 --   identify the row and the object version number of row.
171 --
172 -- Post Success:
173 --   On successful completion of the Lck process the row to be updated or
174 --   deleted will be locked and selected into the global data structure
175 --   g_old_rec.
176 --
177 -- Post Failure:
178 --   The Lck process can fail for three reasons:
179 --   1) When attempting to lock the row the row could already be locked by
180 --      another user. This will raise the HR_Api.Object_Locked exception.
181 --   2) The row which is required to be locked doesn't exist in the HR Schema.
182 --      This error is trapped and reported using the message name
183 --      'HR_7220_INVALID_PRIMARY_KEY'.
184 --   3) The row although existing in the HR Schema has a different object
185 --      version number than the object version number specified.
186 --      This error is trapped and reported using the message name
187 --      'HR_7155_OBJECT_INVALID'.
188 --
189 -- Developer Implementation Notes:
190 --   For each primary key and the object version number arguments add a
191 --   call to hr_api.mandatory_arg_error procedure to ensure that these
192 --   argument values are not null.
193 --
194 -- Access Status:
195 --   Internal Development Use Only.
196 --
197 -- {End of comments}
198 -- ----------------------------------------------------------------------------
199 Procedure lck
200   (p_resource_usage_id                    in     number
201   ,p_object_version_number                in     number
202   );
203 --
204 -- ----------------------------------------------------------------------------
205 -- |-----------------------------< convert_args >-----------------------------|
206 -- ----------------------------------------------------------------------------
207 -- {Start Of Comments}
208 --
209 -- Description:
210 --   This function is used to turn attribute parameters into the record
211 --   structure parameter g_rec_type.
212 --
213 -- Prerequisites:
214 --   This is a private function and can only be called from the ins or upd
215 --   attribute processes.
216 --
217 -- In Parameters:
218 --
219 -- Post Success:
220 --   A returning record structure will be returned.
221 --
222 -- Post Failure:
223 --   No direct error handling is required within this function.  Any possible
224 --   errors within this function will be a PL/SQL value error due to
225 --   conversion of datatypes or data lengths.
226 --
227 -- Developer Implementation Notes:
228 --   None.
229 --
230 -- Access Status:
231 --   Internal Row Handler Use Only.
232 --
233 -- {End Of Comments}
234 -- ----------------------------------------------------------------------------
235 Function convert_args
236   (p_resource_usage_id              in number
237   ,p_supplied_resource_id           in number
238   ,p_activity_version_id            in number
239   ,p_object_version_number          in number
240   ,p_required_flag                  in varchar2
241   ,p_start_date                     in date
242   ,p_comments                       in varchar2
243   ,p_end_date                       in date
244   ,p_quantity                       in number
245   ,p_resource_type                  in varchar2
246   ,p_role_to_play                   in varchar2
247   ,p_usage_reason                   in varchar2
248   ,p_rud_information_category       in varchar2
249   ,p_rud_information1               in varchar2
250   ,p_rud_information2               in varchar2
251   ,p_rud_information3               in varchar2
252   ,p_rud_information4               in varchar2
253   ,p_rud_information5               in varchar2
254   ,p_rud_information6               in varchar2
255   ,p_rud_information7               in varchar2
256   ,p_rud_information8               in varchar2
257   ,p_rud_information9               in varchar2
258   ,p_rud_information10              in varchar2
259   ,p_rud_information11              in varchar2
260   ,p_rud_information12              in varchar2
261   ,p_rud_information13              in varchar2
262   ,p_rud_information14              in varchar2
263   ,p_rud_information15              in varchar2
264   ,p_rud_information16              in varchar2
265   ,p_rud_information17              in varchar2
266   ,p_rud_information18              in varchar2
267   ,p_rud_information19              in varchar2
268   ,p_rud_information20              in varchar2
269   ,p_offering_id                    in number
270   )
271   Return g_rec_type;
272 --
273 end ota_rud_shd;