DBA Data[Home] [Help]

PACKAGE: APPS.PQH_TCA_SHD

Source


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