1 Package psp_era_shd as
2 /* $Header: PSPEARHS.pls 120.1 2006/03/26 01:08:35 dpaudel noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Global Record Type Specification |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9 (effort_report_approval_id number(15)
10 ,effort_report_detail_id number(15)
11 ,wf_role_name varchar2(320)
12 ,wf_orig_system_id number
13 ,wf_orig_system varchar2(30)
14 ,approver_order_num number
15 ,approval_status varchar2(9) -- Increased length
16 ,response_date date
17 ,actual_cost_share number
18 ,overwritten_effort_percent number
19 ,wf_item_key varchar2(240)
20 ,comments varchar2(240) -- pseudo column
21 ,pera_information_category varchar2(30)
22 ,pera_information1 varchar2(150)
23 ,pera_information2 varchar2(150)
24 ,pera_information3 varchar2(150)
25 ,pera_information4 varchar2(150)
26 ,pera_information5 varchar2(150)
27 ,pera_information6 varchar2(150)
28 ,pera_information7 varchar2(150)
29 ,pera_information8 varchar2(150)
30 ,pera_information9 varchar2(150)
31 ,pera_information10 varchar2(150)
32 ,pera_information11 varchar2(150)
33 ,pera_information12 varchar2(150)
34 ,pera_information13 varchar2(150)
35 ,pera_information14 varchar2(150)
36 ,pera_information15 varchar2(150)
37 ,pera_information16 varchar2(150)
38 ,pera_information17 varchar2(150)
39 ,pera_information18 varchar2(150)
40 ,pera_information19 varchar2(150)
41 ,pera_information20 varchar2(150)
42 ,wf_role_display_name varchar2(360)
43 ,object_version_number number(9)
44 ,notification_id number
45 ,eff_information_category varchar2(30)
46 ,eff_information1 varchar2(150)
47 ,eff_information2 varchar2(150)
48 ,eff_information3 varchar2(150)
49 ,eff_information4 varchar2(150)
50 ,eff_information5 varchar2(150)
51 ,eff_information6 varchar2(150)
52 ,eff_information7 varchar2(150)
53 ,eff_information8 varchar2(150)
54 ,eff_information9 varchar2(150)
55 ,eff_information10 varchar2(150)
56 ,eff_information11 varchar2(150)
57 ,eff_information12 varchar2(150)
58 ,eff_information13 varchar2(150)
59 ,eff_information14 varchar2(150)
60 ,eff_information15 varchar2(150)
61 );
62 --
63 -- ----------------------------------------------------------------------------
64 -- | Global Definitions - Internal Development Use Only |
65 -- ----------------------------------------------------------------------------
66 --
67 g_old_rec g_rec_type; -- Global record definition
68 -- Global table name
69 g_tab_nam constant varchar2(30) := 'PSP_EFF_REPORT_APPROVALS';
70 --
71 -- ----------------------------------------------------------------------------
72 -- |---------------------------< constraint_error >---------------------------|
73 -- ----------------------------------------------------------------------------
74 -- {Start Of Comments}
75 --
76 -- Description:
77 -- This procedure is called when a constraint has been violated (i.e.
78 -- The exception hr_api.check_integrity_violated,
79 -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
80 -- hr_api.unique_integrity_violated has been raised).
81 -- The exceptions can only be raised as follows:
82 -- 1) A check constraint can only be violated during an INSERT or UPDATE
83 -- dml operation.
84 -- 2) A parent integrity constraint can only be violated during an
85 -- INSERT or UPDATE dml operation.
86 -- 3) A child integrity constraint can only be violated during an
87 -- DELETE dml operation.
88 -- 4) A unique integrity constraint can only be violated during INSERT or
89 -- UPDATE dml operation.
90 --
91 -- Prerequisites:
92 -- 1) Either hr_api.check_integrity_violated,
93 -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
94 -- hr_api.unique_integrity_violated has been raised with the subsequent
95 -- stripping of the constraint name from the generated error message
96 -- text.
97 -- 2) Standalone validation test which corresponds with a constraint error.
98 --
99 -- In Parameter:
100 -- p_constraint_name is in upper format and is just the constraint name
101 -- (e.g. not prefixed by brackets, schema owner etc).
102 --
103 -- Post Success:
104 -- Development dependant.
105 --
106 -- Post Failure:
107 -- Developement dependant.
108 --
109 -- Developer Implementation Notes:
110 -- For each constraint being checked the hr system package failure message
111 -- has been generated as a template only. These system error messages should
112 -- be modified as required (i.e. change the system failure message to a user
113 -- friendly defined error message).
114 --
115 -- Access Status:
116 -- Internal Development Use Only.
117 --
118 -- {End Of Comments}
119 -- ----------------------------------------------------------------------------
120 Procedure constraint_error
121 (p_constraint_name in all_constraints.constraint_name%TYPE);
122 --
123 -- ----------------------------------------------------------------------------
124 -- |-----------------------------< api_updating >-----------------------------|
125 -- ----------------------------------------------------------------------------
126 -- {Start Of Comments}
127 --
128 -- Description:
129 -- This function is used to populate the g_old_rec record with the
130 -- current row from the database for the specified primary key
131 -- provided that the primary key exists and is valid and does not
132 -- already match the current g_old_rec. The function will always return
133 -- a TRUE value if the g_old_rec is populated with the current row.
134 -- A FALSE value will be returned if all of the primary key arguments
135 -- are null.
136 --
137 -- Prerequisites:
138 -- None.
139 --
140 -- In Parameters:
141 --
142 -- Post Success:
143 -- A value of TRUE will be returned indiciating that the g_old_rec
144 -- is current.
145 -- A value of FALSE will be returned if all of the primary key arguments
146 -- have a null value (this indicates that the row has not be inserted into
147 -- the Schema), and therefore could never have a corresponding row.
148 --
149 -- Post Failure:
150 -- A failure can only occur under two circumstances:
151 -- 1) The primary key is invalid (i.e. a row does not exist for the
152 -- specified primary key values).
153 -- 2) If an object_version_number exists but is NOT the same as the current
154 -- g_old_rec value.
155 --
156 -- Developer Implementation Notes:
157 -- None.
158 --
159 -- Access Status:
160 -- Internal Development Use Only.
161 --
162 -- {End Of Comments}
163 -- ----------------------------------------------------------------------------
164 Function api_updating
165 (p_effort_report_approval_id in number
166 ,p_object_version_number in number
167 ) Return Boolean;
168 --
169 -- ----------------------------------------------------------------------------
170 -- |---------------------------------< lck >----------------------------------|
171 -- ----------------------------------------------------------------------------
172 -- {Start of comments}
173 --
174 -- Description:
175 -- The Lck process has two main functions to perform. Firstly, the row to be
176 -- updated or deleted must be locked. The locking of the row will only be
177 -- successful if the row is not currently locked by another user.
178 -- Secondly, during the locking of the row, the row is selected into
179 -- the g_old_rec data structure which enables the current row values from
180 -- the server to be available to the api.
181 --
182 -- Prerequisites:
183 -- When attempting to call the lock the object version number (if defined)
184 -- is mandatory.
185 --
186 -- In Parameters:
187 -- The arguments to the Lck process are the primary key(s) which uniquely
188 -- identify the row and the object version number of row.
189 --
190 -- Post Success:
191 -- On successful completion of the Lck process the row to be updated or
192 -- deleted will be locked and selected into the global data structure
193 -- g_old_rec.
194 --
195 -- Post Failure:
196 -- The Lck process can fail for three reasons:
197 -- 1) When attempting to lock the row the row could already be locked by
198 -- another user. This will raise the HR_Api.Object_Locked exception.
199 -- 2) The row which is required to be locked doesn't exist in the HR Schema.
200 -- This error is trapped and reported using the message name
201 -- 'HR_7220_INVALID_PRIMARY_KEY'.
202 -- 3) The row although existing in the HR Schema has a different object
203 -- version number than the object version number specified.
204 -- This error is trapped and reported using the message name
205 -- 'HR_7155_OBJECT_INVALID'.
206 --
207 -- Developer Implementation Notes:
208 -- For each primary key and the object version number arguments add a
209 -- call to hr_api.mandatory_arg_error procedure to ensure that these
210 -- argument values are not null.
211 --
212 -- Access Status:
213 -- Internal Development Use Only.
214 --
215 -- {End of comments}
216 -- ----------------------------------------------------------------------------
217 Procedure lck
218 (p_effort_report_approval_id in number
219 ,p_object_version_number in number
220 );
221 --
222 -- ----------------------------------------------------------------------------
223 -- |-----------------------------< convert_args >-----------------------------|
224 -- ----------------------------------------------------------------------------
225 -- {Start Of Comments}
226 --
227 -- Description:
228 -- This function is used to turn attribute parameters into the record
229 -- structure parameter g_rec_type.
230 --
231 -- Prerequisites:
232 -- This is a private function and can only be called from the ins or upd
233 -- attribute processes.
234 --
235 -- In Parameters:
236 --
237 -- Post Success:
238 -- A returning record structure will be returned.
239 --
240 -- Post Failure:
241 -- No direct error handling is required within this function. Any possible
242 -- errors within this function will be a PL/SQL value error due to
243 -- conversion of datatypes or data lengths.
244 --
245 -- Developer Implementation Notes:
246 -- None.
247 --
248 -- Access Status:
249 -- Internal Row Handler Use Only.
250 --
251 -- {End Of Comments}
252 -- ----------------------------------------------------------------------------
253 Function convert_args
254 (p_effort_report_approval_id in number
255 ,p_effort_report_detail_id in number
256 ,p_wf_role_name in varchar2
257 ,p_wf_orig_system_id in number
258 ,p_wf_orig_system in varchar2
259 ,p_approver_order_num in number
260 ,p_approval_status in varchar2
261 ,p_response_date in date
262 ,p_actual_cost_share in number
263 ,p_overwritten_effort_percent in number
264 ,p_wf_item_key in varchar2
265 ,p_comments in varchar2
266 ,p_pera_information_category in varchar2
267 ,p_pera_information1 in varchar2
268 ,p_pera_information2 in varchar2
269 ,p_pera_information3 in varchar2
270 ,p_pera_information4 in varchar2
271 ,p_pera_information5 in varchar2
272 ,p_pera_information6 in varchar2
273 ,p_pera_information7 in varchar2
274 ,p_pera_information8 in varchar2
275 ,p_pera_information9 in varchar2
276 ,p_pera_information10 in varchar2
277 ,p_pera_information11 in varchar2
278 ,p_pera_information12 in varchar2
279 ,p_pera_information13 in varchar2
280 ,p_pera_information14 in varchar2
281 ,p_pera_information15 in varchar2
282 ,p_pera_information16 in varchar2
283 ,p_pera_information17 in varchar2
284 ,p_pera_information18 in varchar2
285 ,p_pera_information19 in varchar2
286 ,p_pera_information20 in varchar2
287 ,p_wf_role_display_name in varchar2
288 ,p_object_version_number in number
289 ,p_notification_id in number
290 ,p_eff_information_category in varchar2
291 ,p_eff_information1 in varchar2
292 ,p_eff_information2 in varchar2
293 ,p_eff_information3 in varchar2
294 ,p_eff_information4 in varchar2
295 ,p_eff_information5 in varchar2
296 ,p_eff_information6 in varchar2
297 ,p_eff_information7 in varchar2
298 ,p_eff_information8 in varchar2
299 ,p_eff_information9 in varchar2
300 ,p_eff_information10 in varchar2
301 ,p_eff_information11 in varchar2
302 ,p_eff_information12 in varchar2
303 ,p_eff_information13 in varchar2
304 ,p_eff_information14 in varchar2
305 ,p_eff_information15 in varchar2
306 )
307 Return g_rec_type;
308 --
309 end psp_era_shd;