DBA Data[Home] [Help]

PACKAGE: APPS.PER_PJU_SHD

Source


1 Package per_pju_shd AUTHID CURRENT_USER as
2 /* $Header: pepjurhi.pkh 120.0 2005/05/31 14:24:40 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (previous_job_usage_id           number(15)
10   ,assignment_id                   number(15)
11   ,previous_employer_id            number(15)
12   ,previous_job_id                 number(15)
13   ,start_date                      date
14   ,end_date                        date
15   ,period_years                    number(9)
16   ,period_months                   number(9)
17   ,period_days                     number(9)
18   ,pju_attribute_category          varchar2(30)
19   ,pju_attribute1                  varchar2(150)
20   ,pju_attribute2                  varchar2(150)
21   ,pju_attribute3                  varchar2(150)
22   ,pju_attribute4                  varchar2(150)
23   ,pju_attribute5                  varchar2(150)
24   ,pju_attribute6                  varchar2(150)
25   ,pju_attribute7                  varchar2(150)
26   ,pju_attribute8                  varchar2(150)
27   ,pju_attribute9                  varchar2(150)
28   ,pju_attribute10                 varchar2(150)
29   ,pju_attribute11                 varchar2(150)
30   ,pju_attribute12                 varchar2(150)
31   ,pju_attribute13                 varchar2(150)
32   ,pju_attribute14                 varchar2(150)
33   ,pju_attribute15                 varchar2(150)
34   ,pju_attribute16                 varchar2(150)
35   ,pju_attribute17                 varchar2(150)
36   ,pju_attribute18                 varchar2(150)
37   ,pju_attribute19                 varchar2(150)
38   ,pju_attribute20                 varchar2(150)
39   ,pju_information_category        varchar2(30)
40   ,pju_information1                varchar2(150)
41   ,pju_information2                varchar2(150)
42   ,pju_information3                varchar2(150)
43   ,pju_information4                varchar2(150)
44   ,pju_information5                varchar2(150)
45   ,pju_information6                varchar2(150)
46   ,pju_information7                varchar2(150)
47   ,pju_information8                varchar2(150)
48   ,pju_information9                varchar2(150)
49   ,pju_information10               varchar2(150)
50   ,pju_information11               varchar2(150)
51   ,pju_information12               varchar2(150)
52   ,pju_information13               varchar2(150)
53   ,pju_information14               varchar2(150)
54   ,pju_information15               varchar2(150)
55   ,pju_information16               varchar2(150)
56   ,pju_information17               varchar2(150)
57   ,pju_information18               varchar2(150)
58   ,pju_information19               varchar2(150)
59   ,pju_information20               varchar2(150)
60   ,object_version_number           number(9)
61   );
62 --
63 -- ----------------------------------------------------------------------------
64 -- |           Global Definitions - Internal Development Use Only             |
65 -- ----------------------------------------------------------------------------
66 --
67 g_old_rec  g_rec_type;                            -- Global record definition
68 --
69 -- ----------------------------------------------------------------------------
70 -- |---------------------------< constraint_error >---------------------------|
71 -- ----------------------------------------------------------------------------
72 -- {Start Of Comments}
73 --
74 -- Description:
75 --   This procedure is called when a constraint has been violated (i.e.
76 --   The exception hr_api.check_integrity_violated,
77 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
78 --   hr_api.unique_integrity_violated has been raised).
79 --   The exceptions can only be raised as follows:
80 --   1) A check constraint can only be violated during an INSERT or UPDATE
81 --      dml operation.
82 --   2) A parent integrity constraint can only be violated during an
83 --      INSERT or UPDATE dml operation.
84 --   3) A child integrity constraint can only be violated during an
85 --      DELETE dml operation.
86 --   4) A unique integrity constraint can only be violated during INSERT or
87 --      UPDATE dml operation.
88 --
89 -- Prerequisites:
90 --   1) Either hr_api.check_integrity_violated,
91 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
92 --      hr_api.unique_integrity_violated has been raised with the subsequent
93 --      stripping of the constraint name from the generated error message
94 --      text.
95 --   2) Standalone validation test which corresponds with a constraint error.
96 --
97 -- In Parameter:
98 --   p_constraint_name is in upper format and is just the constraint name
99 --   (e.g. not prefixed by brackets, schema owner etc).
100 --
101 -- Post Success:
102 --   Development dependant.
103 --
104 -- Post Failure:
105 --   Developement dependant.
106 --
107 -- Developer Implementation Notes:
108 --   For each constraint being checked the hr system package failure message
109 --   has been generated as a template only. These system error messages should
110 --   be modified as required (i.e. change the system failure message to a user
111 --   friendly defined error message).
112 --
113 -- Access Status:
114 --   Internal Development Use Only.
115 --
116 -- {End Of Comments}
117 -- ----------------------------------------------------------------------------
118 Procedure constraint_error
119   (p_constraint_name in all_constraints.constraint_name%TYPE);
120 --
121 -- ----------------------------------------------------------------------------
122 -- |-----------------------------< api_updating >-----------------------------|
123 -- ----------------------------------------------------------------------------
124 --  {Start Of Comments}
125 --
126 -- Description:
127 --   This function is used to populate the g_old_rec record with the
128 --   current row from the database for the specified primary key
129 --   provided that the primary key exists and is valid and does not
130 --   already match the current g_old_rec. The function will always return
131 --   a TRUE value if the g_old_rec is populated with the current row.
132 --   A FALSE value will be returned if all of the primary key arguments
133 --   are null.
134 --
135 -- Prerequisites:
136 --   None.
137 --
138 -- In Parameters:
139 --
140 -- Post Success:
141 --   A value of TRUE will be returned indiciating that the g_old_rec
142 --   is current.
143 --   A value of FALSE will be returned if all of the primary key arguments
144 --   have a null value (this indicates that the row has not be inserted into
145 --   the Schema), and therefore could never have a corresponding row.
146 --
147 -- Post Failure:
148 --   A failure can only occur under two circumstances:
149 --   1) The primary key is invalid (i.e. a row does not exist for the
150 --      specified primary key values).
151 --   2) If an object_version_number exists but is NOT the same as the current
152 --      g_old_rec value.
153 --
154 -- Developer Implementation Notes:
155 --   None.
156 --
157 -- Access Status:
158 --   Internal Development Use Only.
159 --
160 -- {End Of Comments}
161 -- ----------------------------------------------------------------------------
162 Function api_updating
163   (p_previous_job_usage_id                in     number
164   ,p_object_version_number                in     number
165   )      Return Boolean;
166 --
167 -- ----------------------------------------------------------------------------
168 -- |---------------------------------< lck >----------------------------------|
169 -- ----------------------------------------------------------------------------
170 -- {Start of comments}
171 --
172 -- Description:
173 --   The Lck process has two main functions to perform. Firstly, the row to be
174 --   updated or deleted must be locked. The locking of the row will only be
175 --   successful if the row is not currently locked by another user.
176 --   Secondly, during the locking of the row, the row is selected into
177 --   the g_old_rec data structure which enables the current row values from
178 --   the server to be available to the api.
179 --
180 -- Prerequisites:
181 --   When attempting to call the lock the object version number (if defined)
182 --   is mandatory.
183 --
184 -- In Parameters:
185 --   The arguments to the Lck process are the primary key(s) which uniquely
186 --   identify the row and the object version number of row.
187 --
188 -- Post Success:
189 --   On successful completion of the Lck process the row to be updated or
190 --   deleted will be locked and selected into the global data structure
191 --   g_old_rec.
192 --
193 -- Post Failure:
194 --   The Lck process can fail for three reasons:
195 --   1) When attempting to lock the row the row could already be locked by
196 --      another user. This will raise the HR_Api.Object_Locked exception.
197 --   2) The row which is required to be locked doesn't exist in the HR Schema.
198 --      This error is trapped and reported using the message name
199 --      'HR_7220_INVALID_PRIMARY_KEY'.
200 --   3) The row although existing in the HR Schema has a different object
201 --      version number than the object version number specified.
202 --      This error is trapped and reported using the message name
203 --      'HR_7155_OBJECT_INVALID'.
204 --
205 -- Developer Implementation Notes:
206 --   For each primary key and the object version number arguments add a
207 --   call to hr_api.mandatory_arg_error procedure to ensure that these
208 --   argument values are not null.
209 --
210 -- Access Status:
211 --   Internal Development Use Only.
212 --
213 -- {End of comments}
214 -- ----------------------------------------------------------------------------
215 Procedure lck
216   (p_previous_job_usage_id                in     number
217   ,p_object_version_number                in     number
218   );
219 --
220 -- ----------------------------------------------------------------------------
221 -- |-----------------------------< convert_args >-----------------------------|
222 -- ----------------------------------------------------------------------------
223 -- {Start Of Comments}
224 --
225 -- Description:
226 --   This function is used to turn attribute parameters into the record
227 --   structure parameter g_rec_type.
228 --
229 -- Prerequisites:
230 --   This is a private function and can only be called from the ins or upd
231 --   attribute processes.
232 --
233 -- In Parameters:
234 --
235 -- Post Success:
236 --   A returning record structure will be returned.
237 --
238 -- Post Failure:
239 --   No direct error handling is required within this function.  Any possible
240 --   errors within this function will be a PL/SQL value error due to
241 --   conversion of datatypes or data lengths.
242 --
243 -- Developer Implementation Notes:
244 --   None.
245 --
246 -- Access Status:
247 --   Internal Row Handler Use Only.
248 --
249 -- {End Of Comments}
250 -- ----------------------------------------------------------------------------
251 Function convert_args
252   (p_previous_job_usage_id          in number
253   ,p_assignment_id                  in number
254   ,p_previous_employer_id           in number
255   ,p_previous_job_id                in number
256   ,p_start_date                     in date
257   ,p_end_date                       in date
258   ,p_period_years                   in number
259   ,p_period_months                  in number
260   ,p_period_days                    in number
261   ,p_pju_attribute_category         in varchar2
262   ,p_pju_attribute1                 in varchar2
263   ,p_pju_attribute2                 in varchar2
264   ,p_pju_attribute3                 in varchar2
265   ,p_pju_attribute4                 in varchar2
266   ,p_pju_attribute5                 in varchar2
267   ,p_pju_attribute6                 in varchar2
268   ,p_pju_attribute7                 in varchar2
269   ,p_pju_attribute8                 in varchar2
270   ,p_pju_attribute9                 in varchar2
271   ,p_pju_attribute10                in varchar2
272   ,p_pju_attribute11                in varchar2
273   ,p_pju_attribute12                in varchar2
274   ,p_pju_attribute13                in varchar2
275   ,p_pju_attribute14                in varchar2
276   ,p_pju_attribute15                in varchar2
277   ,p_pju_attribute16                in varchar2
278   ,p_pju_attribute17                in varchar2
279   ,p_pju_attribute18                in varchar2
280   ,p_pju_attribute19                in varchar2
281   ,p_pju_attribute20                in varchar2
282   ,p_pju_information_category       in varchar2
283   ,p_pju_information1               in varchar2
284   ,p_pju_information2               in varchar2
285   ,p_pju_information3               in varchar2
286   ,p_pju_information4               in varchar2
287   ,p_pju_information5               in varchar2
288   ,p_pju_information6               in varchar2
289   ,p_pju_information7               in varchar2
290   ,p_pju_information8               in varchar2
291   ,p_pju_information9               in varchar2
292   ,p_pju_information10              in varchar2
293   ,p_pju_information11              in varchar2
294   ,p_pju_information12              in varchar2
295   ,p_pju_information13              in varchar2
296   ,p_pju_information14              in varchar2
297   ,p_pju_information15              in varchar2
298   ,p_pju_information16              in varchar2
299   ,p_pju_information17              in varchar2
300   ,p_pju_information18              in varchar2
301   ,p_pju_information19              in varchar2
302   ,p_pju_information20              in varchar2
303   ,p_object_version_number          in number
304   )
305   Return g_rec_type;
306 --
307 end per_pju_shd;