DBA Data[Home] [Help]

PACKAGE: APPS.PER_RSC_SHD

Source


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