DBA Data[Home] [Help]

PACKAGE: APPS.HXC_EGC_SHD

Source


1 Package hxc_egc_shd as
2 /* $Header: hxcegcrhi.pkh 120.0 2005/05/29 05:30:26 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (entity_group_comp_id            number(15)
10   ,entity_group_id                 number(15)
11   ,entity_id                       number(15)
12   ,entity_type                     varchar2(80)
13   ,attribute_category              varchar2(30)
14   ,attribute1                      varchar2(150)
15   ,attribute2                      varchar2(150)
16   ,attribute3                      varchar2(150)
17   ,attribute4                      varchar2(150)
18   ,attribute5                      varchar2(150)
19   ,attribute6                      varchar2(150)
20   ,attribute7                      varchar2(150)
21   ,attribute8                      varchar2(150)
22   ,attribute9                      varchar2(150)
23   ,attribute10                     varchar2(150)
24   ,attribute11                     varchar2(150)
25   ,attribute12                     varchar2(150)
26   ,attribute13                     varchar2(150)
27   ,attribute14                     varchar2(150)
28   ,attribute15                     varchar2(150)
29   ,attribute16                     varchar2(150)
30   ,attribute17                     varchar2(150)
31   ,attribute18                     varchar2(150)
32   ,attribute19                     varchar2(150)
33   ,attribute20                     varchar2(150)
34   ,attribute21                     varchar2(150)
35   ,attribute22                     varchar2(150)
36   ,attribute23                     varchar2(150)
37   ,attribute24                     varchar2(150)
38   ,attribute25                     varchar2(150)
39   ,attribute26                     varchar2(150)
40   ,attribute27                     varchar2(150)
41   ,attribute28                     varchar2(150)
42   ,attribute29                     varchar2(150)
43   ,attribute30                     varchar2(150)
44   ,object_version_number           number
45   );
46 --
47 -- ----------------------------------------------------------------------------
48 -- |           Global Definitions - Internal Development Use Only             |
49 -- ----------------------------------------------------------------------------
50 --
51 g_old_rec  g_rec_type;                            -- Global record definition
52 g_api_dml  boolean;                               -- Global api dml status
53 --
54 -- ----------------------------------------------------------------------------
55 -- |------------------------< return_api_dml_status >-------------------------|
56 -- ----------------------------------------------------------------------------
57 --
58 -- Description:
59 --   This function will return the current g_api_dml private global
60 --   boolean status.
61 --   The g_api_dml status determines if at the time of the function
62 --   being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
63 --   is being issued from within an api.
64 --   If the status is TRUE then a dml statement is being issued from
65 --   within this entity api.
66 --   This function is primarily to support database triggers which
67 --   need to maintain the object_version_number for non-supported
68 --   dml statements (i.e. dml statement issued outside of the api layer).
69 --
70 -- Prerequisites:
71 --   None.
72 --
73 -- In Parameters:
74 --   None.
75 --
76 -- Post Success:
77 --   Processing continues.
78 --   If the function returns a TRUE value then, dml is being executed from
79 --   within this api.
80 --
81 -- Post Failure:
82 --   None.
83 --
84 -- Access Status:
85 --   Internal Row Handler Use Only.
86 --
87 -- ----------------------------------------------------------------------------
88 Function return_api_dml_status Return Boolean;
89 --
90 -- ----------------------------------------------------------------------------
91 -- |---------------------------< constraint_error >---------------------------|
92 -- ----------------------------------------------------------------------------
93 --
94 -- Description:
95 --   This procedure is called when a constraint has been violated (i.e.
96 --   The exception hr_api.check_integrity_violated,
97 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
98 --   hr_api.unique_integrity_violated has been raised).
99 --   The exceptions can only be raised as follows:
100 --   1) A check constraint can only be violated during an INSERT or UPDATE
101 --      dml operation.
102 --   2) A parent integrity constraint can only be violated during an
103 --      INSERT or UPDATE dml operation.
104 --   3) A child integrity constraint can only be violated during an
105 --      DELETE dml operation.
106 --   4) A unique integrity constraint can only be violated during INSERT or
107 --      UPDATE dml operation.
108 --
109 -- Prerequisites:
110 --   1) Either hr_api.check_integrity_violated,
111 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
112 --      hr_api.unique_integrity_violated has been raised with the subsequent
113 --      stripping of the constraint name from the generated error message
114 --      text.
115 --   2) Standalone validation test which corresponds with a constraint error.
116 --
117 -- In Parameter:
118 --   p_constraint_name is in upper format and is just the constraint name
119 --   (e.g. not prefixed by brackets, schema owner etc).
120 --
121 -- Post Success:
122 --   Development dependant.
123 --
124 -- Post Failure:
125 --   Developement dependant.
126 --
127 -- Developer Implementation Notes:
128 --   For each constraint being checked the hr system package failure message
129 --   has been generated as a template only. These system error messages should
130 --   be modified as required (i.e. change the system failure message to a user
131 --   friendly defined error message).
132 --
133 -- Access Status:
134 --   Internal Development Use Only.
135 --
136 -- ----------------------------------------------------------------------------
137 Procedure constraint_error
138   (p_constraint_name in all_constraints.constraint_name%TYPE);
139 --
140 -- ----------------------------------------------------------------------------
141 -- |-----------------------------< api_updating >-----------------------------|
142 -- ----------------------------------------------------------------------------
143 --
144 -- Description:
145 --   This function is used to populate the g_old_rec record with the
146 --   current row from the database for the specified primary key
147 --   provided that the primary key exists and is valid and does not
148 --   already match the current g_old_rec. The function will always return
149 --   a TRUE value if the g_old_rec is populated with the current row.
150 --   A FALSE value will be returned if all of the primary key arguments
151 --   are null.
152 --
153 -- Prerequisites:
154 --   None.
155 --
156 -- In Parameters:
157 --
158 -- Post Success:
159 --   A value of TRUE will be returned indiciating that the g_old_rec
160 --   is current.
161 --   A value of FALSE will be returned if all of the primary key arguments
162 --   have a null value (this indicates that the row has not be inserted into
163 --   the Schema), and therefore could never have a corresponding row.
164 --
165 -- Post Failure:
166 --   A failure can only occur under two circumstances:
167 --   1) The primary key is invalid (i.e. a row does not exist for the
168 --      specified primary key values).
169 --   2) If an object_version_number exists but is NOT the same as the current
170 --      g_old_rec value.
171 --
172 -- Developer Implementation Notes:
173 --   None.
174 --
175 -- Access Status:
176 --   Internal Development Use Only.
177 --
178 -- ----------------------------------------------------------------------------
179 Function api_updating
180   (p_entity_group_comp_id                 in     number
181   ,p_object_version_number                in     number
182   )      Return Boolean;
183 --
184 -- ----------------------------------------------------------------------------
185 -- |---------------------------------< lck >----------------------------------|
186 -- ----------------------------------------------------------------------------
187 --
188 -- Description:
189 --   The Lck process has two main functions to perform. Firstly, the row to be
190 --   updated or deleted must be locked. The locking of the row will only be
191 --   successful if the row is not currently locked by another user.
192 --   Secondly, during the locking of the row, the row is selected into
193 --   the g_old_rec data structure which enables the current row values from the
194 --   server to be available to the api.
195 --
196 -- Prerequisites:
197 --   When attempting to call the lock the object version number (if defined)
198 --   is mandatory.
199 --
200 -- In Parameters:
201 --   The arguments to the Lck process are the primary key(s) which uniquely
202 --   identify the row and the object version number of row.
203 --
204 -- Post Success:
205 --   On successful completion of the Lck process the row to be updated or
206 --   deleted will be locked and selected into the global data structure
207 --   g_old_rec.
208 --
209 -- Post Failure:
210 --   The Lck process can fail for three reasons:
211 --   1) When attempting to lock the row the row could already be locked by
212 --      another user. This will raise the HR_Api.Object_Locked exception.
213 --   2) The row which is required to be locked doesn't exist in the HR Schema.
214 --      This error is trapped and reported using the message name
215 --      'HR_7220_INVALID_PRIMARY_KEY'.
216 --   3) The row although existing in the HR Schema has a different object
217 --      version number than the object version number specified.
218 --      This error is trapped and reported using the message name
219 --      'HR_7155_OBJECT_INVALID'.
220 --
221 -- Developer Implementation Notes:
222 --   For each primary key and the object version number arguments add a
223 --   call to hr_api.mandatory_arg_error procedure to ensure that these
224 --   argument values are not null.
225 --
226 -- Access Status:
227 --   Internal Development Use Only.
228 --
229 -- ----------------------------------------------------------------------------
230 Procedure lck
231   (p_entity_group_comp_id                 in     number
232   ,p_object_version_number                in     number
233   );
234 --
235 -- ----------------------------------------------------------------------------
236 -- |-----------------------------< convert_args >-----------------------------|
237 -- ----------------------------------------------------------------------------
238 --
239 -- Description:
240 --   This function is used to turn attribute parameters into the record
241 --   structure parameter g_rec_type.
242 --
243 -- Prerequisites:
244 --   This is a private function and can only be called from the ins or upd
245 --   attribute processes.
246 --
247 -- In Parameters:
248 --
249 -- Post Success:
250 --   A returning record structure will be returned.
251 --
252 -- Post Failure:
253 --   No direct error handling is required within this function.  Any possible
254 --   errors within this function will be a PL/SQL value error due to conversion
255 --   of datatypes or data lengths.
256 --
257 -- Developer Implementation Notes:
258 --   None.
259 --
260 -- Access Status:
261 --   Internal Row Handler Use Only.
262 --
263 -- ----------------------------------------------------------------------------
264 Function convert_args
265   (p_entity_group_comp_id           in number
266   ,p_entity_group_id                in number
267   ,p_entity_id                      in number
268   ,p_entity_type                    in varchar2
269   ,p_attribute_category             in varchar2
270   ,p_attribute1                     in varchar2
271   ,p_attribute2                     in varchar2
272   ,p_attribute3                     in varchar2
273   ,p_attribute4                     in varchar2
274   ,p_attribute5                     in varchar2
275   ,p_attribute6                     in varchar2
276   ,p_attribute7                     in varchar2
277   ,p_attribute8                     in varchar2
278   ,p_attribute9                     in varchar2
279   ,p_attribute10                    in varchar2
280   ,p_attribute11                    in varchar2
281   ,p_attribute12                    in varchar2
282   ,p_attribute13                    in varchar2
283   ,p_attribute14                    in varchar2
284   ,p_attribute15                    in varchar2
285   ,p_attribute16                    in varchar2
286   ,p_attribute17                    in varchar2
287   ,p_attribute18                    in varchar2
288   ,p_attribute19                    in varchar2
289   ,p_attribute20                    in varchar2
290   ,p_attribute21                    in varchar2
291   ,p_attribute22                    in varchar2
292   ,p_attribute23                    in varchar2
293   ,p_attribute24                    in varchar2
294   ,p_attribute25                    in varchar2
295   ,p_attribute26                    in varchar2
296   ,p_attribute27                    in varchar2
297   ,p_attribute28                    in varchar2
298   ,p_attribute29                    in varchar2
299   ,p_attribute30                    in varchar2
300   ,p_object_version_number          in number
301   )
302   Return g_rec_type;
303 --
304 end hxc_egc_shd;