DBA Data[Home] [Help]

PACKAGE: APPS.PQH_ATT_SHD

Source


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