DBA Data[Home] [Help]

PACKAGE: APPS.PER_PAC_SHD

Source


1 Package per_pac_shd as
2 /* $Header: pepacrhi.pkh 120.2 2005/10/27 04:01 lsilveir noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (allocated_checklist_id          number(15)
10   ,checklist_id                    number(15)
11   ,person_id                       number(15)
12   ,assignment_id                   number(15)
13   ,checklist_name                  varchar2(240)
14   ,description                     varchar2(360)
15   ,checklist_category              varchar2(60)
16   ,object_version_number           number(9)
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   ,information_category            varchar2(30)
39   ,information1                    varchar2(150)
40   ,information2                    varchar2(150)
41   ,information3                    varchar2(150)
42   ,information4                    varchar2(150)
43   ,information5                    varchar2(150)
44   ,information6                    varchar2(150)
45   ,information7                    varchar2(150)
46   ,information8                    varchar2(150)
47   ,information9                    varchar2(150)
48   ,information10                   varchar2(150)
49   ,information11                   varchar2(150)
50   ,information12                   varchar2(150)
51   ,information13                   varchar2(150)
52   ,information14                   varchar2(150)
53   ,information15                   varchar2(150)
54   ,information16                   varchar2(150)
55   ,information17                   varchar2(150)
56   ,information18                   varchar2(150)
57   ,information19                   varchar2(150)
58   ,information20                   varchar2(150)
59   );
60 --
61 -- ----------------------------------------------------------------------------
62 -- |           Global Definitions - Internal Development Use Only             |
63 -- ----------------------------------------------------------------------------
64 --
65 g_old_rec  g_rec_type;                            -- Global record definition
66 -- Global table name
67 g_tab_nam  constant varchar2(30) := 'PER_ALLOCATED_CHECKLISTS';
68 --
69 -- ----------------------------------------------------------------------------
70 -- |---------------------------< constraint_error >---------------------------|
71 -- ----------------------------------------------------------------------------
72 -- {Start Of Comments}
73 --
74 -- Description:
75 --   This procedure is called when a constraint has been violated (i.e.
76 --   The exception 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).
79 --   The exceptions can only be raised as follows:
80 --   1) A check constraint can only be violated during an INSERT or UPDATE
81 --      dml operation.
82 --   2) A parent integrity constraint can only be violated during an
83 --      INSERT or UPDATE dml operation.
84 --   3) A child integrity constraint can only be violated during an
85 --      DELETE dml operation.
86 --   4) A unique integrity constraint can only be violated during INSERT or
87 --      UPDATE dml operation.
88 --
89 -- Prerequisites:
90 --   1) Either hr_api.check_integrity_violated,
91 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
92 --      hr_api.unique_integrity_violated has been raised with the subsequent
93 --      stripping of the constraint name from the generated error message
94 --      text.
95 --   2) Standalone validation test which corresponds with a constraint error.
96 --
97 -- In Parameter:
98 --   p_constraint_name is in upper format and is just the constraint name
99 --   (e.g. not prefixed by brackets, schema owner etc).
100 --
101 -- Post Success:
102 --   Development dependant.
103 --
104 -- Post Failure:
105 --   Developement dependant.
106 --
107 -- Developer Implementation Notes:
108 --   For each constraint being checked the hr system package failure message
109 --   has been generated as a template only. These system error messages should
110 --   be modified as required (i.e. change the system failure message to a user
111 --   friendly defined error message).
112 --
113 -- Access Status:
114 --   Internal Development Use Only.
115 --
116 -- {End Of Comments}
117 -- ----------------------------------------------------------------------------
118 Procedure constraint_error
119   (p_constraint_name in all_constraints.constraint_name%TYPE);
120 --
121 -- ----------------------------------------------------------------------------
122 -- |-----------------------------< api_updating >-----------------------------|
123 -- ----------------------------------------------------------------------------
124 --  {Start Of Comments}
125 --
126 -- Description:
127 --   This function is used to populate the g_old_rec record with the
128 --   current row from the database for the specified primary key
129 --   provided that the primary key exists and is valid and does not
130 --   already match the current g_old_rec. The function will always return
131 --   a TRUE value if the g_old_rec is populated with the current row.
132 --   A FALSE value will be returned if all of the primary key arguments
133 --   are null.
134 --
135 -- Prerequisites:
136 --   None.
137 --
138 -- In Parameters:
139 --
140 -- Post Success:
141 --   A value of TRUE will be returned indiciating that the g_old_rec
142 --   is current.
143 --   A value of FALSE will be returned if all of the primary key arguments
144 --   have a null value (this indicates that the row has not be inserted into
145 --   the Schema), and therefore could never have a corresponding row.
146 --
147 -- Post Failure:
148 --   A failure can only occur under two circumstances:
149 --   1) The primary key is invalid (i.e. a row does not exist for the
150 --      specified primary key values).
151 --   2) If an object_version_number exists but is NOT the same as the current
152 --      g_old_rec value.
153 --
154 -- Developer Implementation Notes:
155 --   None.
156 --
157 -- Access Status:
158 --   Internal Development Use Only.
159 --
160 -- {End Of Comments}
161 -- ----------------------------------------------------------------------------
162 Function api_updating
163   (p_allocated_checklist_id               in     number
164   ,p_object_version_number                in     number
165   )      Return Boolean;
166 --
167 -- ----------------------------------------------------------------------------
168 -- |---------------------------------< lck >----------------------------------|
169 -- ----------------------------------------------------------------------------
170 -- {Start of comments}
171 --
172 -- Description:
173 --   The Lck process has two main functions to perform. Firstly, the row to be
174 --   updated or deleted must be locked. The locking of the row will only be
175 --   successful if the row is not currently locked by another user.
176 --   Secondly, during the locking of the row, the row is selected into
177 --   the g_old_rec data structure which enables the current row values from
178 --   the server to be available to the api.
179 --
180 -- Prerequisites:
181 --   When attempting to call the lock the object version number (if defined)
182 --   is mandatory.
183 --
184 -- In Parameters:
185 --   The arguments to the Lck process are the primary key(s) which uniquely
186 --   identify the row and the object version number of row.
187 --
188 -- Post Success:
189 --   On successful completion of the Lck process the row to be updated or
190 --   deleted will be locked and selected into the global data structure
191 --   g_old_rec.
192 --
193 -- Post Failure:
194 --   The Lck process can fail for three reasons:
195 --   1) When attempting to lock the row the row could already be locked by
196 --      another user. This will raise the HR_Api.Object_Locked exception.
197 --   2) The row which is required to be locked doesn't exist in the HR Schema.
198 --      This error is trapped and reported using the message name
199 --      'HR_7220_INVALID_PRIMARY_KEY'.
200 --   3) The row although existing in the HR Schema has a different object
201 --      version number than the object version number specified.
202 --      This error is trapped and reported using the message name
203 --      'HR_7155_OBJECT_INVALID'.
204 --
205 -- Developer Implementation Notes:
206 --   For each primary key and the object version number arguments add a
207 --   call to hr_api.mandatory_arg_error procedure to ensure that these
208 --   argument values are not null.
209 --
210 -- Access Status:
211 --   Internal Development Use Only.
212 --
213 -- {End of comments}
214 -- ----------------------------------------------------------------------------
215 Procedure lck
216   (p_allocated_checklist_id               in     number
217   ,p_object_version_number                in     number
218   );
219 --
220 -- ----------------------------------------------------------------------------
221 -- |-----------------------------< convert_args >-----------------------------|
222 -- ----------------------------------------------------------------------------
223 -- {Start Of Comments}
224 --
225 -- Description:
226 --   This function is used to turn attribute parameters into the record
227 --   structure parameter g_rec_type.
228 --
229 -- Prerequisites:
230 --   This is a private function and can only be called from the ins or upd
231 --   attribute processes.
232 --
233 -- In Parameters:
234 --
235 -- Post Success:
236 --   A returning record structure will be returned.
237 --
238 -- Post Failure:
239 --   No direct error handling is required within this function.  Any possible
240 --   errors within this function will be a PL/SQL value error due to
241 --   conversion of datatypes or data lengths.
242 --
243 -- Developer Implementation Notes:
244 --   None.
245 --
246 -- Access Status:
247 --   Internal Row Handler Use Only.
248 --
249 -- {End Of Comments}
250 -- ----------------------------------------------------------------------------
251 Function convert_args
252   (p_allocated_checklist_id         in number
253   ,p_checklist_id                   in number
254   ,p_person_id                      in number
255   ,p_assignment_id                  in number
256   ,p_checklist_name                 in varchar2
257   ,p_description                    in varchar2
258   ,p_checklist_category             in varchar2
259   ,p_object_version_number          in number
260   ,p_attribute_category             in varchar2
261   ,p_attribute1                     in varchar2
262   ,p_attribute2                     in varchar2
263   ,p_attribute3                     in varchar2
264   ,p_attribute4                     in varchar2
265   ,p_attribute5                     in varchar2
266   ,p_attribute6                     in varchar2
267   ,p_attribute7                     in varchar2
268   ,p_attribute8                     in varchar2
269   ,p_attribute9                     in varchar2
270   ,p_attribute10                    in varchar2
271   ,p_attribute11                    in varchar2
272   ,p_attribute12                    in varchar2
273   ,p_attribute13                    in varchar2
274   ,p_attribute14                    in varchar2
275   ,p_attribute15                    in varchar2
276   ,p_attribute16                    in varchar2
277   ,p_attribute17                    in varchar2
278   ,p_attribute18                    in varchar2
279   ,p_attribute19                    in varchar2
280   ,p_attribute20                    in varchar2
281   ,p_information_category           in varchar2
282   ,p_information1                   in varchar2
283   ,p_information2                   in varchar2
284   ,p_information3                   in varchar2
285   ,p_information4                   in varchar2
286   ,p_information5                   in varchar2
287   ,p_information6                   in varchar2
288   ,p_information7                   in varchar2
289   ,p_information8                   in varchar2
290   ,p_information9                   in varchar2
291   ,p_information10                  in varchar2
292   ,p_information11                  in varchar2
293   ,p_information12                  in varchar2
294   ,p_information13                  in varchar2
295   ,p_information14                  in varchar2
296   ,p_information15                  in varchar2
297   ,p_information16                  in varchar2
298   ,p_information17                  in varchar2
299   ,p_information18                  in varchar2
300   ,p_information19                  in varchar2
301   ,p_information20                  in varchar2
302   )
303   Return g_rec_type;
304 --
305 end per_pac_shd;