DBA Data[Home] [Help]

PACKAGE: APPS.PER_ASR_SHD

Source


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