DBA Data[Home] [Help]

PACKAGE: APPS.PER_PHN_SHD

Source


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