1 Package per_bpd_shd as
2 /* $Header: pebpdrhi.pkh 120.0 2005/05/31 06:19:02 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Global Record Type Specification |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9 (
10 payment_detail_id number(9),
11 processed_assignment_id number(9),
12 personal_payment_method_id number(9),
13 business_group_id number(15),
14 check_number number(15),
15 payment_date date,
16 amount number,
17 check_type varchar2(30),
18 object_version_number number(9),
19 bpd_attribute_category varchar2(30),
20 bpd_attribute1 varchar2(150),
21 bpd_attribute2 varchar2(150),
22 bpd_attribute3 varchar2(150),
23 bpd_attribute4 varchar2(150),
24 bpd_attribute5 varchar2(150),
25 bpd_attribute6 varchar2(150),
26 bpd_attribute7 varchar2(150),
27 bpd_attribute8 varchar2(150),
28 bpd_attribute9 varchar2(150),
29 bpd_attribute10 varchar2(150),
30 bpd_attribute11 varchar2(150),
31 bpd_attribute12 varchar2(150),
32 bpd_attribute13 varchar2(150),
33 bpd_attribute14 varchar2(150),
34 bpd_attribute15 varchar2(150),
35 bpd_attribute16 varchar2(150),
36 bpd_attribute17 varchar2(150),
37 bpd_attribute18 varchar2(150),
38 bpd_attribute19 varchar2(150),
39 bpd_attribute20 varchar2(150),
40 bpd_attribute21 varchar2(150),
41 bpd_attribute22 varchar2(150),
42 bpd_attribute23 varchar2(150),
43 bpd_attribute24 varchar2(150),
44 bpd_attribute25 varchar2(150),
45 bpd_attribute26 varchar2(150),
46 bpd_attribute27 varchar2(150),
47 bpd_attribute28 varchar2(150),
48 bpd_attribute29 varchar2(150),
49 bpd_attribute30 varchar2(150)
50
51 );
52 --
53 -- ----------------------------------------------------------------------------
54 -- | Global Definitions - Internal Development Use Only |
55 -- ----------------------------------------------------------------------------
56 --
57 g_old_rec g_rec_type; -- Global record definition
58 --
59 -- ----------------------------------------------------------------------------
60 -- |---------------------------< constraint_error >---------------------------|
61 -- ----------------------------------------------------------------------------
62 -- {Start Of Comments}
63 --
64 -- Description:
65 -- This procedure is called when a constraint has been violated (i.e.
66 -- The exception hr_api.check_integrity_violated,
67 -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
68 -- hr_api.unique_integrity_violated has been raised).
69 -- The exceptions can only be raised as follows:
70 -- 1) A check constraint can only be violated during an INSERT or UPDATE
71 -- dml operation.
72 -- 2) A parent integrity constraint can only be violated during an
73 -- INSERT or UPDATE dml operation.
74 -- 3) A child integrity constraint can only be violated during an
75 -- DELETE dml operation.
76 -- 4) A unique integrity constraint can only be violated during INSERT or
77 -- UPDATE dml operation.
78 --
79 -- Prerequisites:
80 -- 1) Either hr_api.check_integrity_violated,
81 -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
82 -- hr_api.unique_integrity_violated has been raised with the subsequent
83 -- stripping of the constraint name from the generated error message
84 -- text.
85 -- 2) Standalone validation test which corresponds with a constraint error.
86 --
87 -- In Parameter:
88 -- p_constraint_name is in upper format and is just the constraint name
89 -- (e.g. not prefixed by brackets, schema owner etc).
90 --
91 -- Post Success:
92 -- Development dependant.
93 --
94 -- Post Failure:
95 -- Developement dependant.
96 --
97 -- Developer Implementation Notes:
98 -- For each constraint being checked the hr system package failure message
99 -- has been generated as a template only. These system error messages should
100 -- be modified as required (i.e. change the system failure message to a user
101 -- friendly defined error message).
102 --
103 -- Access Status:
104 -- Internal Development Use Only.
105 --
106 -- {End Of Comments}
107 -- ----------------------------------------------------------------------------
108 Procedure constraint_error
109 (p_constraint_name in all_constraints.constraint_name%TYPE);
110 --
111 -- ----------------------------------------------------------------------------
112 -- |-----------------------------< api_updating >-----------------------------|
113 -- ----------------------------------------------------------------------------
114 -- {Start Of Comments}
115 --
116 -- Description:
117 -- This function is used to populate the g_old_rec record with the
118 -- current row from the database for the specified primary key
119 -- provided that the primary key exists and is valid and does not
120 -- already match the current g_old_rec. The function will always return
121 -- a TRUE value if the g_old_rec is populated with the current row.
122 -- A FALSE value will be returned if all of the primary key arguments
123 -- are null.
124 --
125 -- Prerequisites:
126 -- None.
127 --
128 -- In Parameters:
129 --
130 -- Post Success:
131 -- A value of TRUE will be returned indiciating that the g_old_rec
132 -- is current.
133 -- A value of FALSE will be returned if all of the primary key arguments
134 -- have a null value (this indicates that the row has not be inserted into
135 -- the Schema), and therefore could never have a corresponding row.
136 --
137 -- Post Failure:
138 -- A failure can only occur under two circumstances:
139 -- 1) The primary key is invalid (i.e. a row does not exist for the
140 -- specified primary key values).
141 -- 2) If an object_version_number exists but is NOT the same as the current
142 -- g_old_rec value.
143 --
144 -- Developer Implementation Notes:
145 -- None.
146 --
147 -- Access Status:
148 -- Internal Development Use Only.
149 --
150 -- {End Of Comments}
151 -- ----------------------------------------------------------------------------
152 Function api_updating
153 (
154 p_payment_detail_id in number,
155 p_object_version_number in number
156 ) Return Boolean;
157 --
158 -- ----------------------------------------------------------------------------
159 -- |---------------------------------< lck >----------------------------------|
160 -- ----------------------------------------------------------------------------
161 -- {Start of comments}
162 --
163 -- Description:
164 -- The Lck process has two main functions to perform. Firstly, the row to be
165 -- updated or deleted must be locked. The locking of the row will only be
166 -- successful if the row is not currently locked by another user.
167 -- Secondly, during the locking of the row, the row is selected into
168 -- the g_old_rec data structure which enables the current row values from the
169 -- server to be available to the api.
170 --
171 -- Prerequisites:
172 -- When attempting to call the lock the object version number (if defined)
173 -- is mandatory.
174 --
175 -- In Parameters:
176 -- The arguments to the Lck process are the primary key(s) which uniquely
177 -- identify the row and the object version number of row.
178 --
179 -- Post Success:
180 -- On successful completion of the Lck process the row to be updated or
181 -- deleted will be locked and selected into the global data structure
182 -- g_old_rec.
183 --
184 -- Post Failure:
185 -- The Lck process can fail for three reasons:
186 -- 1) When attempting to lock the row the row could already be locked by
187 -- another user. This will raise the HR_Api.Object_Locked exception.
188 -- 2) The row which is required to be locked doesn't exist in the HR Schema.
189 -- This error is trapped and reported using the message name
190 -- 'HR_7220_INVALID_PRIMARY_KEY'.
191 -- 3) The row although existing in the HR Schema has a different object
192 -- version number than the object version number specified.
193 -- This error is trapped and reported using the message name
194 -- 'HR_7155_OBJECT_INVALID'.
195 --
196 -- Developer Implementation Notes:
197 -- For each primary key and the object version number arguments add a
198 -- call to hr_api.mandatory_arg_error procedure to ensure that these
199 -- argument values are not null.
200 --
201 -- Access Status:
202 -- Internal Development Use Only.
203 --
204 -- {End of comments}
205 -- ----------------------------------------------------------------------------
206 Procedure lck
207 (
208 p_payment_detail_id in number,
209 p_object_version_number in number
210 );
211 --
212 -- ----------------------------------------------------------------------------
213 -- |-----------------------------< convert_args >-----------------------------|
214 -- ----------------------------------------------------------------------------
215 -- {Start Of Comments}
216 --
217 -- Description:
218 -- This function is used to turn attribute parameters into the record
219 -- structure parameter g_rec_type.
220 --
221 -- Prerequisites:
222 -- This is a private function and can only be called from the ins or upd
223 -- attribute processes.
224 --
225 -- In Parameters:
226 --
227 -- Post Success:
228 -- A returning record structure will be returned.
229 --
230 -- Post Failure:
231 -- No direct error handling is required within this function. Any possible
232 -- errors within this function will be a PL/SQL value error due to conversion
233 -- of datatypes or data lengths.
234 --
235 -- Developer Implementation Notes:
236 -- None.
237 --
238 -- Access Status:
239 -- Internal Row Handler Use Only.
240 --
241 -- {End Of Comments}
242 -- -----------------------------------------------------------------------------
243 Function convert_args
244 (
245 p_payment_detail_id in number,
246 p_processed_assignment_id in number,
247 p_personal_payment_method_id in number,
248 p_business_group_id in number,
249 p_check_number in number,
250 p_payment_date in date,
251 p_amount in number,
252 p_check_type in varchar2,
253 p_object_version_number in number,
254 p_bpd_attribute_category in varchar2,
255 p_bpd_attribute1 in varchar2,
256 p_bpd_attribute2 in varchar2,
257 p_bpd_attribute3 in varchar2,
258 p_bpd_attribute4 in varchar2,
259 p_bpd_attribute5 in varchar2,
260 p_bpd_attribute6 in varchar2,
261 p_bpd_attribute7 in varchar2,
262 p_bpd_attribute8 in varchar2,
263 p_bpd_attribute9 in varchar2,
264 p_bpd_attribute10 in varchar2,
265 p_bpd_attribute11 in varchar2,
266 p_bpd_attribute12 in varchar2,
267 p_bpd_attribute13 in varchar2,
268 p_bpd_attribute14 in varchar2,
269 p_bpd_attribute15 in varchar2,
270 p_bpd_attribute16 in varchar2,
271 p_bpd_attribute17 in varchar2,
272 p_bpd_attribute18 in varchar2,
273 p_bpd_attribute19 in varchar2,
274 p_bpd_attribute20 in varchar2,
275 p_bpd_attribute21 in varchar2,
276 p_bpd_attribute22 in varchar2,
277 p_bpd_attribute23 in varchar2,
278 p_bpd_attribute24 in varchar2,
279 p_bpd_attribute25 in varchar2,
280 p_bpd_attribute26 in varchar2,
281 p_bpd_attribute27 in varchar2,
282 p_bpd_attribute28 in varchar2,
283 p_bpd_attribute29 in varchar2,
284 p_bpd_attribute30 in varchar2
285 )
286 Return g_rec_type;
287 --
288 end per_bpd_shd;