1 Package per_za_qua_shd AUTHID CURRENT_USER as
2 /* $Header: pezaqush.pkh 115.0 2001/02/04 22:35:31 pkm ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Global Record Type Specification |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_za_rec_type Is Record
9 (
10 qualification_id number(9),
11 level_id number(9),
12 field_of_learning varchar2(30),
13 sub_field varchar2(120),
14 registration_date date,
15 registration_number varchar2(10)
16 );
17 --
18 -- ----------------------------------------------------------------------------
19 -- | Global Definitions - Internal Development Use Only |
20 -- ----------------------------------------------------------------------------
21 --
22 g_old_rec g_za_rec_type; -- Global record definition
23 g_api_dml boolean; -- Global api dml status
24 --
25 -- ----------------------------------------------------------------------------
26 -- |------------------------< return_api_dml_status >-------------------------|
27 -- ----------------------------------------------------------------------------
28 -- {Start Of Comments}
29 --
30 -- Description:
31 -- This function will return the current g_api_dml private global
32 -- boolean status.
33 -- The g_api_dml status determines if at the time of the function
34 -- being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
35 -- is being issued from within an api.
36 -- If the status is TRUE then a dml statement is being issued from
37 -- within this entity api.
38 -- This function is primarily to support database triggers which
39 -- need to maintain the object_version_number for non-supported
40 -- dml statements (i.e. dml statement issued outside of the api layer).
41 --
42 -- Pre Conditions:
43 -- None.
44 --
45 -- In Parameters:
46 -- None.
47 --
48 -- Post Success:
49 -- Processing continues.
50 -- If the function returns a TRUE value then, dml is being executed from
51 -- within this api.
52 --
53 -- Post Failure:
54 -- None.
55 --
56 -- Access Status:
57 -- Internal Table Handler Use Only.
58 --
59 -- {End Of Comments}
60 -- ----------------------------------------------------------------------------
61 Function return_api_dml_status Return Boolean;
62 --
63 -- ----------------------------------------------------------------------------
64 -- |---------------------------< constraint_error >---------------------------|
65 -- ----------------------------------------------------------------------------
66 -- {Start Of Comments}
67 --
68 -- Description:
69 -- This procedure is called when a constraint has been violated (i.e.
70 -- The exception hr_api.check_integrity_violated,
71 -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
72 -- hr_api.unique_integrity_violated has been raised).
73 -- The exceptions can only be raised as follows:
74 -- 1) A check constraint can only be violated during an INSERT or UPDATE
75 -- dml operation.
76 -- 2) A parent integrity constraint can only be violated during an
77 -- INSERT or UPDATE dml operation.
78 -- 3) A child integrity constraint can only be violated during an
79 -- DELETE dml operation.
80 -- 4) A unique integrity constraint can only be violated during INSERT or
81 -- UPDATE dml operation.
82 --
83 -- Pre Conditions:
84 -- 1) Either hr_api.check_integrity_violated,
85 -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
86 -- hr_api.unique_integrity_violated has been raised with the subsequent
87 -- stripping of the constraint name from the generated error message
88 -- text.
89 -- 2) Standalone validation test which corresponds with a constraint error.
90 --
91 -- In Parameter:
92 -- p_constraint_name is in upper format and is just the constraint name
93 -- (e.g. not prefixed by brackets, schema owner etc).
94 --
95 -- Post Success:
96 -- Development dependant.
97 --
98 -- Post Failure:
99 -- Developement dependant.
100 --
101 -- Developer Implementation Notes:
102 -- For each constraint being checked the hr system package failure message
103 -- has been generated as a template only. These system error messages should
104 -- be modified as required (i.e. change the system failure message to a user
105 -- friendly defined error message).
106 --
107 -- Access Status:
108 -- Internal Development Use Only.
109 --
110 -- {End Of Comments}
111 -- ----------------------------------------------------------------------------
112 Procedure constraint_error
113 (p_constraint_name in all_constraints.constraint_name%TYPE);
114 --
115 -- ----------------------------------------------------------------------------
116 -- |---------------------------------< lck >----------------------------------|
117 -- ----------------------------------------------------------------------------
118 -- {Start Of Comments}
119 --
120 -- Description:
121 -- The Lck process has two main functions to perform. Firstly, the row to be
122 -- updated or deleted must be locked. The locking of the row will only be
123 -- successful if the row is not currently locked by another user.
124 -- Secondly, during the locking of the row, the row is selected into
125 -- the g_old_rec data structure which enables the current row values from the
126 -- server to be available to the api.
127 --
128 -- Pre Conditions:
129 -- When attempting to call the lock the object version number (if defined)
130 -- is mandatory.
131 --
132 -- In Parameters:
133 -- The arguments to the Lck process are the primary key(s) which uniquely
134 -- identify the row and the object version number of row.
135 --
136 -- Post Success:
137 -- On successful completion of the Lck process the row to be updated or
138 -- deleted will be locked and selected into the global data structure
139 -- g_old_rec.
140 --
141 -- Post Failure:
142 -- The Lck process can fail for three reasons:
143 -- 1) When attempting to lock the row the row could already be locked by
144 -- another user. This will raise the HR_Api.Object_Locked exception.
145 -- 2) The row which is required to be locked doesn't exist in the HR Schema.
146 -- This error is trapped and reported using the message name
147 -- 'HR_7220_INVALID_PRIMARY_KEY'.
148 -- 3) The row although existing in the HR Schema has a different object
149 -- version number than the object version number specified.
150 -- This error is trapped and reported using the message name
151 -- 'HR_7155_OBJECT_INVALID'.
152 --
153 -- Developer Implementation Notes:
154 -- For each primary key and the object version number arguments add a
155 -- call to hr_api.mandatory_arg_error procedure to ensure that these
156 -- argument values are not null.
157 --
158 -- Access Status:
159 -- Internal Development Use Only.
160 --
161 -- {End Of Comments}
162 -- ----------------------------------------------------------------------------
163 Procedure lck
164 (
165 p_qualification_id in per_subjects_taken.QUALIFICATION_ID%TYPE
166 );
167 --
168 -- ----------------------------------------------------------------------------
169 -- |-----------------------------< convert_args >-----------------------------|
170 -- ----------------------------------------------------------------------------
171 -- {Start Of Comments}
172 --
173 -- Description:
174 -- This function is used to turn attribute parameters into the record
175 -- structure parameter g_rec_type.
176 --
177 -- Pre Conditions:
178 -- This is a private function and can only be called from the ins or upd
179 -- attribute processes.
180 --
181 -- In Parameters:
182 --
183 -- Post Success:
184 -- A returning record structure will be returned.
185 --
186 -- Post Failure:
187 -- No direct error handling is required within this function. Any possible
188 -- errors within this function will be a PL/SQL value error due to conversion
189 -- of datatypes or data lengths.
190 --
191 -- Developer Implementation Notes:
192 -- None.
193 --
194 -- Access Status:
195 -- Internal Table Handler Use Only.
196 --
197 -- {End Of Comments}
198 -- ----------------------------------------------------------------------------
199 Function convert_args
200 (
201 p_qualification_id in number,
202 p_level_id in number,
203 p_field_of_learning in varchar2,
204 p_sub_field in varchar2,
205 p_registration_date in date,
206 p_registration_number in varchar2
207 )
208 Return g_za_rec_type;
209 --
210 end per_za_qua_shd ;