DBA Data[Home] [Help]

PACKAGE: APPS.PQH_CEA_SHD

Source


1 Package pqh_cea_shd as
2 /* $Header: pqcearhi.pkh 120.0 2005/05/29 01:37:40 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (
10   copy_entity_attrib_id             number(15),
11   copy_entity_txn_id                number(15),
12   row_type_cd                       varchar2(30),
13   information_category              varchar2(30),
14   information1                      varchar2(2000),
15   information2                      varchar2(255),
16   information3                      varchar2(255),
17   information4                      varchar2(255),
18   information5                      varchar2(255),
19   information6                      varchar2(255),
20   information7                      varchar2(255),
21   information8                      varchar2(255),
22   information9                      varchar2(255),
23   information10                     varchar2(255),
24   information11                     varchar2(255),
25   information12                     varchar2(255),
26   information13                     varchar2(255),
27   information14                     varchar2(255),
28   information15                     varchar2(255),
29   information16                     varchar2(255),
30   information17                     varchar2(2000),
31   information18                     varchar2(2000),
32   information19                     varchar2(255),
33   information20                     varchar2(255),
34   information21                     varchar2(255),
35   information22                     varchar2(255),
36   information23                     varchar2(255),
37   information24                     varchar2(2000),
38   information25                     varchar2(2000),
39   information26                     varchar2(2000),
40   information27                     varchar2(2000),
41   information28                     varchar2(255),
42   information29                     varchar2(2000),
43   information30                     varchar2(2000),
44   check_information1                varchar2(255),
45   check_information2                varchar2(255),
46   check_information3                varchar2(255),
47   object_version_number             number(9)
48   );
49 --
50 -- ----------------------------------------------------------------------------
51 -- |           Global Definitions - Internal Development Use Only             |
52 -- ----------------------------------------------------------------------------
53 --
54 g_old_rec  g_rec_type;                            -- Global record definition
55 -- ----------------------------------------------------------------------------
56 -- |---------------------------< constraint_error >---------------------------|
57 -- ----------------------------------------------------------------------------
58 -- {Start Of Comments}
59 --
60 -- Description:
61 --   This procedure is called when a constraint has been violated (i.e.
62 --   The exception hr_api.check_integrity_violated,
63 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
64 --   hr_api.unique_integrity_violated has been raised).
65 --   The exceptions can only be raised as follows:
66 --   1) A check constraint can only be violated during an INSERT or UPDATE
67 --      dml operation.
68 --   2) A parent integrity constraint can only be violated during an
69 --      INSERT or UPDATE dml operation.
70 --   3) A child integrity constraint can only be violated during an
71 --      DELETE dml operation.
72 --   4) A unique integrity constraint can only be violated during INSERT or
73 --      UPDATE dml operation.
74 --
75 -- Prerequisites:
76 --   1) Either hr_api.check_integrity_violated,
77 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
78 --      hr_api.unique_integrity_violated has been raised with the subsequent
79 --      stripping of the constraint name from the generated error message
80 --      text.
81 --   2) Standalone validation test which corresponds with a constraint error.
82 --
83 -- In Parameter:
84 --   p_constraint_name is in upper format and is just the constraint name
85 --   (e.g. not prefixed by brackets, schema owner etc).
86 --
87 -- Post Success:
88 --   Development dependant.
89 --
90 -- Post Failure:
91 --   Developement dependant.
92 --
93 -- Developer Implementation Notes:
94 --   For each constraint being checked the hr system package failure message
95 --   has been generated as a template only. These system error messages should
96 --   be modified as required (i.e. change the system failure message to a user
97 --   friendly defined error message).
98 --
99 -- Access Status:
100 --   Internal Development Use Only.
101 --
102 -- {End Of Comments}
103 -- ----------------------------------------------------------------------------
104 Procedure constraint_error
105             (p_constraint_name in all_constraints.constraint_name%TYPE);
106 --
107 -- ----------------------------------------------------------------------------
108 -- |-----------------------------< api_updating >-----------------------------|
109 -- ----------------------------------------------------------------------------
110 -- {Start Of Comments}
111 --
112 -- Description:
113 --   This function is used to populate the g_old_rec record with the
114 --   current row from the database for the specified primary key
115 --   provided that the primary key exists and is valid and does not
116 --   already match the current g_old_rec. The function will always return
117 --   a TRUE value if the g_old_rec is populated with the current row.
118 --   A FALSE value will be returned if all of the primary key arguments
119 --   are null.
120 --
121 -- Prerequisites:
122 --   None.
123 --
124 -- In Parameters:
125 --
126 -- Post Success:
127 --   A value of TRUE will be returned indiciating that the g_old_rec
128 --   is current.
129 --   A value of FALSE will be returned if all of the primary key arguments
130 --   have a null value (this indicates that the row has not be inserted into
131 --   the Schema), and therefore could never have a corresponding row.
132 --
133 -- Post Failure:
134 --   A failure can only occur under two circumstances:
135 --   1) The primary key is invalid (i.e. a row does not exist for the
136 --      specified primary key values).
137 --   2) If an object_version_number exists but is NOT the same as the current
138 --      g_old_rec value.
139 --
140 -- Developer Implementation Notes:
141 --   None.
142 --
143 -- Access Status:
144 --   Internal Development Use Only.
145 --
146 -- {End Of Comments}
147 -- ----------------------------------------------------------------------------
148 Function api_updating
149   (
150   p_copy_entity_attrib_id              in number,
151   p_object_version_number              in number
152   )      Return Boolean;
153 --
154 -- ----------------------------------------------------------------------------
155 -- |---------------------------------< lck >----------------------------------|
156 -- ----------------------------------------------------------------------------
157 -- {Start Of Comments}
158 --
159 -- Description:
160 --   The Lck process has two main functions to perform. Firstly, the row to be
161 --   updated or deleted must be locked. The locking of the row will only be
162 --   successful if the row is not currently locked by another user.
163 --   Secondly, during the locking of the row, the row is selected into
164 --   the g_old_rec data structure which enables the current row values from the
165 --   server to be available to the api.
166 --
167 -- Prerequisites:
168 --   When attempting to call the lock the object version number (if defined)
169 --   is mandatory.
170 --
171 -- In Parameters:
172 --   The arguments to the Lck process are the primary key(s) which uniquely
173 --   identify the row and the object version number of row.
174 --
175 -- Post Success:
176 --   On successful completion of the Lck process the row to be updated or
177 --   deleted will be locked and selected into the global data structure
178 --   g_old_rec.
179 --
180 -- Post Failure:
181 --   The Lck process can fail for three reasons:
182 --   1) When attempting to lock the row the row could already be locked by
183 --      another user. This will raise the HR_Api.Object_Locked exception.
184 --   2) The row which is required to be locked doesn't exist in the HR Schema.
185 --      This error is trapped and reported using the message name
186 --      'HR_7220_INVALID_PRIMARY_KEY'.
187 --   3) The row although existing in the HR Schema has a different object
188 --      version number than the object version number specified.
189 --      This error is trapped and reported using the message name
190 --      'HR_7155_OBJECT_INVALID'.
191 --
192 -- Developer Implementation Notes:
193 --   For each primary key and the object version number arguments add a
194 --   call to hr_api.mandatory_arg_error procedure to ensure that these
195 --   argument values are not null.
196 --
197 -- Access Status:
198 --   Internal Development Use Only.
199 --
200 -- {End Of Comments}
201 -- ----------------------------------------------------------------------------
202 Procedure lck
203   (
204   p_copy_entity_attrib_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 conversion
229 --   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 	(
241 	p_copy_entity_attrib_id         in number,
242 	p_copy_entity_txn_id            in number,
243 	p_row_type_cd                   in varchar2,
244 	p_information_category          in varchar2,
245 	p_information1                  in varchar2,
246 	p_information2                  in varchar2,
247 	p_information3                  in varchar2,
248 	p_information4                  in varchar2,
249 	p_information5                  in varchar2,
250 	p_information6                  in varchar2,
251 	p_information7                  in varchar2,
252 	p_information8                  in varchar2,
253 	p_information9                  in varchar2,
254 	p_information10                 in varchar2,
255 	p_information11                 in varchar2,
256 	p_information12                 in varchar2,
257 	p_information13                 in varchar2,
258 	p_information14                 in varchar2,
259 	p_information15                 in varchar2,
260 	p_information16                 in varchar2,
261 	p_information17                 in varchar2,
262 	p_information18                 in varchar2,
263 	p_information19                 in varchar2,
264 	p_information20                 in varchar2,
265 	p_information21                 in varchar2,
266 	p_information22                 in varchar2,
267 	p_information23                 in varchar2,
268 	p_information24                 in varchar2,
269 	p_information25                 in varchar2,
270 	p_information26                 in varchar2,
271 	p_information27                 in varchar2,
272 	p_information28                 in varchar2,
273 	p_information29                 in varchar2,
274 	p_information30                 in varchar2,
275 	p_check_information1            in varchar2,
276 	p_check_information2            in varchar2,
277 	p_check_information3            in varchar2,
278 	p_object_version_number         in number
279 	)
280 	Return g_rec_type;
281 --
282 end pqh_cea_shd;