DBA Data[Home] [Help]

PACKAGE: APPS.PER_SSM_SHD

Source


1 Package per_ssm_shd as
2 /* $Header: pessmrhi.pkh 120.0 2005/05/31 21:51:12 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (
10   object_version_number             number(9),
11   salary_survey_mapping_id          number(15),
12   parent_id                         number(15),
13   parent_table_name                 varchar2(30),
14   salary_survey_line_id             number(15),
15   business_group_id                 number(15),
16   location_id                       number(15),
17   grade_id                          number(15),
18   company_organization_id           number(15),
19   company_age_code                  varchar2(30),
20   attribute_category                varchar2(30),
21   attribute1                        varchar2(150),
22   attribute2                        varchar2(150),
23   attribute3                        varchar2(150),
24   attribute4                        varchar2(150),
25   attribute5                        varchar2(150),
26   attribute6                        varchar2(150),
27   attribute7                        varchar2(150),
28   attribute8                        varchar2(150),
29   attribute9                        varchar2(150),
30   attribute10                       varchar2(150),
31   attribute11                       varchar2(150),
32   attribute12                       varchar2(150),
33   attribute13                       varchar2(150),
34   attribute14                       varchar2(150),
35   attribute15                       varchar2(150),
36   attribute16                       varchar2(150),
37   attribute17                       varchar2(150),
38   attribute18                       varchar2(150),
39   attribute19                       varchar2(150),
40   attribute20                       varchar2(150)
41   );
42 --
43 -- ----------------------------------------------------------------------------
44 -- |           Global Definitions - Internal Development Use Only             |
45 -- ----------------------------------------------------------------------------
46 --
47 g_old_rec  g_rec_type;                            -- Global record definition
48 g_api_dml  boolean;                               -- Global api dml status
49 --
50 -- ----------------------------------------------------------------------------
51 -- |------------------------< return_api_dml_status >-------------------------|
52 -- ----------------------------------------------------------------------------
53 -- {Start Of Comments}
54 --
55 -- Description:
56 --   This function will return the current g_api_dml private global
57 --   boolean status.
58 --   The g_api_dml status determines if at the time of the function
59 --   being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
60 --   is being issued from within an api.
61 --   If the status is TRUE then a dml statement is being issued from
62 --   within this entity api.
63 --   This function is primarily to support database triggers which
64 --   need to maintain the object_version_number for non-supported
65 --   dml statements (i.e. dml statement issued outside of the api layer).
66 --
67 -- Prerequisites:
68 --   None.
69 --
70 -- In Parameters:
71 --   None.
72 --
73 -- Post Success:
74 --   Processing continues.
75 --   If the function returns a TRUE value then, dml is being executed from
76 --   within this api.
77 --
78 -- Post Failure:
79 --   None.
80 --
81 -- Access Status:
82 --   Internal Row Handler Use Only.
83 --
84 -- {End Of Comments}
85 -- ----------------------------------------------------------------------------
86 Function return_api_dml_status Return Boolean;
87 --
88 -- ----------------------------------------------------------------------------
89 -- |---------------------------< constraint_error >---------------------------|
90 -- ----------------------------------------------------------------------------
91 -- {Start Of Comments}
92 --
93 -- Description:
94 --   This procedure is called when a constraint has been violated (i.e.
95 --   The exception hr_api.check_integrity_violated,
96 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
97 --   hr_api.unique_integrity_violated has been raised).
98 --   The exceptions can only be raised as follows:
99 --   1) A check constraint can only be violated during an INSERT or UPDATE
100 --      dml operation.
101 --   2) A parent integrity constraint can only be violated during an
102 --      INSERT or UPDATE dml operation.
103 --   3) A child integrity constraint can only be violated during an
104 --      DELETE dml operation.
105 --   4) A unique integrity constraint can only be violated during INSERT or
106 --      UPDATE dml operation.
107 --
108 -- Prerequisites:
109 --   1) Either hr_api.check_integrity_violated,
110 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
111 --      hr_api.unique_integrity_violated has been raised with the subsequent
112 --      stripping of the constraint name from the generated error message
113 --      text.
114 --   2) Standalone validation test which corresponds with a constraint error.
115 --
116 -- In Parameter:
117 --   p_constraint_name is in upper format and is just the constraint name
118 --   (e.g. not prefixed by brackets, schema owner etc).
119 --
120 -- Post Success:
121 --   Development dependant.
122 --
123 -- Post Failure:
124 --   Developement dependant.
125 --
126 -- Developer Implementation Notes:
127 --   For each constraint being checked the hr system package failure message
128 --   has been generated as a template only. These system error messages should
129 --   be modified as required (i.e. change the system failure message to a user
130 --   friendly defined error message).
131 --
132 -- Access Status:
133 --   Internal Development Use Only.
134 --
135 -- {End Of Comments}
136 -- ----------------------------------------------------------------------------
137 Procedure constraint_error
138             (p_constraint_name in all_constraints.constraint_name%TYPE);
139 --
140 -- ----------------------------------------------------------------------------
141 -- |-----------------------------< api_updating >-----------------------------|
142 -- ----------------------------------------------------------------------------
143 -- {Start Of Comments}
144 --
145 -- Description:
146 --   This function is used to populate the g_old_rec record with the
147 --   current row from the database for the specified primary key
148 --   provided that the primary key exists and is valid and does not
149 --   already match the current g_old_rec. The function will always return
150 --   a TRUE value if the g_old_rec is populated with the current row.
151 --   A FALSE value will be returned if all of the primary key arguments
152 --   are null.
153 --
154 -- Prerequisites:
155 --   None.
156 --
157 -- In Parameters:
158 --
159 -- Post Success:
160 --   A value of TRUE will be returned indiciating that the g_old_rec
161 --   is current.
162 --   A value of FALSE will be returned if all of the primary key arguments
163 --   have a null value (this indicates that the row has not be inserted into
164 --   the Schema), and therefore could never have a corresponding row.
165 --
166 -- Post Failure:
167 --   A failure can only occur under two circumstances:
168 --   1) The primary key is invalid (i.e. a row does not exist for the
169 --      specified primary key values).
170 --   2) If an object_version_number exists but is NOT the same as the current
171 --      g_old_rec value.
172 --
173 -- Developer Implementation Notes:
174 --   None.
175 --
176 -- Access Status:
177 --   Internal Development Use Only.
178 --
179 -- {End Of Comments}
180 -- ----------------------------------------------------------------------------
181 Function api_updating
182   (
183   p_salary_survey_mapping_id           in number,
184   p_object_version_number              in number
185   )      Return Boolean;
186 --
187 -- ----------------------------------------------------------------------------
188 -- |---------------------------------< lck >----------------------------------|
189 -- ----------------------------------------------------------------------------
190 -- {Start Of Comments}
191 --
192 -- Description:
193 --   The Lck process has two main functions to perform. Firstly, the row to be
194 --   updated or deleted must be locked. The locking of the row will only be
195 --   successful if the row is not currently locked by another user.
196 --   Secondly, during the locking of the row, the row is selected into
197 --   the g_old_rec data structure which enables the current row values from the
198 --   server to be available to the api.
199 --
200 -- Prerequisites:
201 --   When attempting to call the lock the object version number (if defined)
202 --   is mandatory.
203 --
204 -- In Parameters:
205 --   The arguments to the Lck process are the primary key(s) which uniquely
206 --   identify the row and the object version number of row.
207 --
208 -- Post Success:
209 --   On successful completion of the Lck process the row to be updated or
210 --   deleted will be locked and selected into the global data structure
211 --   g_old_rec.
212 --
213 -- Post Failure:
214 --   The Lck process can fail for three reasons:
215 --   1) When attempting to lock the row the row could already be locked by
216 --      another user. This will raise the HR_Api.Object_Locked exception.
217 --   2) The row which is required to be locked doesn't exist in the HR Schema.
218 --      This error is trapped and reported using the message name
219 --      'HR_7220_INVALID_PRIMARY_KEY'.
220 --   3) The row although existing in the HR Schema has a different object
221 --      version number than the object version number specified.
222 --      This error is trapped and reported using the message name
223 --      'HR_7155_OBJECT_INVALID'.
224 --
225 -- Developer Implementation Notes:
226 --   For each primary key and the object version number arguments add a
227 --   call to hr_api.mandatory_arg_error procedure to ensure that these
228 --   argument values are not null.
229 --
230 -- Access Status:
231 --   Internal Development Use Only.
232 --
233 -- {End Of Comments}
234 -- ----------------------------------------------------------------------------
235 Procedure lck
236   (
237   p_salary_survey_mapping_id           in number,
238   p_object_version_number              in number
239   );
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 conversion
262 --   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 -- ----------------------------------------------------------------------------
272 Function convert_args
273 	(
274 	p_object_version_number         in number,
275 	p_salary_survey_mapping_id      in number,
276 	p_parent_id                     in number,
277 	p_parent_table_name             in varchar2,
278 	p_salary_survey_line_id         in number,
279 	p_business_group_id             in number,
280 	p_location_id                   in number,
281 	p_grade_id                      in number,
282 	p_company_organization_id       in number,
283 	p_company_age_code              in varchar2,
284 	p_attribute_category            in varchar2,
285 	p_attribute1                    in varchar2,
286 	p_attribute2                    in varchar2,
287 	p_attribute3                    in varchar2,
288 	p_attribute4                    in varchar2,
289 	p_attribute5                    in varchar2,
290 	p_attribute6                    in varchar2,
291 	p_attribute7                    in varchar2,
292 	p_attribute8                    in varchar2,
293 	p_attribute9                    in varchar2,
294 	p_attribute10                   in varchar2,
295 	p_attribute11                   in varchar2,
296 	p_attribute12                   in varchar2,
297 	p_attribute13                   in varchar2,
298 	p_attribute14                   in varchar2,
299 	p_attribute15                   in varchar2,
300 	p_attribute16                   in varchar2,
301 	p_attribute17                   in varchar2,
302 	p_attribute18                   in varchar2,
303 	p_attribute19                   in varchar2,
304 	p_attribute20                   in varchar2
305 	)
306 	Return g_rec_type;
307 --
308 end per_ssm_shd;