DBA Data[Home] [Help]

PACKAGE: APPS.PQP_ERT_SHD

Source


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