DBA Data[Home] [Help]

PACKAGE: APPS.PQH_RST_SHD

Source


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