DBA Data[Home] [Help]

PACKAGE: APPS.PER_ZA_EQT_SHD

Source


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