1 Package per_anc_shd as
2 /* $Header: peancrhi.pkh 120.1 2005/10/03 03:51:18 adhunter noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Global Record Type Specification |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9 (
10 analysis_criteria_id number(15),
11 request_id number(15),
12 program_application_id number(15),
13 program_id number(15),
14 program_update_date date,
15 id_flex_num number(15),
16 summary_flag varchar2(9), -- Increased length
17 enabled_flag varchar2(9), -- Increased length
18 start_date_active date,
19 end_date_active date,
20 segment1 varchar2(150),
21 segment2 varchar2(150),
22 segment3 varchar2(150),
23 segment4 varchar2(150),
24 segment5 varchar2(150),
25 segment6 varchar2(150),
26 segment7 varchar2(150),
27 segment8 varchar2(150),
28 segment9 varchar2(150),
29 segment10 varchar2(150),
30 segment11 varchar2(150),
31 segment12 varchar2(150),
32 segment13 varchar2(150),
33 segment14 varchar2(150),
34 segment15 varchar2(150),
35 segment16 varchar2(150),
36 segment17 varchar2(150),
37 segment18 varchar2(150),
38 segment19 varchar2(150),
39 segment20 varchar2(150),
40 segment21 varchar2(150),
41 segment22 varchar2(150),
42 segment23 varchar2(150),
43 segment24 varchar2(150),
44 segment25 varchar2(150),
45 segment26 varchar2(150),
46 segment27 varchar2(150),
47 segment28 varchar2(150),
48 segment29 varchar2(150),
49 segment30 varchar2(150)
50 );
51 --
52 -- ----------------------------------------------------------------------------
53 -- | Global Definitions - Internal Development Use Only |
54 -- ----------------------------------------------------------------------------
55 --
56 g_old_rec g_rec_type; -- Global record definition
57 g_api_dml boolean; -- Global api dml status
58 -- ----------------------------------------------------------------------------
59 -- |------------------------< segment_combination_check >---------------------|
60 -- ----------------------------------------------------------------------------
61 procedure segment_combination_check
62 (p_segment1 in varchar2 default null,
63 p_segment2 in varchar2 default null,
64 p_segment3 in varchar2 default null,
65 p_segment4 in varchar2 default null,
66 p_segment5 in varchar2 default null,
67 p_segment6 in varchar2 default null,
68 p_segment7 in varchar2 default null,
69 p_segment8 in varchar2 default null,
70 p_segment9 in varchar2 default null,
71 p_segment10 in varchar2 default null,
72 p_segment11 in varchar2 default null,
73 p_segment12 in varchar2 default null,
74 p_segment13 in varchar2 default null,
75 p_segment14 in varchar2 default null,
76 p_segment15 in varchar2 default null,
77 p_segment16 in varchar2 default null,
78 p_segment17 in varchar2 default null,
79 p_segment18 in varchar2 default null,
80 p_segment19 in varchar2 default null,
81 p_segment20 in varchar2 default null,
82 p_segment21 in varchar2 default null,
83 p_segment22 in varchar2 default null,
84 p_segment23 in varchar2 default null,
85 p_segment24 in varchar2 default null,
86 p_segment25 in varchar2 default null,
87 p_segment26 in varchar2 default null,
88 p_segment27 in varchar2 default null,
89 p_segment28 in varchar2 default null,
90 p_segment29 in varchar2 default null,
91 p_segment30 in varchar2 default null,
92 p_business_group_id in number,
93 p_id_flex_num in number,
94 p_analysis_criteria_id out nocopy number);
95 --
96 -- ----------------------------------------------------------------------------
97 -- |------------------------< return_api_dml_status >-------------------------|
98 -- ----------------------------------------------------------------------------
99 -- {Start Of Comments}
100 --
101 -- Description:
102 -- This function will return the current g_api_dml private global
103 -- boolean status.
104 -- The g_api_dml status determines if at the time of the function
105 -- being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
106 -- is being issued from within an api.
107 -- If the status is TRUE then a dml statement is being issued from
108 -- within this entity api.
109 -- This function is primarily to support database triggers which
110 -- need to maintain the object_version_number for non-supported
111 -- dml statements (i.e. dml statement issued outside of the api layer).
112 --
113 -- Pre Conditions:
114 -- None.
115 --
116 -- In Arguments:
117 -- None.
118 --
119 -- Post Success:
120 -- Processing continues.
121 -- If the function returns a TRUE value then, dml is being executed from
122 -- within this api.
123 --
124 -- Post Failure:
125 -- None.
126 --
127 -- Access Status:
128 -- Internal Table Handler Use Only.
129 --
130 -- {End Of Comments}
131 -- ----------------------------------------------------------------------------
132 Function return_api_dml_status Return Boolean;
133 --
134 -- ----------------------------------------------------------------------------
135 -- |---------------------------< constraint_error >---------------------------|
136 -- ----------------------------------------------------------------------------
137 -- {Start Of Comments}
138 --
139 -- Description:
140 -- This procedure is called when a constraint has been violated (i.e.
141 -- The exception hr_api.check_integrity_violated,
142 -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
143 -- hr_api.unique_integrity_violated has been raised).
144 -- The exceptions can only be raised as follows:
145 -- 1) A check constraint can only be violated during an INSERT or UPDATE
146 -- dml operation.
147 -- 2) A parent integrity constraint can only be violated during an
148 -- INSERT or UPDATE dml operation.
149 -- 3) A child integrity constraint can only be violated during an
150 -- DELETE dml operation.
151 -- 4) A unique integrity constraint can only be violated during INSERT or
152 -- UPDATE dml operation.
153 --
154 -- Pre Conditions:
155 -- 1) Either hr_api.check_integrity_violated,
156 -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
157 -- hr_api.unique_integrity_violated has been raised with the subsequent
158 -- stripping of the constraint name from the generated error message
159 -- text.
160 -- 2) Standalone validation test which correspond with a constraint error.
161 --
162 -- In Arguments:
163 -- p_constraint_name is in upper format and is just the constraint name
164 -- (e.g. not prefixed by brackets, schema owner etc).
165 --
166 -- Post Success:
167 -- Development dependant.
168 --
169 -- Post Failure:
170 -- Developement dependant.
171 --
172 -- Developer Implementation Notes:
173 -- For each constraint being checked the hr system package failure message
174 -- has been generated as a template only. These system error messages should
175 -- be modified as required (i.e. change the system failure message to a user
176 -- friendly defined error message).
177 --
178 -- Access Status:
179 -- Internal Development Use Only.
180 --
181 -- {End Of Comments}
182 -- ----------------------------------------------------------------------------
183 Procedure constraint_error
184 (p_constraint_name in varchar2);
185 --
186 -- ----------------------------------------------------------------------------
187 -- |-----------------------------< api_updating >-----------------------------|
188 -- ----------------------------------------------------------------------------
189 -- {Start Of Comments}
190 --
191 -- Description:
192 -- This function is used to populate the g_old_rec record with the
193 -- current row from the database for the specified primary key
194 -- provided that the primary key exists and is valid and does not
195 -- already match the current g_old_rec. The function will always return
196 -- a TRUE value if the g_old_rec is populated with the current row.
197 -- A FALSE value will be returned if all of the primary key arguments
198 -- are null.
199 --
200 -- Pre Conditions:
201 -- None.
202 --
203 -- In Arguments:
204 --
205 -- Post Success:
206 -- A value of TRUE will be returned indiciating that the g_old_rec
207 -- is current.
208 -- A value of FALSE will be returned if all of the primary key arguments
209 -- have a null value (this indicates that the row has not be inserted into
210 -- the Schema), and therefore could never have a corresponding row.
211 --
212 -- Post Failure:
213 -- A failure can only occur under two circumstances:
214 -- 1) The primary key is invalid (i.e. a row does not exist for the
215 -- specified primary key values).
216 -- 2) If an object_version_number exists but is NOT the same as the current
217 -- g_old_rec value.
218 --
219 -- Developer Implementation Notes:
220 -- None.
221 --
222 -- Access Status:
223 -- Internal Development Use Only.
224 --
225 -- {End Of Comments}
226 -- ----------------------------------------------------------------------------
227 Function api_updating
228 (
229 p_analysis_criteria_id in number
230 ) Return Boolean;
231 --
232 -- ----------------------------------------------------------------------------
233 -- |-----------------------------< convert_args >-----------------------------|
234 -- ----------------------------------------------------------------------------
235 -- {Start Of Comments}
236 --
237 -- Description:
238 -- This function is used to turn attribute arguments into the record
239 -- structure g_rec_type.
240 --
241 -- Pre Conditions:
242 -- This is a private function and can only be called from the ins or upd
243 -- attribute processes.
244 --
245 -- In Arguments:
246 --
247 -- Post Success:
248 -- A returning record structure will be returned.
249 --
250 -- Post Failure:
251 -- No direct error handling is required within this function. Any possible
252 -- errors within this function will be a PL/SQL value error due to conversion
253 -- of datatypes or data lengths.
254 --
255 -- Developer Implementation Notes:
256 -- None.
257 --
258 -- Access Status:
259 -- Internal Table Handler Use Only.
260 --
261 -- {End Of Comments}
262 -- ----------------------------------------------------------------------------
263 Function convert_args
264 (
265 p_analysis_criteria_id in number,
266 p_request_id in number,
267 p_program_application_id in number,
268 p_program_id in number,
269 p_program_update_date in date,
270 p_id_flex_num in number,
271 p_summary_flag in varchar2,
272 p_enabled_flag in varchar2,
273 p_start_date_active in date,
274 p_end_date_active in date,
275 p_segment1 in varchar2,
276 p_segment2 in varchar2,
277 p_segment3 in varchar2,
278 p_segment4 in varchar2,
279 p_segment5 in varchar2,
280 p_segment6 in varchar2,
281 p_segment7 in varchar2,
282 p_segment8 in varchar2,
283 p_segment9 in varchar2,
284 p_segment10 in varchar2,
285 p_segment11 in varchar2,
286 p_segment12 in varchar2,
287 p_segment13 in varchar2,
288 p_segment14 in varchar2,
289 p_segment15 in varchar2,
290 p_segment16 in varchar2,
291 p_segment17 in varchar2,
292 p_segment18 in varchar2,
293 p_segment19 in varchar2,
294 p_segment20 in varchar2,
295 p_segment21 in varchar2,
296 p_segment22 in varchar2,
297 p_segment23 in varchar2,
298 p_segment24 in varchar2,
299 p_segment25 in varchar2,
300 p_segment26 in varchar2,
301 p_segment27 in varchar2,
302 p_segment28 in varchar2,
303 p_segment29 in varchar2,
304 p_segment30 in varchar2
305 )
306 Return g_rec_type;
307 --
308 end per_anc_shd;