DBA Data[Home] [Help]

PACKAGE: APPS.PER_RES_SHD

Source


1 Package per_res_shd AUTHID CURRENT_USER as
2 /* $Header: peresrhi.pkh 115.2 2003/04/02 13:37:20 eumenyio noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (cagr_entitlement_result_id      number(15)
10   ,assignment_id                   number(11)
11   ,start_date                      date
12   ,end_date                        date
13   ,collective_agreement_id         number(10)
14   ,cagr_entitlement_item_id        number(10)
15   ,element_type_id                 number(10)
16   ,input_value_id                  number(10)
17   ,cagr_api_id                     number(15)
18   ,cagr_api_param_id               number(15)
19   ,category_name                   varchar2(30)
20   ,cagr_entitlement_id             number(15)
21   ,cagr_entitlement_line_id        number(10)
22   ,value                           varchar2(30)
23   ,units_of_measure                varchar2(60)
24   ,range_from                      varchar2(60)
25   ,range_to                        varchar2(60)
26   ,grade_spine_id                  number
27   ,parent_spine_id                 number(10)
28   ,step_id                         number(15)
29   ,from_step_id                    number(15)
30   ,to_step_id                      number(15)
31   ,beneficial_flag                 varchar2(9)       -- Increased length
32   ,oipl_id                         number(10)
33   ,chosen_flag                     varchar2(9)       -- Increased length
34   ,column_type                     varchar2(30)
35   ,column_size                     number
36   ,cagr_request_id                 number(15)
37   ,business_group_id               number(15)
38   ,legislation_code                varchar2(30)
39   ,eligy_prfl_id                   number(15)
40   ,formula_id                      number(15)
41   ,object_version_number           number(15)
42   );
43 --
44 -- ----------------------------------------------------------------------------
45 -- |           Global Definitions - Internal Development Use Only             |
46 -- ----------------------------------------------------------------------------
47 --
48 g_old_rec  g_rec_type;                            -- Global record definition
49 --
50 -- ----------------------------------------------------------------------------
51 -- |---------------------------< constraint_error >---------------------------|
52 -- ----------------------------------------------------------------------------
53 -- {Start Of Comments}
54 --
55 -- Description:
56 --   This procedure is called when a constraint has been violated (i.e.
57 --   The exception hr_api.check_integrity_violated,
58 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
59 --   hr_api.unique_integrity_violated has been raised).
60 --   The exceptions can only be raised as follows:
61 --   1) A check constraint can only be violated during an INSERT or UPDATE
62 --      dml operation.
63 --   2) A parent integrity constraint can only be violated during an
64 --      INSERT or UPDATE dml operation.
65 --   3) A child integrity constraint can only be violated during an
66 --      DELETE dml operation.
67 --   4) A unique integrity constraint can only be violated during INSERT or
68 --      UPDATE dml operation.
69 --
70 -- Prerequisites:
71 --   1) Either hr_api.check_integrity_violated,
72 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
73 --      hr_api.unique_integrity_violated has been raised with the subsequent
74 --      stripping of the constraint name from the generated error message
75 --      text.
76 --   2) Standalone validation test which corresponds with a constraint error.
77 --
78 -- In Parameter:
79 --   p_constraint_name is in upper format and is just the constraint name
80 --   (e.g. not prefixed by brackets, schema owner etc).
81 --
82 -- Post Success:
83 --   Development dependant.
84 --
85 -- Post Failure:
86 --   Developement dependant.
87 --
88 -- Developer Implementation Notes:
89 --   For each constraint being checked the hr system package failure message
90 --   has been generated as a template only. These system error messages should
91 --   be modified as required (i.e. change the system failure message to a user
92 --   friendly defined error message).
93 --
94 -- Access Status:
95 --   Internal Development Use Only.
96 --
97 -- {End Of Comments}
98 -- ----------------------------------------------------------------------------
99 Procedure constraint_error
100   (p_constraint_name in all_constraints.constraint_name%TYPE);
101 --
102 -- ----------------------------------------------------------------------------
103 -- |-----------------------------< api_updating >-----------------------------|
104 -- ----------------------------------------------------------------------------
105 --  {Start Of Comments}
106 --
107 -- Description:
108 --   This function is used to populate the g_old_rec record with the
109 --   current row from the database for the specified primary key
110 --   provided that the primary key exists and is valid and does not
111 --   already match the current g_old_rec. The function will always return
112 --   a TRUE value if the g_old_rec is populated with the current row.
113 --   A FALSE value will be returned if all of the primary key arguments
114 --   are null.
115 --
116 -- Prerequisites:
117 --   None.
118 --
119 -- In Parameters:
120 --
121 -- Post Success:
122 --   A value of TRUE will be returned indiciating that the g_old_rec
123 --   is current.
124 --   A value of FALSE will be returned if all of the primary key arguments
125 --   have a null value (this indicates that the row has not be inserted into
126 --   the Schema), and therefore could never have a corresponding row.
127 --
128 -- Post Failure:
129 --   A failure can only occur under two circumstances:
130 --   1) The primary key is invalid (i.e. a row does not exist for the
131 --      specified primary key values).
132 --   2) If an object_version_number exists but is NOT the same as the current
133 --      g_old_rec value.
134 --
135 -- Developer Implementation Notes:
136 --   None.
137 --
138 -- Access Status:
139 --   Internal Development Use Only.
140 --
141 -- {End Of Comments}
142 -- ----------------------------------------------------------------------------
143 Function api_updating
144   (p_cagr_entitlement_result_id           in     number
145   ,p_object_version_number                in     number
146   )      Return Boolean;
147 --
148 -- ----------------------------------------------------------------------------
149 -- |---------------------------------< lck >----------------------------------|
150 -- ----------------------------------------------------------------------------
151 -- {Start of comments}
152 --
153 -- Description:
154 --   The Lck process has two main functions to perform. Firstly, the row to be
155 --   updated or deleted must be locked. The locking of the row will only be
156 --   successful if the row is not currently locked by another user.
157 --   Secondly, during the locking of the row, the row is selected into
158 --   the g_old_rec data structure which enables the current row values from
159 --   the server to be available to the api.
160 --
161 -- Prerequisites:
162 --   When attempting to call the lock the object version number (if defined)
163 --   is mandatory.
164 --
165 -- In Parameters:
166 --   The arguments to the Lck process are the primary key(s) which uniquely
167 --   identify the row and the object version number of row.
168 --
169 -- Post Success:
170 --   On successful completion of the Lck process the row to be updated or
171 --   deleted will be locked and selected into the global data structure
172 --   g_old_rec.
173 --
174 -- Post Failure:
175 --   The Lck process can fail for three reasons:
176 --   1) When attempting to lock the row the row could already be locked by
177 --      another user. This will raise the HR_Api.Object_Locked exception.
178 --   2) The row which is required to be locked doesn't exist in the HR Schema.
179 --      This error is trapped and reported using the message name
180 --      'HR_7220_INVALID_PRIMARY_KEY'.
181 --   3) The row although existing in the HR Schema has a different object
182 --      version number than the object version number specified.
183 --      This error is trapped and reported using the message name
184 --      'HR_7155_OBJECT_INVALID'.
185 --
186 -- Developer Implementation Notes:
187 --   For each primary key and the object version number arguments add a
188 --   call to hr_api.mandatory_arg_error procedure to ensure that these
189 --   argument values are not null.
190 --
191 -- Access Status:
192 --   Internal Development Use Only.
193 --
194 -- {End of comments}
195 -- ----------------------------------------------------------------------------
196 Procedure lck
197   (p_cagr_entitlement_result_id           in     number
198   ,p_object_version_number                in     number
199   );
200 --
201 -- ----------------------------------------------------------------------------
202 -- |-----------------------------< convert_args >-----------------------------|
203 -- ----------------------------------------------------------------------------
204 -- {Start Of Comments}
205 --
206 -- Description:
207 --   This function is used to turn attribute parameters into the record
208 --   structure parameter g_rec_type.
209 --
210 -- Prerequisites:
211 --   This is a private function and can only be called from the ins or upd
212 --   attribute processes.
213 --
214 -- In Parameters:
215 --
216 -- Post Success:
217 --   A returning record structure will be returned.
218 --
219 -- Post Failure:
220 --   No direct error handling is required within this function.  Any possible
221 --   errors within this function will be a PL/SQL value error due to
222 --   conversion of datatypes or data lengths.
223 --
224 -- Developer Implementation Notes:
225 --   None.
226 --
227 -- Access Status:
228 --   Internal Row Handler Use Only.
229 --
230 -- {End Of Comments}
231 -- ----------------------------------------------------------------------------
232 Function convert_args
233   (p_cagr_entitlement_result_id     in number
234   ,p_assignment_id                  in number
235   ,p_start_date                     in date
236   ,p_end_date                       in date
237   ,p_collective_agreement_id        in number
238   ,p_cagr_entitlement_item_id       in number
239   ,p_element_type_id                in number
240   ,p_input_value_id                 in number
241   ,p_cagr_api_id                    in number
242   ,p_cagr_api_param_id              in number
243   ,p_category_name                  in varchar2
244   ,p_cagr_entitlement_id            in number
245   ,p_cagr_entitlement_line_id       in number
246   ,p_value                          in varchar2
247   ,p_units_of_measure               in varchar2
248   ,p_range_from                     in varchar2
249   ,p_range_to                       in varchar2
250   ,p_grade_spine_id                 in number
251   ,p_parent_spine_id                in number
252   ,p_step_id                        in number
253   ,p_from_step_id                   in number
254   ,p_to_step_id                     in number
255   ,p_beneficial_flag                in varchar2
256   ,p_oipl_id                        in number
257   ,p_chosen_flag                    in varchar2
258   ,p_column_type                    in varchar2
259   ,p_column_size                    in number
260   ,p_cagr_request_id                in number
261   ,p_business_group_id              in number
262   ,p_legislation_code               in varchar2
263   ,p_eligy_prfl_id                  in number
264   ,p_formula_id                     in number
265   ,p_object_version_number          in number
266   )
267   Return g_rec_type;
268 --
269 end per_res_shd;