DBA Data[Home] [Help]

PACKAGE: APPS.PQH_TCT_SHD

Source


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