DBA Data[Home] [Help]

PACKAGE: APPS.PER_RET_SHD

Source


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