DBA Data[Home] [Help]

PACKAGE: APPS.PQH_WDT_SHD

Source


1 Package pqh_wdt_shd as
2 /* $Header: pqwdtrhi.pkh 120.0.12000000.1 2007/01/17 00:29:48 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (
10   worksheet_detail_id               number(15),
11   worksheet_id                      number(15),
12   organization_id                   number(15),
13   job_id                            number(15),
14   position_id                       number(15),
15   grade_id                          number(15),
16   position_transaction_id           number(15),
17   budget_detail_id                  number(15),
18   parent_worksheet_detail_id        number(15),
19   user_id                           number(15),
20   action_cd                         varchar2(30),
21   budget_unit1_percent              number(15,2),
22   budget_unit1_value                number,
23   budget_unit2_percent              number(15,2),
24   budget_unit2_value                number,
25   budget_unit3_percent              number(15,2),
26   budget_unit3_value                number,
27   object_version_number             number(9),
28   budget_unit1_value_type_cd        varchar2(30),
29   budget_unit2_value_type_cd        varchar2(30),
30   budget_unit3_value_type_cd        varchar2(30),
31   status                            varchar2(10),
32   budget_unit1_available            number,
33   budget_unit2_available            number,
34   budget_unit3_available            number,
35   old_unit1_value                   number,
36   old_unit2_value                   number,
37   old_unit3_value                   number,
38   defer_flag                        varchar2(10),
39   propagation_method                varchar2(9)
40   );
41 --
42 -- ----------------------------------------------------------------------------
43 -- |           Global Definitions - Internal Development Use Only             |
44 -- ----------------------------------------------------------------------------
45 --
46 g_old_rec  g_rec_type;                            -- Global record definition
47 --
48 --
49 -- ----------------------------------------------------------------------------
50 -- |---------------------------< constraint_error >---------------------------|
51 -- ----------------------------------------------------------------------------
52 -- {Start Of Comments}
53 --
54 -- Description:
55 --   This procedure is called when a constraint has been violated (i.e.
56 --   The exception hr_api.check_integrity_violated,
57 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
58 --   hr_api.unique_integrity_violated has been raised).
59 --   The exceptions can only be raised as follows:
60 --   1) A check constraint can only be violated during an INSERT or UPDATE
61 --      dml operation.
62 --   2) A parent integrity constraint can only be violated during an
63 --      INSERT or UPDATE dml operation.
64 --   3) A child integrity constraint can only be violated during an
65 --      DELETE dml operation.
66 --   4) A unique integrity constraint can only be violated during INSERT or
67 --      UPDATE dml operation.
68 --
69 -- Prerequisites:
70 --   1) Either 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 with the subsequent
73 --      stripping of the constraint name from the generated error message
74 --      text.
75 --   2) Standalone validation test which corresponds with a constraint error.
76 --
77 -- In Parameter:
78 --   p_constraint_name is in upper format and is just the constraint name
79 --   (e.g. not prefixed by brackets, schema owner etc).
80 --
81 -- Post Success:
82 --   Development dependant.
83 --
84 -- Post Failure:
85 --   Developement dependant.
86 --
87 -- Developer Implementation Notes:
88 --   For each constraint being checked the hr system package failure message
89 --   has been generated as a template only. These system error messages should
90 --   be modified as required (i.e. change the system failure message to a user
91 --   friendly defined error message).
92 --
93 -- Access Status:
94 --   Internal Development Use Only.
95 --
96 -- {End Of Comments}
97 -- ----------------------------------------------------------------------------
98 Procedure constraint_error
99             (p_constraint_name in all_constraints.constraint_name%TYPE);
100 --
101 -- ----------------------------------------------------------------------------
102 -- |-----------------------------< api_updating >-----------------------------|
103 -- ----------------------------------------------------------------------------
104 -- {Start Of Comments}
105 --
106 -- Description:
107 --   This function is used to populate the g_old_rec record with the
108 --   current row from the database for the specified primary key
109 --   provided that the primary key exists and is valid and does not
110 --   already match the current g_old_rec. The function will always return
111 --   a TRUE value if the g_old_rec is populated with the current row.
112 --   A FALSE value will be returned if all of the primary key arguments
113 --   are null.
114 --
115 -- Prerequisites:
116 --   None.
117 --
118 -- In Parameters:
119 --
120 -- Post Success:
121 --   A value of TRUE will be returned indiciating that the g_old_rec
122 --   is current.
123 --   A value of FALSE will be returned if all of the primary key arguments
124 --   have a null value (this indicates that the row has not be inserted into
125 --   the Schema), and therefore could never have a corresponding row.
126 --
127 -- Post Failure:
128 --   A failure can only occur under two circumstances:
129 --   1) The primary key is invalid (i.e. a row does not exist for the
130 --      specified primary key values).
131 --   2) If an object_version_number exists but is NOT the same as the current
132 --      g_old_rec value.
133 --
134 -- Developer Implementation Notes:
135 --   None.
136 --
137 -- Access Status:
138 --   Internal Development Use Only.
139 --
140 -- {End Of Comments}
141 -- ----------------------------------------------------------------------------
142 Function api_updating
143   (
144   p_worksheet_detail_id                in number,
145   p_object_version_number              in number
146   )      Return Boolean;
147 --
148 -- ----------------------------------------------------------------------------
149 -- |---------------------------------< lck >----------------------------------|
150 -- ----------------------------------------------------------------------------
151 -- {Start Of Comments}
152 --
153 -- Description:
154 --   The Lck process has two main functions to perform. Firstly, the row to be
155 --   updated or deleted must be locked. The locking of the row will only be
156 --   successful if the row is not currently locked by another user.
157 --   Secondly, during the locking of the row, the row is selected into
158 --   the g_old_rec data structure which enables the current row values from the
159 --   server to be available to the api.
160 --
161 -- Prerequisites:
162 --   When attempting to call the lock the object version number (if defined)
163 --   is mandatory.
164 --
165 -- In Parameters:
166 --   The arguments to the Lck process are the primary key(s) which uniquely
167 --   identify the row and the object version number of row.
168 --
169 -- Post Success:
170 --   On successful completion of the Lck process the row to be updated or
171 --   deleted will be locked and selected into the global data structure
172 --   g_old_rec.
173 --
174 -- Post Failure:
175 --   The Lck process can fail for three reasons:
176 --   1) When attempting to lock the row the row could already be locked by
177 --      another user. This will raise the HR_Api.Object_Locked exception.
178 --   2) The row which is required to be locked doesn't exist in the HR Schema.
179 --      This error is trapped and reported using the message name
180 --      'HR_7220_INVALID_PRIMARY_KEY'.
181 --   3) The row although existing in the HR Schema has a different object
182 --      version number than the object version number specified.
183 --      This error is trapped and reported using the message name
184 --      'HR_7155_OBJECT_INVALID'.
185 --
186 -- Developer Implementation Notes:
187 --   For each primary key and the object version number arguments add a
188 --   call to hr_api.mandatory_arg_error procedure to ensure that these
189 --   argument values are not null.
190 --
191 -- Access Status:
192 --   Internal Development Use Only.
193 --
194 -- {End Of Comments}
195 -- ----------------------------------------------------------------------------
196 Procedure lck
197   (
198   p_worksheet_detail_id                in number,
199   p_object_version_number              in number
200   );
201 --
202 -- ----------------------------------------------------------------------------
203 -- |-----------------------------< convert_args >-----------------------------|
204 -- ----------------------------------------------------------------------------
205 -- {Start Of Comments}
206 --
207 -- Description:
208 --   This function is used to turn attribute parameters into the record
209 --   structure parameter g_rec_type.
210 --
211 -- Prerequisites:
212 --   This is a private function and can only be called from the ins or upd
213 --   attribute processes.
214 --
215 -- In Parameters:
216 --
217 -- Post Success:
218 --   A returning record structure will be returned.
219 --
220 -- Post Failure:
221 --   No direct error handling is required within this function. Any possible
222 --   errors within this function will be a PL/SQL value error due to conversion
223 --   of datatypes or data lengths.
224 --
225 -- Developer Implementation Notes:
226 --   None.
227 --
228 -- Access Status:
229 --   Internal Row Handler Use Only.
230 --
231 -- {End Of Comments}
232 -- ----------------------------------------------------------------------------
233 Function convert_args
234 	(
235 	p_worksheet_detail_id           in number,
236 	p_worksheet_id                  in number,
237 	p_organization_id               in number,
238 	p_job_id                        in number,
239 	p_position_id                   in number,
240 	p_grade_id                      in number,
241 	p_position_transaction_id       in number,
242 	p_budget_detail_id              in number,
243 	p_parent_worksheet_detail_id    in number,
244 	p_user_id                       in number,
245 	p_action_cd                     in varchar2,
246 	p_budget_unit1_percent          in number,
247 	p_budget_unit1_value            in number,
248 	p_budget_unit2_percent          in number,
249 	p_budget_unit2_value            in number,
250 	p_budget_unit3_percent          in number,
251 	p_budget_unit3_value            in number,
252 	p_object_version_number         in number,
253 	p_budget_unit1_value_type_cd    in varchar2,
254 	p_budget_unit2_value_type_cd    in varchar2,
255 	p_budget_unit3_value_type_cd    in varchar2,
256 	p_status                        in varchar2,
257 	p_budget_unit1_available        in number,
258 	p_budget_unit2_available        in number,
259 	p_budget_unit3_available        in number,
260 	p_old_unit1_value               in number,
261 	p_old_unit2_value               in number,
262 	p_old_unit3_value               in number,
263 	p_defer_flag                    in varchar2,
264 	p_propagation_method            in varchar2
265 	)
266 	Return g_rec_type;
267 --
268 end pqh_wdt_shd;