DBA Data[Home] [Help]

PACKAGE: APPS.GHR_PDI_SHD

Source


1 Package ghr_pdi_shd AUTHID CURRENT_USER as
2 /* $Header: ghpdirhi.pkh 120.0 2005/05/29 03:28:37 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (
10   position_description_id           number(15),
11   routing_group_id                  number(15),
12   date_from                         date,
13   date_to                           date,
14   opm_cert_num                      varchar2(20),
15   flsa                              varchar2(9),      -- Increased length
16   financial_statement               varchar2(9),      -- Increased length
17   subject_to_ia_action              varchar2(9),      -- Increased length
18   position_status                   number(9),        -- Increased length
19   position_is                       varchar2(9),      -- Increased length
20   position_sensitivity              varchar2(9),      -- Increased length
21   competitive_level                 varchar2(9),      -- Increased length
22   pd_remarks                        varchar2(2000),
23   position_class_std                varchar2(50),
24   category                          varchar2(10),
25   career_ladder                     varchar2(9),
26   supervisor_name		    varchar2(240),
27   supervisor_title 		    varchar2(240),
28   supervisor_date                   date,
29   manager_name		            varchar2(240),
30   manager_title 		    varchar2(240),
31   manager_date                      date,
32   classifier_name		    varchar2(240),
33   classifier_title 		    varchar2(240),
34   classifier_date                   date,
35   attribute_category                varchar2(30),
36   attribute1                        varchar2(150),
37   attribute2                        varchar2(150),
38   attribute3                        varchar2(150),
39   attribute4                        varchar2(150),
40   attribute5                        varchar2(150),
41   attribute6                        varchar2(150),
42   attribute7                        varchar2(150),
43   attribute8                        varchar2(150),
44   attribute9                        varchar2(150),
45   attribute10                       varchar2(150),
46   attribute11                       varchar2(150),
47   attribute12                       varchar2(150),
48   attribute13                       varchar2(150),
49   attribute14                       varchar2(150),
50   attribute15                       varchar2(150),
51   attribute16                       varchar2(150),
52   attribute17                       varchar2(150),
53   attribute18                       varchar2(150),
54   attribute19                       varchar2(150),
55   attribute20                       varchar2(150),
56   business_group_id                 number(15),
57   object_version_number             number(9)
58   );
59 --
60 -- ----------------------------------------------------------------------------
61 -- |           Global Definitions - Internal Development Use Only             |
62 -- ----------------------------------------------------------------------------
63 --
64 g_old_rec  g_rec_type;                            -- Global record definition
65 --g_api_dml  boolean;                               -- Global api dml status
66 --
67 -- ----------------------------------------------------------------------------
68 -- |------------------------< return_api_dml_status >-------------------------|
69 -- ----------------------------------------------------------------------------
70 -- {Start Of Comments}
71 --
72 -- Description:
73 --   This function will return the current g_api_dml private global
74 --   boolean status.
75 --   The g_api_dml status determines if at the time of the function
76 --   being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
77 --   is being issued from within an api.
78 --   If the status is TRUE then a dml statement is being issued from
79 --   within this entity api.
80 --   This function is primarily to support database triggers which
81 --   need to maintain the object_version_number for non-supported
82 --   dml statements (i.e. dml statement issued outside of the api layer).
83 --
84 -- Prerequisites:
85 --   None.
86 --
87 -- In Parameters:
88 --   None.
89 --
90 -- Post Success:
91 --   Processing continues.
92 --   If the function returns a TRUE value then, dml is being executed from
93 --   within this api.
94 --
95 -- Post Failure:
96 --   None.
97 --
98 -- Access Status:
99 --   Internal Row Handler Use Only.
100 --
101 -- {End Of Comments}
102 -- ----------------------------------------------------------------------------
103 --Function return_api_dml_status Return Boolean;
104 --
105 -- ----------------------------------------------------------------------------
106 -- |---------------------------< constraint_error >---------------------------|
107 -- ----------------------------------------------------------------------------
108 -- {Start Of Comments}
109 --
110 -- Description:
111 --   This procedure is called when a constraint has been violated (i.e.
112 --   The exception hr_api.check_integrity_violated,
113 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
114 --   hr_api.unique_integrity_violated has been raised).
115 --   The exceptions can only be raised as follows:
116 --   1) A check constraint can only be violated during an INSERT or UPDATE
117 --      dml operation.
118 --   2) A parent integrity constraint can only be violated during an
119 --      INSERT or UPDATE dml operation.
120 --   3) A child integrity constraint can only be violated during an
121 --      DELETE dml operation.
122 --   4) A unique integrity constraint can only be violated during INSERT or
123 --      UPDATE dml operation.
124 --
125 -- Prerequisites:
126 --   1) Either hr_api.check_integrity_violated,
127 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
128 --      hr_api.unique_integrity_violated has been raised with the subsequent
129 --      stripping of the constraint name from the generated error message
130 --      text.
131 --   2) Standalone validation test which corresponds with a constraint error.
132 --
133 -- In Parameter:
134 --   p_constraint_name is in upper format and is just the constraint name
135 --   (e.g. not prefixed by brackets, schema owner etc).
136 --
137 -- Post Success:
138 --   Development dependant.
139 --
140 -- Post Failure:
141 --   Developement dependant.
142 --
143 -- Developer Implementation Notes:
144 --   For each constraint being checked the hr system package failure message
145 --   has been generated as a template only. These system error messages should
146 --   be modified as required (i.e. change the system failure message to a user
147 --   friendly defined error message).
148 --
149 -- Access Status:
150 --   Internal Development Use Only.
151 --
152 -- {End Of Comments}
153 -- ----------------------------------------------------------------------------
154 Procedure constraint_error
155             (p_constraint_name in all_constraints.constraint_name%TYPE);
156 --
157 -- ----------------------------------------------------------------------------
158 -- |-----------------------------< api_updating >-----------------------------|
159 -- ----------------------------------------------------------------------------
160 -- {Start Of Comments}
161 --
162 -- Description:
163 --   This function is used to populate the g_old_rec record with the
164 --   current row from the database for the specified primary key
165 --   provided that the primary key exists and is valid and does not
166 --   already match the current g_old_rec. The function will always return
167 --   a TRUE value if the g_old_rec is populated with the current row.
168 --   A FALSE value will be returned if all of the primary key arguments
169 --   are null.
170 --
171 -- Prerequisites:
172 --   None.
173 --
174 -- In Parameters:
175 --
176 -- Post Success:
177 --   A value of TRUE will be returned indiciating that the g_old_rec
178 --   is current.
179 --   A value of FALSE will be returned if all of the primary key arguments
180 --   have a null value (this indicates that the row has not be inserted into
181 --   the Schema), and therefore could never have a corresponding row.
182 --
183 -- Post Failure:
184 --   A failure can only occur under two circumstances:
185 --   1) The primary key is invalid (i.e. a row does not exist for the
186 --      specified primary key values).
187 --   2) If an object_version_number exists but is NOT the same as the current
188 --      g_old_rec value.
189 --
190 -- Developer Implementation Notes:
191 --   None.
192 --
193 -- Access Status:
194 --   Internal Development Use Only.
195 --
196 -- {End Of Comments}
197 -- ----------------------------------------------------------------------------
198 Function api_updating
199   (
200   p_position_description_id            in number,
201   p_object_version_number              in number
202   )      Return Boolean;
203 --
204 -- ----------------------------------------------------------------------------
205 -- |---------------------------------< lck >----------------------------------|
206 -- ----------------------------------------------------------------------------
207 -- {Start Of Comments}
208 --
209 -- Description:
210 --   The Lck process has two main functions to perform. Firstly, the row to be
211 --   updated or deleted must be locked. The locking of the row will only be
212 --   successful if the row is not currently locked by another user.
213 --   Secondly, during the locking of the row, the row is selected into
214 --   the g_old_rec data structure which enables the current row values from the
215 --   server to be available to the api.
216 --
217 -- Prerequisites:
218 --   When attempting to call the lock the object version number (if defined)
219 --   is mandatory.
220 --
221 -- In Parameters:
222 --   The arguments to the Lck process are the primary key(s) which uniquely
223 --   identify the row and the object version number of row.
224 --
225 -- Post Success:
226 --   On successful completion of the Lck process the row to be updated or
227 --   deleted will be locked and selected into the global data structure
228 --   g_old_rec.
229 --
230 -- Post Failure:
231 --   The Lck process can fail for three reasons:
232 --   1) When attempting to lock the row the row could already be locked by
233 --      another user. This will raise the HR_Api.Object_Locked exception.
234 --   2) The row which is required to be locked doesn't exist in the HR Schema.
235 --      This error is trapped and reported using the message name
236 --      'HR_7220_INVALID_PRIMARY_KEY'.
237 --   3) The row although existing in the HR Schema has a different object
238 --      version number than the object version number specified.
239 --      This error is trapped and reported using the message name
240 --      'HR_7155_OBJECT_INVALID'.
241 --
242 -- Developer Implementation Notes:
243 --   For each primary key and the object version number arguments add a
244 --   call to hr_api.mandatory_arg_error procedure to ensure that these
245 --   argument values are not null.
246 --
247 -- Access Status:
248 --   Internal Development Use Only.
249 --
250 -- {End Of Comments}
251 -- ----------------------------------------------------------------------------
252 Procedure lck
253   (
254   p_position_description_id            in number,
255   p_object_version_number              in number
256   );
257 --
258 -- ----------------------------------------------------------------------------
259 -- |-----------------------------< convert_args >-----------------------------|
260 -- ----------------------------------------------------------------------------
261 -- {Start Of Comments}
262 --
263 -- Description:
264 --   This function is used to turn attribute parameters into the record
265 --   structure parameter g_rec_type.
266 --
267 -- Prerequisites:
268 --   This is a private function and can only be called from the ins or upd
269 --   attribute processes.
270 --
271 -- In Parameters:
272 --
273 -- Post Success:
274 --   A returning record structure will be returned.
275 --
276 -- Post Failure:
277 --   No direct error handling is required within this function. Any possible
278 --   errors within this function will be a PL/SQL value error due to conversion
279 --   of datatypes or data lengths.
280 --
281 -- Developer Implementation Notes:
282 --   None.
283 --
284 -- Access Status:
285 --   Internal Row Handler Use Only.
286 --
287 -- {End Of Comments}
288 -- ----------------------------------------------------------------------------
289 Function convert_args
290 	(
291 	p_position_description_id       in number,
292 	p_routing_group_id              in number,
293 	p_date_from                     in date,
294 	p_date_to                       in date,
295 	p_opm_cert_num                  in varchar2,
296 	p_flsa                          in varchar2,
297 	p_financial_statement           in varchar2,
298 	p_subject_to_ia_action          in varchar2,
299 	p_position_status               in number,
300 	p_position_is                   in varchar2,
301 	p_position_sensitivity          in varchar2,
302 	p_competitive_level             in varchar2,
303 	p_pd_remarks                    in varchar2,
304 	p_position_class_std            in varchar2,
305 	p_category                      in varchar2,
306 	p_career_ladder                 in varchar2,
307         p_supervisor_name		in varchar2,
308   	p_supervisor_title 		in varchar2,
309   	p_supervisor_date               in date,
310   	p_manager_name		        in varchar2,
311   	p_manager_title 		in varchar2,
312   	p_manager_date                  in date,
313   	p_classifier_name		in varchar2,
314   	p_classifier_title 		in varchar2,
315   	p_classifier_date               in date,
316 	p_attribute_category            in varchar2,
317 	p_attribute1                    in varchar2,
318 	p_attribute2                    in varchar2,
319 	p_attribute3                    in varchar2,
320 	p_attribute4                    in varchar2,
321 	p_attribute5                    in varchar2,
322 	p_attribute6                    in varchar2,
323 	p_attribute7                    in varchar2,
324 	p_attribute8                    in varchar2,
325 	p_attribute9                    in varchar2,
326 	p_attribute10                   in varchar2,
327 	p_attribute11                   in varchar2,
328 	p_attribute12                   in varchar2,
329 	p_attribute13                   in varchar2,
330 	p_attribute14                   in varchar2,
331 	p_attribute15                   in varchar2,
332 	p_attribute16                   in varchar2,
333 	p_attribute17                   in varchar2,
334 	p_attribute18                   in varchar2,
335 	p_attribute19                   in varchar2,
336 	p_attribute20                   in varchar2,
340 	Return g_rec_type;
337         p_business_group_id             in number,
338 	p_object_version_number         in number
339 	)
341 --
342 end ghr_pdi_shd;