DBA Data[Home] [Help]

PACKAGE: APPS.PER_PMA_SHD

Source


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