DBA Data[Home] [Help]

PACKAGE: APPS.BEN_PDT_SHD

Source


1 Package ben_pdt_shd AUTHID CURRENT_USER as
2 /* $Header: bepdtrhi.pkh 120.0 2005/05/28 10:29 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (pymt_check_det_id               number(15)
10   ,person_id                       number(15)
11   ,business_group_id               number(15)
12   ,check_num                       varchar2(30)
13   ,pymt_dt                         date
14   ,pymt_amt                        number
15   ,pdt_attribute_category          varchar2(30)
16   ,pdt_attribute1                  varchar2(150)
17   ,pdt_attribute2                  varchar2(150)
18   ,pdt_attribute3                  varchar2(150)
19   ,pdt_attribute4                  varchar2(150)
20   ,pdt_attribute5                  varchar2(150)
21   ,pdt_attribute6                  varchar2(150)
22   ,pdt_attribute7                  varchar2(150)
23   ,pdt_attribute8                  varchar2(150)
24   ,pdt_attribute9                  varchar2(150)
25   ,pdt_attribute10                 varchar2(150)
26   ,pdt_attribute11                 varchar2(150)
27   ,pdt_attribute12                 varchar2(150)
28   ,pdt_attribute13                 varchar2(150)
29   ,pdt_attribute14                 varchar2(150)
30   ,pdt_attribute15                 varchar2(150)
31   ,pdt_attribute16                 varchar2(150)
32   ,pdt_attribute17                 varchar2(150)
33   ,pdt_attribute18                 varchar2(150)
34   ,pdt_attribute19                 varchar2(150)
35   ,pdt_attribute20                 varchar2(150)
36   ,pdt_attribute21                 varchar2(150)
37   ,pdt_attribute22                 varchar2(150)
38   ,pdt_attribute23                 varchar2(150)
39   ,pdt_attribute24                 varchar2(150)
40   ,pdt_attribute25                 varchar2(150)
41   ,pdt_attribute26                 varchar2(150)
42   ,pdt_attribute27                 varchar2(150)
43   ,pdt_attribute28                 varchar2(150)
44   ,pdt_attribute29                 varchar2(150)
45   ,pdt_attribute30                 varchar2(150)
46   ,object_version_number           number(9)
47   );
48 --
49 -- ----------------------------------------------------------------------------
50 -- |           Global Definitions - Internal Development Use Only             |
51 -- ----------------------------------------------------------------------------
52 --
53 g_old_rec  g_rec_type;                            -- Global record definition
54 -- Global table name
55 g_tab_nam  constant varchar2(30) := 'BEN_PYMT_CHECK_DET';
56 --
57 -- ----------------------------------------------------------------------------
58 -- |---------------------------< constraint_error >---------------------------|
59 -- ----------------------------------------------------------------------------
60 -- {Start Of Comments}
61 --
62 -- Description:
63 --   This procedure is called when a constraint has been violated (i.e.
64 --   The exception hr_api.check_integrity_violated,
65 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
66 --   hr_api.unique_integrity_violated has been raised).
67 --   The exceptions can only be raised as follows:
68 --   1) A check constraint can only be violated during an INSERT or UPDATE
69 --      dml operation.
70 --   2) A parent integrity constraint can only be violated during an
71 --      INSERT or UPDATE dml operation.
72 --   3) A child integrity constraint can only be violated during an
73 --      DELETE dml operation.
74 --   4) A unique integrity constraint can only be violated during INSERT or
75 --      UPDATE dml operation.
76 --
77 -- Prerequisites:
78 --   1) Either 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 with the subsequent
81 --      stripping of the constraint name from the generated error message
82 --      text.
83 --   2) Standalone validation test which corresponds with a constraint error.
84 --
85 -- In Parameter:
86 --   p_constraint_name is in upper format and is just the constraint name
87 --   (e.g. not prefixed by brackets, schema owner etc).
88 --
89 -- Post Success:
90 --   Development dependant.
91 --
92 -- Post Failure:
93 --   Developement dependant.
94 --
95 -- Developer Implementation Notes:
96 --   For each constraint being checked the hr system package failure message
97 --   has been generated as a template only. These system error messages should
98 --   be modified as required (i.e. change the system failure message to a user
99 --   friendly defined error message).
100 --
101 -- Access Status:
102 --   Internal Development Use Only.
103 --
104 -- {End Of Comments}
105 -- ----------------------------------------------------------------------------
106 Procedure constraint_error
107   (p_constraint_name in all_constraints.constraint_name%TYPE);
108 --
109 -- ----------------------------------------------------------------------------
110 -- |-----------------------------< api_updating >-----------------------------|
111 -- ----------------------------------------------------------------------------
112 --  {Start Of Comments}
113 --
114 -- Description:
115 --   This function is used to populate the g_old_rec record with the
116 --   current row from the database for the specified primary key
117 --   provided that the primary key exists and is valid and does not
118 --   already match the current g_old_rec. The function will always return
119 --   a TRUE value if the g_old_rec is populated with the current row.
120 --   A FALSE value will be returned if all of the primary key arguments
121 --   are null.
122 --
123 -- Prerequisites:
124 --   None.
125 --
126 -- In Parameters:
127 --
128 -- Post Success:
129 --   A value of TRUE will be returned indiciating that the g_old_rec
130 --   is current.
131 --   A value of FALSE will be returned if all of the primary key arguments
132 --   have a null value (this indicates that the row has not be inserted into
133 --   the Schema), and therefore could never have a corresponding row.
134 --
135 -- Post Failure:
136 --   A failure can only occur under two circumstances:
137 --   1) The primary key is invalid (i.e. a row does not exist for the
138 --      specified primary key values).
139 --   2) If an object_version_number exists but is NOT the same as the current
140 --      g_old_rec value.
141 --
142 -- Developer Implementation Notes:
143 --   None.
144 --
145 -- Access Status:
146 --   Internal Development Use Only.
147 --
148 -- {End Of Comments}
149 -- ----------------------------------------------------------------------------
150 Function api_updating
151   (p_pymt_check_det_id                    in     number
152   ,p_object_version_number                in     number
153   )      Return Boolean;
154 --
155 -- ----------------------------------------------------------------------------
156 -- |---------------------------------< lck >----------------------------------|
157 -- ----------------------------------------------------------------------------
158 -- {Start of comments}
159 --
160 -- Description:
161 --   The Lck process has two main functions to perform. Firstly, the row to be
162 --   updated or deleted must be locked. The locking of the row will only be
163 --   successful if the row is not currently locked by another user.
164 --   Secondly, during the locking of the row, the row is selected into
165 --   the g_old_rec data structure which enables the current row values from
166 --   the server to be available to the api.
167 --
168 -- Prerequisites:
169 --   When attempting to call the lock the object version number (if defined)
170 --   is mandatory.
171 --
172 -- In Parameters:
173 --   The arguments to the Lck process are the primary key(s) which uniquely
174 --   identify the row and the object version number of row.
175 --
176 -- Post Success:
177 --   On successful completion of the Lck process the row to be updated or
178 --   deleted will be locked and selected into the global data structure
179 --   g_old_rec.
180 --
181 -- Post Failure:
182 --   The Lck process can fail for three reasons:
183 --   1) When attempting to lock the row the row could already be locked by
184 --      another user. This will raise the HR_Api.Object_Locked exception.
185 --   2) The row which is required to be locked doesn't exist in the HR Schema.
186 --      This error is trapped and reported using the message name
187 --      'HR_7220_INVALID_PRIMARY_KEY'.
188 --   3) The row although existing in the HR Schema has a different object
189 --      version number than the object version number specified.
190 --      This error is trapped and reported using the message name
191 --      'HR_7155_OBJECT_INVALID'.
192 --
193 -- Developer Implementation Notes:
194 --   For each primary key and the object version number arguments add a
195 --   call to hr_api.mandatory_arg_error procedure to ensure that these
196 --   argument values are not null.
197 --
198 -- Access Status:
199 --   Internal Development Use Only.
200 --
201 -- {End of comments}
202 -- ----------------------------------------------------------------------------
203 Procedure lck
204   (p_pymt_check_det_id                    in     number
205   ,p_object_version_number                in     number
206   );
207 --
208 -- ----------------------------------------------------------------------------
209 -- |-----------------------------< convert_args >-----------------------------|
210 -- ----------------------------------------------------------------------------
211 -- {Start Of Comments}
212 --
213 -- Description:
214 --   This function is used to turn attribute parameters into the record
215 --   structure parameter g_rec_type.
216 --
217 -- Prerequisites:
218 --   This is a private function and can only be called from the ins or upd
219 --   attribute processes.
220 --
221 -- In Parameters:
222 --
223 -- Post Success:
224 --   A returning record structure will be returned.
225 --
226 -- Post Failure:
227 --   No direct error handling is required within this function.  Any possible
228 --   errors within this function will be a PL/SQL value error due to
229 --   conversion of datatypes or data lengths.
230 --
231 -- Developer Implementation Notes:
232 --   None.
233 --
234 -- Access Status:
235 --   Internal Row Handler Use Only.
236 --
237 -- {End Of Comments}
238 -- ----------------------------------------------------------------------------
239 Function convert_args
240   (p_pymt_check_det_id              in number
241   ,p_person_id                      in number
242   ,p_business_group_id              in number
243   ,p_check_num                      in varchar2
244   ,p_pymt_dt                        in date
245   ,p_pymt_amt                       in number
246   ,p_pdt_attribute_category         in varchar2
247   ,p_pdt_attribute1                 in varchar2
248   ,p_pdt_attribute2                 in varchar2
249   ,p_pdt_attribute3                 in varchar2
250   ,p_pdt_attribute4                 in varchar2
251   ,p_pdt_attribute5                 in varchar2
252   ,p_pdt_attribute6                 in varchar2
253   ,p_pdt_attribute7                 in varchar2
254   ,p_pdt_attribute8                 in varchar2
255   ,p_pdt_attribute9                 in varchar2
256   ,p_pdt_attribute10                in varchar2
257   ,p_pdt_attribute11                in varchar2
258   ,p_pdt_attribute12                in varchar2
259   ,p_pdt_attribute13                in varchar2
260   ,p_pdt_attribute14                in varchar2
261   ,p_pdt_attribute15                in varchar2
262   ,p_pdt_attribute16                in varchar2
263   ,p_pdt_attribute17                in varchar2
264   ,p_pdt_attribute18                in varchar2
265   ,p_pdt_attribute19                in varchar2
266   ,p_pdt_attribute20                in varchar2
267   ,p_pdt_attribute21                in varchar2
268   ,p_pdt_attribute22                in varchar2
269   ,p_pdt_attribute23                in varchar2
270   ,p_pdt_attribute24                in varchar2
271   ,p_pdt_attribute25                in varchar2
272   ,p_pdt_attribute26                in varchar2
273   ,p_pdt_attribute27                in varchar2
274   ,p_pdt_attribute28                in varchar2
275   ,p_pdt_attribute29                in varchar2
276   ,p_pdt_attribute30                in varchar2
277   ,p_object_version_number          in number
278   )
279   Return g_rec_type;
280 --
281 end ben_pdt_shd;