DBA Data[Home] [Help]

PACKAGE: APPS.PER_PSP_SHD

Source


1 Package per_psp_shd as
2 /* $Header: pepsprhi.pkh 120.0 2005/05/31 15:29:55 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (spinal_point_id                 number(15)
10   ,business_group_id               number(15)
11   ,parent_spine_id                 number(15)
12   ,sequence                        number(15)
13   ,spinal_point                    varchar2(30)
14   ,request_id                      number(15)
15   ,program_application_id          number(15)
16   ,program_id                      number(15)
17   ,program_update_date             date
18   ,object_version_number           number(9)
19   ,information_category            varchar2(30)
20   ,information1                    varchar2(150)
21   ,information2                    varchar2(150)
22   ,information3                    varchar2(150)
23   ,information4                    varchar2(150)
24   ,information5                    varchar2(150)
25   ,information6                    varchar2(150)
26   ,information7                    varchar2(150)
27   ,information8                    varchar2(150)
28   ,information9                    varchar2(150)
29   ,information10                   varchar2(150)
30   ,information11                   varchar2(150)
31   ,information12                   varchar2(150)
32   ,information13                   varchar2(150)
33   ,information14                   varchar2(150)
34   ,information15                   varchar2(150)
35   ,information16                   varchar2(150)
36   ,information17                   varchar2(150)
37   ,information18                   varchar2(150)
38   ,information19                   varchar2(150)
39   ,information20                   varchar2(150)
40   ,information21                   varchar2(150)
41   ,information22                   varchar2(150)
42   ,information23                   varchar2(150)
43   ,information24                   varchar2(150)
44   ,information25                   varchar2(150)
45   ,information26                   varchar2(150)
46   ,information27                   varchar2(150)
47   ,information28                   varchar2(150)
48   ,information29                   varchar2(150)
49   ,information30                   varchar2(150)
50   );
51 --
52 -- ----------------------------------------------------------------------------
53 -- |           Global Definitions - Internal Development Use Only             |
54 -- ----------------------------------------------------------------------------
55 --
56 g_old_rec  g_rec_type;                            -- Global record definition
57 -- Global table name
58 g_tab_nam  constant varchar2(30) := 'PER_SPINAL_POINTS';
59 g_api_dml  boolean;                               -- Global api dml status
60 --
61 -- ----------------------------------------------------------------------------
62 -- |------------------------< return_api_dml_status >-------------------------|
63 -- ----------------------------------------------------------------------------
64 -- {Start Of Comments}
65 --
66 -- Description:
67 --   This function will return the current g_api_dml private global
68 --   boolean status.
69 --   The g_api_dml status determines if at the time of the function
70 --   being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
71 --   is being issued from within an api.
72 --   If the status is TRUE then a dml statement is being issued from
73 --   within this entity api.
74 --   This function is primarily to support database triggers which
75 --   need to maintain the object_version_number for non-supported
76 --   dml statements (i.e. dml statement issued outside of the api layer).
77 --
78 -- Prerequisites:
79 --   None.
80 --
81 -- In Parameters:
82 --   None.
83 --
84 -- Post Success:
85 --   Processing continues.
86 --   If the function returns a TRUE value then, dml is being executed from
87 --   within this api.
88 --
89 -- Post Failure:
90 --   None.
91 --
92 -- Access Status:
93 --   Internal Row Handler Use Only.
94 --
95 -- {End Of Comments}
96 -- ----------------------------------------------------------------------------
97 Function return_api_dml_status Return Boolean;
98 --
99 -- ----------------------------------------------------------------------------
100 -- |---------------------------< constraint_error >---------------------------|
101 -- ----------------------------------------------------------------------------
102 -- {Start Of Comments}
103 --
104 -- Description:
105 --   This procedure is called when a constraint has been violated (i.e.
106 --   The exception hr_api.check_integrity_violated,
107 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
108 --   hr_api.unique_integrity_violated has been raised).
109 --   The exceptions can only be raised as follows:
110 --   1) A check constraint can only be violated during an INSERT or UPDATE
111 --      dml operation.
112 --   2) A parent integrity constraint can only be violated during an
113 --      INSERT or UPDATE dml operation.
114 --   3) A child integrity constraint can only be violated during an
115 --      DELETE dml operation.
116 --   4) A unique integrity constraint can only be violated during INSERT or
117 --      UPDATE dml operation.
118 --
119 -- Prerequisites:
120 --   1) Either hr_api.check_integrity_violated,
121 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
122 --      hr_api.unique_integrity_violated has been raised with the subsequent
123 --      stripping of the constraint name from the generated error message
124 --      text.
125 --   2) Standalone validation test which corresponds with a constraint error.
126 --
127 -- In Parameter:
128 --   p_constraint_name is in upper format and is just the constraint name
129 --   (e.g. not prefixed by brackets, schema owner etc).
130 --
131 -- Post Success:
132 --   Development dependant.
133 --
134 -- Post Failure:
135 --   Developement dependant.
136 --
137 -- Developer Implementation Notes:
138 --   For each constraint being checked the hr system package failure message
139 --   has been generated as a template only. These system error messages should
140 --   be modified as required (i.e. change the system failure message to a user
141 --   friendly defined error message).
142 --
143 -- Access Status:
144 --   Internal Development Use Only.
145 --
146 -- {End Of Comments}
147 -- ----------------------------------------------------------------------------
148 Procedure constraint_error
149   (p_constraint_name in all_constraints.constraint_name%TYPE);
150 --
151 -- ----------------------------------------------------------------------------
152 -- |-----------------------------< api_updating >-----------------------------|
153 -- ----------------------------------------------------------------------------
154 --  {Start Of Comments}
155 --
156 -- Description:
157 --   This function is used to populate the g_old_rec record with the
158 --   current row from the database for the specified primary key
159 --   provided that the primary key exists and is valid and does not
160 --   already match the current g_old_rec. The function will always return
161 --   a TRUE value if the g_old_rec is populated with the current row.
162 --   A FALSE value will be returned if all of the primary key arguments
163 --   are null.
164 --
165 -- Prerequisites:
166 --   None.
167 --
168 -- In Parameters:
169 --
170 -- Post Success:
171 --   A value of TRUE will be returned indiciating that the g_old_rec
172 --   is current.
173 --   A value of FALSE will be returned if all of the primary key arguments
174 --   have a null value (this indicates that the row has not be inserted into
175 --   the Schema), and therefore could never have a corresponding row.
176 --
177 -- Post Failure:
178 --   A failure can only occur under two circumstances:
179 --   1) The primary key is invalid (i.e. a row does not exist for the
180 --      specified primary key values).
181 --   2) If an object_version_number exists but is NOT the same as the current
182 --      g_old_rec value.
183 --
184 -- Developer Implementation Notes:
185 --   None.
186 --
187 -- Access Status:
188 --   Internal Development Use Only.
189 --
190 -- {End Of Comments}
191 -- ----------------------------------------------------------------------------
192 Function api_updating
193   (p_spinal_point_id                      in     number
194   ,p_object_version_number                in     number
195   )      Return Boolean;
196 --
197 -- ----------------------------------------------------------------------------
198 -- |---------------------------------< lck >----------------------------------|
199 -- ----------------------------------------------------------------------------
200 -- {Start of comments}
201 --
202 -- Description:
203 --   The Lck process has two main functions to perform. Firstly, the row to be
204 --   updated or deleted must be locked. The locking of the row will only be
205 --   successful if the row is not currently locked by another user.
206 --   Secondly, during the locking of the row, the row is selected into
207 --   the g_old_rec data structure which enables the current row values from
208 --   the server to be available to the api.
209 --
210 -- Prerequisites:
211 --   When attempting to call the lock the object version number (if defined)
212 --   is mandatory.
213 --
214 -- In Parameters:
215 --   The arguments to the Lck process are the primary key(s) which uniquely
216 --   identify the row and the object version number of row.
217 --
218 -- Post Success:
219 --   On successful completion of the Lck process the row to be updated or
220 --   deleted will be locked and selected into the global data structure
221 --   g_old_rec.
222 --
223 -- Post Failure:
224 --   The Lck process can fail for three reasons:
225 --   1) When attempting to lock the row the row could already be locked by
226 --      another user. This will raise the HR_Api.Object_Locked exception.
227 --   2) The row which is required to be locked doesn't exist in the HR Schema.
228 --      This error is trapped and reported using the message name
229 --      'HR_7220_INVALID_PRIMARY_KEY'.
230 --   3) The row although existing in the HR Schema has a different object
231 --      version number than the object version number specified.
232 --      This error is trapped and reported using the message name
233 --      'HR_7155_OBJECT_INVALID'.
234 --
235 -- Developer Implementation Notes:
236 --   For each primary key and the object version number arguments add a
237 --   call to hr_api.mandatory_arg_error procedure to ensure that these
238 --   argument values are not null.
239 --
240 -- Access Status:
241 --   Internal Development Use Only.
242 --
243 -- {End of comments}
244 -- ----------------------------------------------------------------------------
245 Procedure lck
246   (p_spinal_point_id                      in     number
247   ,p_object_version_number                in     number
248   );
249 --
250 -- ----------------------------------------------------------------------------
251 -- |-----------------------------< convert_args >-----------------------------|
252 -- ----------------------------------------------------------------------------
253 -- {Start Of Comments}
254 --
255 -- Description:
256 --   This function is used to turn attribute parameters into the record
257 --   structure parameter g_rec_type.
258 --
259 -- Prerequisites:
260 --   This is a private function and can only be called from the ins or upd
261 --   attribute processes.
262 --
263 -- In Parameters:
264 --
265 -- Post Success:
266 --   A returning record structure will be returned.
267 --
268 -- Post Failure:
269 --   No direct error handling is required within this function.  Any possible
270 --   errors within this function will be a PL/SQL value error due to
271 --   conversion of datatypes or data lengths.
272 --
273 -- Developer Implementation Notes:
274 --   None.
275 --
276 -- Access Status:
277 --   Internal Row Handler Use Only.
278 --
279 -- {End Of Comments}
280 -- ----------------------------------------------------------------------------
281 Function convert_args
282   (p_spinal_point_id                in number
283   ,p_business_group_id              in number
284   ,p_parent_spine_id                in number
285   ,p_sequence                       in number
286   ,p_spinal_point                   in varchar2
287   ,p_request_id                     in number
288   ,p_program_application_id         in number
289   ,p_program_id                     in number
290   ,p_program_update_date            in date
291   ,p_object_version_number          in number
292   ,p_information_category           in varchar2
293   ,p_information1                   in varchar2
294   ,p_information2                   in varchar2
295   ,p_information3                   in varchar2
296   ,p_information4                   in varchar2
297   ,p_information5                   in varchar2
298   ,p_information6                   in varchar2
299   ,p_information7                   in varchar2
300   ,p_information8                   in varchar2
301   ,p_information9                   in varchar2
302   ,p_information10                  in varchar2
303   ,p_information11                  in varchar2
304   ,p_information12                  in varchar2
305   ,p_information13                  in varchar2
306   ,p_information14                  in varchar2
307   ,p_information15                  in varchar2
308   ,p_information16                  in varchar2
309   ,p_information17                  in varchar2
310   ,p_information18                  in varchar2
311   ,p_information19                  in varchar2
312   ,p_information20                  in varchar2
313   ,p_information21                  in varchar2
314   ,p_information22                  in varchar2
315   ,p_information23                  in varchar2
316   ,p_information24                  in varchar2
317   ,p_information25                  in varchar2
318   ,p_information26                  in varchar2
319   ,p_information27                  in varchar2
320   ,p_information28                  in varchar2
321   ,p_information29                  in varchar2
322   ,p_information30                  in varchar2
323   )
324   Return g_rec_type;
325 --
326 end per_psp_shd;