DBA Data[Home] [Help]

PACKAGE: APPS.PER_PML_SHD

Source


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