DBA Data[Home] [Help]

PACKAGE: APPS.PER_ROL_SHD

Source


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