DBA Data[Home] [Help]

PACKAGE: APPS.PAY_PUT_SHD

Source


1 Package pay_put_shd as
2 /* $Header: pyputrhi.pkh 120.0 2005/05/29 08:04 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (user_table_id                   number(9)
10   ,business_group_id               number(15)
11   ,legislation_code                varchar2(30)
12   ,range_or_match                  varchar2(30)
13   ,user_key_units                  varchar2(30)
14   ,user_table_name                 varchar2(80)
15   ,user_row_title                  varchar2(80)
16   ,object_version_number           number(9)
17   );
18 --
19 -- ----------------------------------------------------------------------------
20 -- |           Global Definitions - Internal Development Use Only             |
21 -- ----------------------------------------------------------------------------
22 --
23 g_old_rec  g_rec_type;                            -- Global record definition
24 -- Global table name
25 g_tab_nam  constant varchar2(30) := 'PAY_USER_TABLES';
26 g_api_dml  boolean;                               -- Global api dml status
27 --
28 -- ----------------------------------------------------------------------------
29 -- |---------------------< chk_startup_mode_compatible >----------------------|
30 -- ----------------------------------------------------------------------------
31 function chk_startup_mode_compatible
32 (p_parent_bgid    in number
33 ,p_parent_legcode in varchar2
34 ,p_child_bgid     in number
35 ,p_child_legcode  in varchar2
36 ) return boolean;
37 --
38 -- ----------------------------------------------------------------------------
39 -- |------------------------< return_api_dml_status >-------------------------|
40 -- ----------------------------------------------------------------------------
41 -- {Start Of Comments}
42 --
43 -- Description:
44 --   This function will return the current g_api_dml private global
45 --   boolean status.
46 --   The g_api_dml status determines if at the time of the function
47 --   being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
48 --   is being issued from within an api.
49 --   If the status is TRUE then a dml statement is being issued from
50 --   within this entity api.
51 --   This function is primarily to support database triggers which
52 --   need to maintain the object_version_number for non-supported
53 --   dml statements (i.e. dml statement issued outside of the api layer).
54 --
55 -- Prerequisites:
56 --   None.
57 --
58 -- In Parameters:
59 --   None.
60 --
61 -- Post Success:
62 --   Processing continues.
63 --   If the function returns a TRUE value then, dml is being executed from
64 --   within this api.
65 --
66 -- Post Failure:
67 --   None.
68 --
69 -- Access Status:
70 --   Internal Row Handler Use Only.
71 --
72 -- {End Of Comments}
73 -- ----------------------------------------------------------------------------
74 Function return_api_dml_status Return Boolean;
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_user_table_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_user_table_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_user_table_id                  in number
260   ,p_business_group_id              in number
261   ,p_legislation_code               in varchar2
262   ,p_range_or_match                 in varchar2
263   ,p_user_key_units                 in varchar2
264   ,p_user_table_name                in varchar2
265   ,p_user_row_title                 in varchar2
266   ,p_object_version_number          in number
267   )
268   Return g_rec_type;
269 --
270 end pay_put_shd;