DBA Data[Home] [Help]

PACKAGE: APPS.BEN_CSO_SHD

Source


1 Package ben_cso_shd as
2 /* $Header: becsorhi.pkh 120.0.12010000.1 2008/07/29 11:15:47 appldev ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (cwb_stock_optn_dtls_id          number(15)
10   ,grant_id                        number(15)
11   ,grant_number                    varchar2(30)
12   ,grant_name                      varchar2(100)
13   ,grant_type                      varchar2(30)
14   ,grant_date                      date
15   ,grant_shares                    number
16   ,grant_price                     number
17   ,value_at_grant                  number
18   ,current_share_price             number
19   ,current_shares_outstanding      number
20   ,vested_shares                   number
21   ,unvested_shares                 number
22   ,exercisable_shares              number
23   ,exercised_shares                number
24   ,cancelled_shares                number
25   ,trading_symbol                  varchar2(30)
26   ,expiration_date                 date
27   ,reason_code                     varchar2(30)
28   ,class                           varchar2(30)
29   ,misc                            varchar2(100)
30   ,employee_number                 varchar2(30)
31   ,person_id                       number(15)
32   ,business_group_id               number(15)
33   ,prtt_rt_val_id                  number(15)
34   ,object_version_number           number(9)
35   ,cso_attribute_category          varchar2(30)
36   ,cso_attribute1                  varchar2(150)
37   ,cso_attribute2                  varchar2(150)
38   ,cso_attribute3                  varchar2(150)
39   ,cso_attribute4                  varchar2(150)
40   ,cso_attribute5                  varchar2(150)
41   ,cso_attribute6                  varchar2(150)
42   ,cso_attribute7                  varchar2(150)
43   ,cso_attribute8                  varchar2(150)
44   ,cso_attribute9                  varchar2(150)
45   ,cso_attribute10                 varchar2(150)
46   ,cso_attribute11                 varchar2(150)
47   ,cso_attribute12                 varchar2(150)
48   ,cso_attribute13                 varchar2(150)
49   ,cso_attribute14                 varchar2(150)
50   ,cso_attribute15                 varchar2(150)
51   ,cso_attribute16                 varchar2(150)
52   ,cso_attribute17                 varchar2(150)
53   ,cso_attribute18                 varchar2(150)
54   ,cso_attribute19                 varchar2(150)
55   ,cso_attribute20                 varchar2(150)
56   ,cso_attribute21                 varchar2(150)
57   ,cso_attribute22                 varchar2(150)
58   ,cso_attribute23                 varchar2(150)
59   ,cso_attribute24                 varchar2(150)
60   ,cso_attribute25                 varchar2(150)
61   ,cso_attribute26                 varchar2(150)
62   ,cso_attribute27                 varchar2(150)
63   ,cso_attribute28                 varchar2(150)
64   ,cso_attribute29                 varchar2(150)
65   ,cso_attribute30                 varchar2(150)
66   );
67 --
68 -- ----------------------------------------------------------------------------
69 -- |           Global Definitions - Internal Development Use Only             |
70 -- ----------------------------------------------------------------------------
71 --
72 g_old_rec  g_rec_type;                            -- Global record definition
73 -- Global table name
74 g_tab_nam  constant varchar2(30) := 'BEN_CWB_STOCK_OPTN_DTLS';
75 --
76 -- ----------------------------------------------------------------------------
77 -- |---------------------------< constraint_error >---------------------------|
78 -- ----------------------------------------------------------------------------
79 -- {Start Of Comments}
80 --
81 -- Description:
82 --   This procedure is called when a constraint has been violated (i.e.
83 --   The exception hr_api.check_integrity_violated,
84 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
85 --   hr_api.unique_integrity_violated has been raised).
86 --   The exceptions can only be raised as follows:
87 --   1) A check constraint can only be violated during an INSERT or UPDATE
88 --      dml operation.
89 --   2) A parent integrity constraint can only be violated during an
90 --      INSERT or UPDATE dml operation.
91 --   3) A child integrity constraint can only be violated during an
92 --      DELETE dml operation.
93 --   4) A unique integrity constraint can only be violated during INSERT or
94 --      UPDATE dml operation.
95 --
96 -- Prerequisites:
97 --   1) Either hr_api.check_integrity_violated,
98 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
99 --      hr_api.unique_integrity_violated has been raised with the subsequent
100 --      stripping of the constraint name from the generated error message
101 --      text.
102 --   2) Standalone validation test which corresponds with a constraint error.
103 --
104 -- In Parameter:
105 --   p_constraint_name is in upper format and is just the constraint name
106 --   (e.g. not prefixed by brackets, schema owner etc).
107 --
108 -- Post Success:
109 --   Development dependant.
110 --
111 -- Post Failure:
112 --   Developement dependant.
113 --
114 -- Developer Implementation Notes:
115 --   For each constraint being checked the hr system package failure message
116 --   has been generated as a template only. These system error messages should
117 --   be modified as required (i.e. change the system failure message to a user
118 --   friendly defined error message).
119 --
120 -- Access Status:
121 --   Internal Development Use Only.
122 --
123 -- {End Of Comments}
124 -- ----------------------------------------------------------------------------
125 Procedure constraint_error
126   (p_constraint_name in all_constraints.constraint_name%TYPE);
127 --
128 -- ----------------------------------------------------------------------------
129 -- |-----------------------------< api_updating >-----------------------------|
130 -- ----------------------------------------------------------------------------
131 --  {Start Of Comments}
132 --
133 -- Description:
134 --   This function is used to populate the g_old_rec record with the
135 --   current row from the database for the specified primary key
136 --   provided that the primary key exists and is valid and does not
137 --   already match the current g_old_rec. The function will always return
138 --   a TRUE value if the g_old_rec is populated with the current row.
139 --   A FALSE value will be returned if all of the primary key arguments
140 --   are null.
141 --
142 -- Prerequisites:
143 --   None.
144 --
145 -- In Parameters:
146 --
147 -- Post Success:
148 --   A value of TRUE will be returned indiciating that the g_old_rec
149 --   is current.
150 --   A value of FALSE will be returned if all of the primary key arguments
151 --   have a null value (this indicates that the row has not be inserted into
152 --   the Schema), and therefore could never have a corresponding row.
153 --
154 -- Post Failure:
155 --   A failure can only occur under two circumstances:
156 --   1) The primary key is invalid (i.e. a row does not exist for the
157 --      specified primary key values).
158 --   2) If an object_version_number exists but is NOT the same as the current
159 --      g_old_rec value.
160 --
161 -- Developer Implementation Notes:
162 --   None.
163 --
164 -- Access Status:
165 --   Internal Development Use Only.
166 --
167 -- {End Of Comments}
168 -- ----------------------------------------------------------------------------
169 Function api_updating
170   (p_cwb_stock_optn_dtls_id               in     number
171   ,p_object_version_number                in     number
172   )      Return Boolean;
173 --
174 -- ----------------------------------------------------------------------------
175 -- |---------------------------------< lck >----------------------------------|
176 -- ----------------------------------------------------------------------------
177 -- {Start of comments}
178 --
179 -- Description:
180 --   The Lck process has two main functions to perform. Firstly, the row to be
181 --   updated or deleted must be locked. The locking of the row will only be
182 --   successful if the row is not currently locked by another user.
183 --   Secondly, during the locking of the row, the row is selected into
184 --   the g_old_rec data structure which enables the current row values from
185 --   the server to be available to the api.
186 --
187 -- Prerequisites:
188 --   When attempting to call the lock the object version number (if defined)
189 --   is mandatory.
190 --
191 -- In Parameters:
192 --   The arguments to the Lck process are the primary key(s) which uniquely
193 --   identify the row and the object version number of row.
194 --
195 -- Post Success:
196 --   On successful completion of the Lck process the row to be updated or
197 --   deleted will be locked and selected into the global data structure
198 --   g_old_rec.
199 --
200 -- Post Failure:
201 --   The Lck process can fail for three reasons:
202 --   1) When attempting to lock the row the row could already be locked by
203 --      another user. This will raise the HR_Api.Object_Locked exception.
204 --   2) The row which is required to be locked doesn't exist in the HR Schema.
205 --      This error is trapped and reported using the message name
206 --      'HR_7220_INVALID_PRIMARY_KEY'.
207 --   3) The row although existing in the HR Schema has a different object
208 --      version number than the object version number specified.
209 --      This error is trapped and reported using the message name
210 --      'HR_7155_OBJECT_INVALID'.
211 --
212 -- Developer Implementation Notes:
213 --   For each primary key and the object version number arguments add a
214 --   call to hr_api.mandatory_arg_error procedure to ensure that these
215 --   argument values are not null.
216 --
217 -- Access Status:
218 --   Internal Development Use Only.
219 --
220 -- {End of comments}
221 -- ----------------------------------------------------------------------------
222 Procedure lck
223   (p_cwb_stock_optn_dtls_id               in     number
224   ,p_object_version_number                in     number
225   );
226 --
227 -- ----------------------------------------------------------------------------
228 -- |-----------------------------< convert_args >-----------------------------|
229 -- ----------------------------------------------------------------------------
230 -- {Start Of Comments}
231 --
232 -- Description:
233 --   This function is used to turn attribute parameters into the record
234 --   structure parameter g_rec_type.
235 --
236 -- Prerequisites:
237 --   This is a private function and can only be called from the ins or upd
238 --   attribute processes.
239 --
240 -- In Parameters:
241 --
242 -- Post Success:
243 --   A returning record structure will be returned.
244 --
245 -- Post Failure:
246 --   No direct error handling is required within this function.  Any possible
247 --   errors within this function will be a PL/SQL value error due to
248 --   conversion of datatypes or data lengths.
249 --
250 -- Developer Implementation Notes:
251 --   None.
252 --
253 -- Access Status:
254 --   Internal Row Handler Use Only.
255 --
256 -- {End Of Comments}
257 -- ----------------------------------------------------------------------------
258 Function convert_args
259   (p_cwb_stock_optn_dtls_id         in number
260   ,p_grant_id                       in number
261   ,p_grant_number                   in varchar2
262   ,p_grant_name                     in varchar2
263   ,p_grant_type                     in varchar2
264   ,p_grant_date                     in date
265   ,p_grant_shares                   in number
266   ,p_grant_price                    in number
267   ,p_value_at_grant                 in number
268   ,p_current_share_price            in number
269   ,p_current_shares_outstanding     in number
270   ,p_vested_shares                  in number
271   ,p_unvested_shares                in number
272   ,p_exercisable_shares             in number
273   ,p_exercised_shares               in number
274   ,p_cancelled_shares               in number
275   ,p_trading_symbol                 in varchar2
276   ,p_expiration_date                in date
277   ,p_reason_code                    in varchar2
278   ,p_class                          in varchar2
279   ,p_misc                           in varchar2
280   ,p_employee_number                in varchar2
281   ,p_person_id                      in number
282   ,p_business_group_id              in number
283   ,p_prtt_rt_val_id                 in number
284   ,p_object_version_number          in number
285   ,p_cso_attribute_category         in varchar2
286   ,p_cso_attribute1                 in varchar2
287   ,p_cso_attribute2                 in varchar2
288   ,p_cso_attribute3                 in varchar2
289   ,p_cso_attribute4                 in varchar2
290   ,p_cso_attribute5                 in varchar2
291   ,p_cso_attribute6                 in varchar2
292   ,p_cso_attribute7                 in varchar2
293   ,p_cso_attribute8                 in varchar2
294   ,p_cso_attribute9                 in varchar2
295   ,p_cso_attribute10                in varchar2
296   ,p_cso_attribute11                in varchar2
297   ,p_cso_attribute12                in varchar2
298   ,p_cso_attribute13                in varchar2
299   ,p_cso_attribute14                in varchar2
300   ,p_cso_attribute15                in varchar2
301   ,p_cso_attribute16                in varchar2
302   ,p_cso_attribute17                in varchar2
303   ,p_cso_attribute18                in varchar2
304   ,p_cso_attribute19                in varchar2
305   ,p_cso_attribute20                in varchar2
306   ,p_cso_attribute21                in varchar2
307   ,p_cso_attribute22                in varchar2
308   ,p_cso_attribute23                in varchar2
309   ,p_cso_attribute24                in varchar2
310   ,p_cso_attribute25                in varchar2
311   ,p_cso_attribute26                in varchar2
312   ,p_cso_attribute27                in varchar2
313   ,p_cso_attribute28                in varchar2
314   ,p_cso_attribute29                in varchar2
315   ,p_cso_attribute30                in varchar2
316   )
317   Return g_rec_type;
318 --
319 end ben_cso_shd;