1 Package pqp_pcv_shd as
2 /* $Header: pqpcvrhi.pkh 120.0 2005/05/29 01:55:28 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Global Record Type Specification |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9 (configuration_value_id number(10)
10 ,business_group_id number(15)
11 ,legislation_code varchar2(30)
12 ,pcv_attribute_category varchar2(30)
13 ,pcv_attribute1 varchar2(150)
14 ,pcv_attribute2 varchar2(150)
15 ,pcv_attribute3 varchar2(150)
16 ,pcv_attribute4 varchar2(150)
17 ,pcv_attribute5 varchar2(150)
18 ,pcv_attribute6 varchar2(150)
19 ,pcv_attribute7 varchar2(150)
20 ,pcv_attribute8 varchar2(150)
21 ,pcv_attribute9 varchar2(150)
22 ,pcv_attribute10 varchar2(150)
23 ,pcv_attribute11 varchar2(150)
24 ,pcv_attribute12 varchar2(150)
25 ,pcv_attribute13 varchar2(150)
26 ,pcv_attribute14 varchar2(150)
27 ,pcv_attribute15 varchar2(150)
28 ,pcv_attribute16 varchar2(150)
29 ,pcv_attribute17 varchar2(150)
30 ,pcv_attribute18 varchar2(150)
31 ,pcv_attribute19 varchar2(150)
32 ,pcv_attribute20 varchar2(150)
33 ,pcv_information_category varchar2(80)
34 ,pcv_information1 varchar2(150)
35 ,pcv_information2 varchar2(150)
36 ,pcv_information3 varchar2(150)
37 ,pcv_information4 varchar2(150)
38 ,pcv_information5 varchar2(150)
39 ,pcv_information6 varchar2(150)
40 ,pcv_information7 varchar2(150)
41 ,pcv_information8 varchar2(150)
42 ,pcv_information9 varchar2(150)
43 ,pcv_information10 varchar2(150)
44 ,pcv_information11 varchar2(150)
45 ,pcv_information12 varchar2(150)
46 ,pcv_information13 varchar2(150)
47 ,pcv_information14 varchar2(150)
48 ,pcv_information15 varchar2(150)
49 ,pcv_information16 varchar2(150)
50 ,pcv_information17 varchar2(150)
51 ,pcv_information18 varchar2(150)
52 ,pcv_information19 varchar2(150)
53 ,pcv_information20 varchar2(150)
54 ,object_version_number number(9)
55 ,configuration_name varchar2(150)
56 );
57 --
58 -- ----------------------------------------------------------------------------
59 -- | Global Definitions - Internal Development Use Only |
60 -- ----------------------------------------------------------------------------
61 --
62 g_old_rec g_rec_type; -- Global record definition
63 -- Global table name
64 g_tab_nam constant varchar2(30) := 'PQP_CONFIGURATION_VALUES';
65 --
66 -- ----------------------------------------------------------------------------
67 -- |---------------------------< constraint_error >---------------------------|
68 -- ----------------------------------------------------------------------------
69 -- {Start Of Comments}
70 --
71 -- Description:
72 -- This procedure is called when a constraint has been violated (i.e.
73 -- The exception hr_api.check_integrity_violated,
74 -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
75 -- hr_api.unique_integrity_violated has been raised).
76 -- The exceptions can only be raised as follows:
77 -- 1) A check constraint can only be violated during an INSERT or UPDATE
78 -- dml operation.
79 -- 2) A parent integrity constraint can only be violated during an
80 -- INSERT or UPDATE dml operation.
81 -- 3) A child integrity constraint can only be violated during an
82 -- DELETE dml operation.
83 -- 4) A unique integrity constraint can only be violated during INSERT or
84 -- UPDATE dml operation.
85 --
86 -- Prerequisites:
87 -- 1) Either hr_api.check_integrity_violated,
88 -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
89 -- hr_api.unique_integrity_violated has been raised with the subsequent
90 -- stripping of the constraint name from the generated error message
91 -- text.
92 -- 2) Standalone validation test which corresponds with a constraint error.
93 --
94 -- In Parameter:
95 -- p_constraint_name is in upper format and is just the constraint name
96 -- (e.g. not prefixed by brackets, schema owner etc).
97 --
98 -- Post Success:
99 -- Development dependant.
100 --
101 -- Post Failure:
102 -- Developement dependant.
103 --
104 -- Developer Implementation Notes:
105 -- For each constraint being checked the hr system package failure message
106 -- has been generated as a template only. These system error messages should
107 -- be modified as required (i.e. change the system failure message to a user
108 -- friendly defined error message).
109 --
110 -- Access Status:
111 -- Internal Development Use Only.
112 --
113 -- {End Of Comments}
114 -- ----------------------------------------------------------------------------
115
116
117 Procedure constraint_error
118 (p_constraint_name in all_constraints.constraint_name%TYPE);
119 --
120 -- ----------------------------------------------------------------------------
121 -- |-----------------------------< api_updating >-----------------------------|
122 -- ----------------------------------------------------------------------------
123 -- {Start Of Comments}
124 --
125 -- Description:
126 -- This function is used to populate the g_old_rec record with the
127 -- current row from the database for the specified primary key
128 -- provided that the primary key exists and is valid and does not
129 -- already match the current g_old_rec. The function will always return
130 -- a TRUE value if the g_old_rec is populated with the current row.
131 -- A FALSE value will be returned if all of the primary key arguments
132 -- are null.
133 --
134 -- Prerequisites:
135 -- None.
136 --
137 -- In Parameters:
138 --
139 -- Post Success:
140 -- A value of TRUE will be returned indiciating that the g_old_rec
141 -- is current.
142 -- A value of FALSE will be returned if all of the primary key arguments
143 -- have a null value (this indicates that the row has not be inserted into
144 -- the Schema), and therefore could never have a corresponding row.
145 --
146 -- Post Failure:
147 -- A failure can only occur under two circumstances:
148 -- 1) The primary key is invalid (i.e. a row does not exist for the
149 -- specified primary key values).
150 -- 2) If an object_version_number exists but is NOT the same as the current
151 -- g_old_rec value.
152 --
153 -- Developer Implementation Notes:
154 -- None.
155 --
156 -- Access Status:
157 -- Internal Development Use Only.
158 --
159 -- {End Of Comments}
160 -- ----------------------------------------------------------------------------
161 Function api_updating
162 (p_configuration_value_id in number
163 ,p_object_version_number in number
164 ) Return Boolean;
165 --
166 -- ----------------------------------------------------------------------------
167 -- |---------------------------------< lck >----------------------------------|
168 -- ----------------------------------------------------------------------------
169 -- {Start of comments}
170 --
171 -- Description:
172 -- The Lck process has two main functions to perform. Firstly, the row to be
173 -- updated or deleted must be locked. The locking of the row will only be
174 -- successful if the row is not currently locked by another user.
175 -- Secondly, during the locking of the row, the row is selected into
176 -- the g_old_rec data structure which enables the current row values from
177 -- the server to be available to the api.
178 --
179 -- Prerequisites:
180 -- When attempting to call the lock the object version number (if defined)
181 -- is mandatory.
182 --
183 -- In Parameters:
184 -- The arguments to the Lck process are the primary key(s) which uniquely
185 -- identify the row and the object version number of row.
186 --
187 -- Post Success:
188 -- On successful completion of the Lck process the row to be updated or
189 -- deleted will be locked and selected into the global data structure
190 -- g_old_rec.
191 --
192 -- Post Failure:
193 -- The Lck process can fail for three reasons:
194 -- 1) When attempting to lock the row the row could already be locked by
195 -- another user. This will raise the HR_Api.Object_Locked exception.
196 -- 2) The row which is required to be locked doesn't exist in the HR Schema.
197 -- This error is trapped and reported using the message name
198 -- 'HR_7220_INVALID_PRIMARY_KEY'.
199 -- 3) The row although existing in the HR Schema has a different object
200 -- version number than the object version number specified.
201 -- This error is trapped and reported using the message name
202 -- 'HR_7155_OBJECT_INVALID'.
203 --
204 -- Developer Implementation Notes:
205 -- For each primary key and the object version number arguments add a
206 -- call to hr_api.mandatory_arg_error procedure to ensure that these
207 -- argument values are not null.
208 --
209 -- Access Status:
210 -- Internal Development Use Only.
211 --
212 -- {End of comments}
213 -- ----------------------------------------------------------------------------
214 Procedure lck
215 (p_configuration_value_id in number
216 ,p_object_version_number in number
217 );
218 --
219 -- ----------------------------------------------------------------------------
220 -- |-----------------------------< convert_args >-----------------------------|
221 -- ----------------------------------------------------------------------------
222 -- {Start Of Comments}
223 --
224 -- Description:
225 -- This function is used to turn attribute parameters into the record
226 -- structure parameter g_rec_type.
227 --
228 -- Prerequisites:
229 -- This is a private function and can only be called from the ins or upd
230 -- attribute processes.
231 --
232 -- In Parameters:
233 --
234 -- Post Success:
235 -- A returning record structure will be returned.
236 --
237 -- Post Failure:
238 -- No direct error handling is required within this function. Any possible
239 -- errors within this function will be a PL/SQL value error due to
240 -- conversion of datatypes or data lengths.
241 --
242 -- Developer Implementation Notes:
243 -- None.
244 --
245 -- Access Status:
246 -- Internal Row Handler Use Only.
247 --
248 -- {End Of Comments}
249 -- ----------------------------------------------------------------------------
250 Function convert_args
251 (p_configuration_value_id in number
252 ,p_business_group_id in number
253 ,p_legislation_code in varchar2
254 ,p_pcv_attribute_category in varchar2
255 ,p_pcv_attribute1 in varchar2
256 ,p_pcv_attribute2 in varchar2
257 ,p_pcv_attribute3 in varchar2
258 ,p_pcv_attribute4 in varchar2
259 ,p_pcv_attribute5 in varchar2
260 ,p_pcv_attribute6 in varchar2
261 ,p_pcv_attribute7 in varchar2
262 ,p_pcv_attribute8 in varchar2
263 ,p_pcv_attribute9 in varchar2
264 ,p_pcv_attribute10 in varchar2
265 ,p_pcv_attribute11 in varchar2
266 ,p_pcv_attribute12 in varchar2
267 ,p_pcv_attribute13 in varchar2
268 ,p_pcv_attribute14 in varchar2
269 ,p_pcv_attribute15 in varchar2
270 ,p_pcv_attribute16 in varchar2
271 ,p_pcv_attribute17 in varchar2
272 ,p_pcv_attribute18 in varchar2
273 ,p_pcv_attribute19 in varchar2
274 ,p_pcv_attribute20 in varchar2
275 ,p_pcv_information_category in varchar2
276 ,p_pcv_information1 in varchar2
277 ,p_pcv_information2 in varchar2
278 ,p_pcv_information3 in varchar2
279 ,p_pcv_information4 in varchar2
280 ,p_pcv_information5 in varchar2
281 ,p_pcv_information6 in varchar2
282 ,p_pcv_information7 in varchar2
283 ,p_pcv_information8 in varchar2
284 ,p_pcv_information9 in varchar2
285 ,p_pcv_information10 in varchar2
286 ,p_pcv_information11 in varchar2
287 ,p_pcv_information12 in varchar2
288 ,p_pcv_information13 in varchar2
289 ,p_pcv_information14 in varchar2
290 ,p_pcv_information15 in varchar2
291 ,p_pcv_information16 in varchar2
292 ,p_pcv_information17 in varchar2
293 ,p_pcv_information18 in varchar2
294 ,p_pcv_information19 in varchar2
295 ,p_pcv_information20 in varchar2
296 ,p_object_version_number in number
297 ,p_configuration_name in varchar2
298 )
299 Return g_rec_type;
300 --
301 end pqp_pcv_shd;