DBA Data[Home] [Help]

PACKAGE: APPS.PER_PDM_SHD

Source


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