DBA Data[Home] [Help]

PACKAGE: APPS.PER_BPA_SHD

Source


1 Package per_bpa_shd as
2 /* $Header: pebparhi.pkh 120.0 2005/05/31 06:17:30 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (processed_assignment_id          number(9),
10   payroll_run_id                    number(9),
11   assignment_id                     number(9),
12   object_version_number             number(9),
13   bpa_attribute_category                varchar2(30),
14   bpa_attribute1                        varchar2(150),
15   bpa_attribute2                        varchar2(150),
16   bpa_attribute3                        varchar2(150),
17   bpa_attribute4                        varchar2(150),
18   bpa_attribute5                        varchar2(150),
19   bpa_attribute6                        varchar2(150),
20   bpa_attribute7                        varchar2(150),
21   bpa_attribute8                        varchar2(150),
22   bpa_attribute9                        varchar2(150),
23   bpa_attribute10                       varchar2(150),
24   bpa_attribute11                       varchar2(150),
25   bpa_attribute12                       varchar2(150),
26   bpa_attribute13                       varchar2(150),
27   bpa_attribute14                       varchar2(150),
28   bpa_attribute15                       varchar2(150),
29   bpa_attribute16                       varchar2(150),
30   bpa_attribute17                       varchar2(150),
31   bpa_attribute18                       varchar2(150),
32   bpa_attribute19                       varchar2(150),
33   bpa_attribute20                       varchar2(150),
34   bpa_attribute21                       varchar2(150),
35   bpa_attribute22                       varchar2(150),
36   bpa_attribute23                       varchar2(150),
37   bpa_attribute24                       varchar2(150),
38   bpa_attribute25                       varchar2(150),
39   bpa_attribute26                       varchar2(150),
40   bpa_attribute27                       varchar2(150),
41   bpa_attribute28                       varchar2(150),
42   bpa_attribute29                       varchar2(150),
43   bpa_attribute30                       varchar2(150)
44   );
45 --
46 -- ----------------------------------------------------------------------------
47 -- |           Global Definitions - Internal Development Use Only             |
48 -- ----------------------------------------------------------------------------
49 --
50 g_old_rec  g_rec_type;                            -- Global record definition
51 --
52 -- ----------------------------------------------------------------------------
53 -- |---------------------------< constraint_error >---------------------------|
54 -- ----------------------------------------------------------------------------
55 -- {Start Of Comments}
56 --
57 -- Description:
58 --   This procedure is called when a constraint has been violated (i.e.
59 --   The exception hr_api.check_integrity_violated,
60 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
61 --   hr_api.unique_integrity_violated has been raised).
62 --   The exceptions can only be raised as follows:
63 --   1) A check constraint can only be violated during an INSERT or UPDATE
64 --      dml operation.
65 --   2) A parent integrity constraint can only be violated during an
66 --      INSERT or UPDATE dml operation.
67 --   3) A child integrity constraint can only be violated during an
68 --      DELETE dml operation.
69 --   4) A unique integrity constraint can only be violated during INSERT or
70 --      UPDATE dml operation.
71 --
72 -- Prerequisites:
73 --   1) Either 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 with the subsequent
76 --      stripping of the constraint name from the generated error message
77 --      text.
78 --   2) Standalone validation test which corresponds with a constraint error.
79 --
80 -- In Parameter:
81 --   p_constraint_name is in upper format and is just the constraint name
82 --   (e.g. not prefixed by brackets, schema owner etc).
83 --
84 -- Post Success:
85 --   Development dependant.
86 --
87 -- Post Failure:
88 --   Developement dependant.
89 --
90 -- Developer Implementation Notes:
91 --   For each constraint being checked the hr system package failure message
92 --   has been generated as a template only. These system error messages should
93 --   be modified as required (i.e. change the system failure message to a user
94 --   friendly defined error message).
95 --
96 -- Access Status:
97 --   Internal Development Use Only.
98 --
99 -- {End Of Comments}
100 -- ----------------------------------------------------------------------------
101 Procedure constraint_error
102   (p_constraint_name in all_constraints.constraint_name%TYPE);
103 --
104 -- ----------------------------------------------------------------------------
105 -- |-----------------------------< api_updating >-----------------------------|
106 -- ----------------------------------------------------------------------------
107 --  {Start Of Comments}
108 --
109 -- Description:
110 --   This function is used to populate the g_old_rec record with the
111 --   current row from the database for the specified primary key
112 --   provided that the primary key exists and is valid and does not
113 --   already match the current g_old_rec. The function will always return
114 --   a TRUE value if the g_old_rec is populated with the current row.
115 --   A FALSE value will be returned if all of the primary key arguments
116 --   are null.
117 --
118 -- Prerequisites:
119 --   None.
120 --
121 -- In Parameters:
122 --
123 -- Post Success:
124 --   A value of TRUE will be returned indiciating that the g_old_rec
125 --   is current.
126 --   A value of FALSE will be returned if all of the primary key arguments
127 --   have a null value (this indicates that the row has not be inserted into
128 --   the Schema), and therefore could never have a corresponding row.
129 --
130 -- Post Failure:
131 --   A failure can only occur under two circumstances:
132 --   1) The primary key is invalid (i.e. a row does not exist for the
133 --      specified primary key values).
134 --   2) If an object_version_number exists but is NOT the same as the current
135 --      g_old_rec value.
136 --
137 -- Developer Implementation Notes:
138 --   None.
139 --
140 -- Access Status:
141 --   Internal Development Use Only.
142 --
143 -- {End Of Comments}
144 -- ----------------------------------------------------------------------------
145 Function api_updating
146   (p_processed_assignment_id              in number
147   ,p_object_version_number                in number
148   )      Return Boolean;
149 --
150 -- ----------------------------------------------------------------------------
151 -- |---------------------------------< lck >----------------------------------|
152 -- ----------------------------------------------------------------------------
153 -- {Start of comments}
154 --
155 -- Description:
156 --   The Lck process has two main functions to perform. Firstly, the row to be
157 --   updated or deleted must be locked. The locking of the row will only be
158 --   successful if the row is not currently locked by another user.
159 --   Secondly, during the locking of the row, the row is selected into
160 --   the g_old_rec data structure which enables the current row values from the
161 --   server to be available to the api.
162 --
163 -- Prerequisites:
164 --   When attempting to call the lock the object version number (if defined)
165 --   is mandatory.
166 --
167 -- In Parameters:
168 --   The arguments to the Lck process are the primary key(s) which uniquely
169 --   identify the row and the object version number of row.
170 --
171 -- Post Success:
172 --   On successful completion of the Lck process the row to be updated or
173 --   deleted will be locked and selected into the global data structure
174 --   g_old_rec.
175 --
176 -- Post Failure:
177 --   The Lck process can fail for three reasons:
178 --   1) When attempting to lock the row the row could already be locked by
179 --      another user. This will raise the HR_Api.Object_Locked exception.
180 --   2) The row which is required to be locked doesn't exist in the HR Schema.
181 --      This error is trapped and reported using the message name
182 --      'HR_7220_INVALID_PRIMARY_KEY'.
183 --   3) The row although existing in the HR Schema has a different object
184 --      version number than the object version number specified.
185 --      This error is trapped and reported using the message name
186 --      'HR_7155_OBJECT_INVALID'.
187 --
188 -- Developer Implementation Notes:
189 --   For each primary key and the object version number arguments add a
190 --   call to hr_api.mandatory_arg_error procedure to ensure that these
191 --   argument values are not null.
192 --
193 -- Access Status:
194 --   Internal Development Use Only.
195 --
196 -- {End of comments}
197 -- ----------------------------------------------------------------------------
198 Procedure lck
199   (p_processed_assignment_id              in number
200   ,p_object_version_number                in number
201   );
202 --
203 -- ----------------------------------------------------------------------------
204 -- |-----------------------------< convert_args >-----------------------------|
205 -- ----------------------------------------------------------------------------
206 -- {Start Of Comments}
207 --
208 -- Description:
209 --   This function is used to turn attribute parameters into the record
210 --   structure parameter g_rec_type.
211 --
212 -- Prerequisites:
213 --   This is a private function and can only be called from the ins or upd
214 --   attribute processes.
215 --
216 -- In Parameters:
217 --
218 -- Post Success:
219 --   A returning record structure will be returned.
220 --
221 -- Post Failure:
222 --   No direct error handling is required within this function.  Any possible
223 --   errors within this function will be a PL/SQL value error due to conversion
224 --   of datatypes or data lengths.
225 --
226 -- Developer Implementation Notes:
227 --   None.
228 --
229 -- Access Status:
230 --   Internal Row Handler Use Only.
231 --
232 -- {End Of Comments}
233 -- -----------------------------------------------------------------------------
234 Function convert_args
235   (p_processed_assignment_id        in number,
236   p_payroll_run_id                 in number,
237   p_assignment_id                  in number,
238   p_object_version_number          in number,
239   p_bpa_attribute_category           in varchar2,
240   p_bpa_attribute1                   in varchar2,
241   p_bpa_attribute2                   in varchar2,
242   p_bpa_attribute3                   in varchar2,
243   p_bpa_attribute4                   in varchar2,
244   p_bpa_attribute5                   in varchar2,
245   p_bpa_attribute6                   in varchar2,
246   p_bpa_attribute7                   in varchar2,
247   p_bpa_attribute8                   in varchar2,
248   p_bpa_attribute9                   in varchar2,
249   p_bpa_attribute10                  in varchar2,
250   p_bpa_attribute11                  in varchar2,
251   p_bpa_attribute12                  in varchar2,
252   p_bpa_attribute13                  in varchar2,
253   p_bpa_attribute14                  in varchar2,
254   p_bpa_attribute15                  in varchar2,
255   p_bpa_attribute16                  in varchar2,
256   p_bpa_attribute17                  in varchar2,
257   p_bpa_attribute18                  in varchar2,
258   p_bpa_attribute19                  in varchar2,
259   p_bpa_attribute20                  in varchar2,
260   p_bpa_attribute21                  in varchar2,
261   p_bpa_attribute22                  in varchar2,
262   p_bpa_attribute23                  in varchar2,
263   p_bpa_attribute24                  in varchar2,
264   p_bpa_attribute25                  in varchar2,
265   p_bpa_attribute26                  in varchar2,
266   p_bpa_attribute27                  in varchar2,
267   p_bpa_attribute28                  in varchar2,
268   p_bpa_attribute29                  in varchar2,
269   p_bpa_attribute30                  in varchar2
270   )
271   Return g_rec_type;
272 --
273 end per_bpa_shd;