DBA Data[Home] [Help]

PACKAGE: APPS.PER_AST_SHD

Source


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