DBA Data[Home] [Help]

PACKAGE: APPS.PER_REQ_SHD

Source


1 Package per_req_shd AUTHID CURRENT_USER as
2 /* $Header: pereqrhi.pkh 120.0.12000000.1 2007/01/22 03:09:22 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (requisition_id                  number(15)
10   ,business_group_id               number(15)
11   ,person_id                       number(10)
12   ,date_from                       date
13   ,name                            varchar2(30)
14   ,comments                        varchar2(240)
15   ,date_to                         date
16   ,description                     varchar2(80)
17   ,request_id                      number(15)
18   ,program_application_id          number(15)
19   ,program_id                      number(15)
20   ,program_update_date             date
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   ,object_version_number           number(15)
43   );
44 --
45 -- ----------------------------------------------------------------------------
46 -- |           Global Definitions - Internal Development Use Only             |
47 -- ----------------------------------------------------------------------------
48 --
49 g_old_rec  g_rec_type;                            -- Global record definition
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   (p_requisition_id                       in     number
146   ,p_object_version_number                in     number
147   )      Return Boolean;
148 --
149 -- ----------------------------------------------------------------------------
150 -- |---------------------------------< lck >----------------------------------|
151 -- ----------------------------------------------------------------------------
152 -- {Start of comments}
153 --
154 -- Description:
155 --   The Lck process has two main functions to perform. Firstly, the row to be
156 --   updated or deleted must be locked. The locking of the row will only be
157 --   successful if the row is not currently locked by another user.
158 --   Secondly, during the locking of the row, the row is selected into
159 --   the g_old_rec data structure which enables the current row values from
160 --   the server to be available to the api.
161 --
162 -- Prerequisites:
163 --   When attempting to call the lock the object version number (if defined)
164 --   is mandatory.
165 --
166 -- In Parameters:
167 --   The arguments to the Lck process are the primary key(s) which uniquely
168 --   identify the row and the object version number of row.
169 --
170 -- Post Success:
171 --   On successful completion of the Lck process the row to be updated or
172 --   deleted will be locked and selected into the global data structure
173 --   g_old_rec.
174 --
175 -- Post Failure:
176 --   The Lck process can fail for three reasons:
177 --   1) When attempting to lock the row the row could already be locked by
178 --      another user. This will raise the HR_Api.Object_Locked exception.
179 --   2) The row which is required to be locked doesn't exist in the HR Schema.
180 --      This error is trapped and reported using the message name
181 --      'HR_7220_INVALID_PRIMARY_KEY'.
182 --   3) The row although existing in the HR Schema has a different object
183 --      version number than the object version number specified.
184 --      This error is trapped and reported using the message name
185 --      'HR_7155_OBJECT_INVALID'.
186 --
187 -- Developer Implementation Notes:
188 --   For each primary key and the object version number arguments add a
189 --   call to hr_api.mandatory_arg_error procedure to ensure that these
190 --   argument values are not null.
191 --
192 -- Access Status:
193 --   Internal Development Use Only.
194 --
195 -- {End of comments}
196 -- ----------------------------------------------------------------------------
197 Procedure lck
198   (p_requisition_id                       in     number
199   ,p_object_version_number                in     number
200   );
201 --
202 -- ----------------------------------------------------------------------------
203 -- |-----------------------------< convert_args >-----------------------------|
204 -- ----------------------------------------------------------------------------
205 -- {Start Of Comments}
206 --
207 -- Description:
208 --   This function is used to turn attribute parameters into the record
209 --   structure parameter g_rec_type.
210 --
211 -- Prerequisites:
212 --   This is a private function and can only be called from the ins or upd
213 --   attribute processes.
214 --
215 -- In Parameters:
216 --
217 -- Post Success:
218 --   A returning record structure will be returned.
219 --
220 -- Post Failure:
221 --   No direct error handling is required within this function.  Any possible
222 --   errors within this function will be a PL/SQL value error due to
223 --   conversion of datatypes or data lengths.
224 --
225 -- Developer Implementation Notes:
226 --   None.
227 --
228 -- Access Status:
229 --   Internal Row Handler Use Only.
230 --
231 -- {End Of Comments}
232 -- ----------------------------------------------------------------------------
233 Function convert_args
234   (p_requisition_id                 in number
235   ,p_business_group_id              in number
236   ,p_person_id                      in number
237   ,p_date_from                      in date
238   ,p_name                           in varchar2
239   ,p_comments                       in varchar2
240   ,p_date_to                        in date
241   ,p_description                    in varchar2
242   ,p_request_id                     in number
243   ,p_program_application_id         in number
244   ,p_program_id                     in number
245   ,p_program_update_date            in date
246   ,p_attribute_category             in varchar2
247   ,p_attribute1                     in varchar2
248   ,p_attribute2                     in varchar2
249   ,p_attribute3                     in varchar2
250   ,p_attribute4                     in varchar2
251   ,p_attribute5                     in varchar2
252   ,p_attribute6                     in varchar2
253   ,p_attribute7                     in varchar2
254   ,p_attribute8                     in varchar2
255   ,p_attribute9                     in varchar2
256   ,p_attribute10                    in varchar2
257   ,p_attribute11                    in varchar2
258   ,p_attribute12                    in varchar2
259   ,p_attribute13                    in varchar2
260   ,p_attribute14                    in varchar2
261   ,p_attribute15                    in varchar2
262   ,p_attribute16                    in varchar2
263   ,p_attribute17                    in varchar2
264   ,p_attribute18                    in varchar2
265   ,p_attribute19                    in varchar2
266   ,p_attribute20                    in varchar2
267   ,p_object_version_number          in number
268   )
269   Return g_rec_type;
270 --
271 end per_req_shd;