DBA Data[Home] [Help]

PACKAGE: APPS.HR_ICX_SHD

Source


1 Package hr_icx_shd as
2 /* $Header: hricxrhi.pkh 120.0 2005/05/31 00:51:03 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (item_context_id                 number(15)
10   ,object_version_number           number(9)
11   ,id_flex_num                     number(15)
12   ,summary_flag                    varchar2(9)       -- Increased length
13   ,enabled_flag                    varchar2(9)       -- Increased length
14   ,start_date_active               date
15   ,end_date_active                 date
16   ,segment1                        varchar2(150)
17   ,segment2                        varchar2(150)
18   ,segment3                        varchar2(150)
19   ,segment4                        varchar2(150)
20   ,segment5                        varchar2(150)
21   ,segment6                        varchar2(150)
22   ,segment7                        varchar2(150)
23   ,segment8                        varchar2(150)
24   ,segment9                        varchar2(150)
25   ,segment10                       varchar2(150)
26   ,segment11                       varchar2(150)
27   ,segment12                       varchar2(150)
28   ,segment13                       varchar2(150)
29   ,segment14                       varchar2(150)
30   ,segment15                       varchar2(150)
31   ,segment16                       varchar2(150)
32   ,segment17                       varchar2(150)
33   ,segment18                       varchar2(150)
34   ,segment19                       varchar2(150)
35   ,segment20                       varchar2(150)
36   ,segment21                       varchar2(150)
37   ,segment22                       varchar2(150)
38   ,segment23                       varchar2(150)
39   ,segment24                       varchar2(150)
40   ,segment25                       varchar2(150)
41   ,segment26                       varchar2(150)
42   ,segment27                       varchar2(150)
43   ,segment28                       varchar2(150)
44   ,segment29                       varchar2(150)
45   ,segment30                       varchar2(150)
46   );
47 --
48 -- ----------------------------------------------------------------------------
49 -- |           Global Definitions - Internal Development Use Only             |
50 -- ----------------------------------------------------------------------------
51 --
52 g_old_rec  g_rec_type;                            -- Global record definition
53 --
54 -- ----------------------------------------------------------------------------
55 -- |---------------------------< constraint_error >---------------------------|
56 -- ----------------------------------------------------------------------------
57 -- {Start Of Comments}
58 --
59 -- Description:
60 --   This procedure is called when a constraint has been violated (i.e.
61 --   The exception hr_api.check_integrity_violated,
62 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
63 --   hr_api.unique_integrity_violated has been raised).
64 --   The exceptions can only be raised as follows:
65 --   1) A check constraint can only be violated during an INSERT or UPDATE
66 --      dml operation.
67 --   2) A parent integrity constraint can only be violated during an
68 --      INSERT or UPDATE dml operation.
69 --   3) A child integrity constraint can only be violated during an
70 --      DELETE dml operation.
71 --   4) A unique integrity constraint can only be violated during INSERT or
72 --      UPDATE dml operation.
73 --
74 -- Prerequisites:
75 --   1) Either hr_api.check_integrity_violated,
76 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
77 --      hr_api.unique_integrity_violated has been raised with the subsequent
78 --      stripping of the constraint name from the generated error message
79 --      text.
80 --   2) Standalone validation test which corresponds with a constraint error.
81 --
82 -- In Parameter:
83 --   p_constraint_name is in upper format and is just the constraint name
84 --   (e.g. not prefixed by brackets, schema owner etc).
85 --
86 -- Post Success:
87 --   Development dependant.
88 --
89 -- Post Failure:
90 --   Developement dependant.
91 --
92 -- Developer Implementation Notes:
93 --   For each constraint being checked the hr system package failure message
94 --   has been generated as a template only. These system error messages should
95 --   be modified as required (i.e. change the system failure message to a user
96 --   friendly defined error message).
97 --
98 -- Access Status:
99 --   Internal Development Use Only.
100 --
101 -- {End Of Comments}
102 -- ----------------------------------------------------------------------------
103 Procedure constraint_error
104   (p_constraint_name in all_constraints.constraint_name%TYPE);
105 --
106 -- ----------------------------------------------------------------------------
107 -- |-----------------------------< api_updating >-----------------------------|
108 -- ----------------------------------------------------------------------------
109 --  {Start Of Comments}
110 --
111 -- Description:
112 --   This function is used to populate the g_old_rec record with the
113 --   current row from the database for the specified primary key
114 --   provided that the primary key exists and is valid and does not
115 --   already match the current g_old_rec. The function will always return
116 --   a TRUE value if the g_old_rec is populated with the current row.
117 --   A FALSE value will be returned if all of the primary key arguments
118 --   are null.
119 --
120 -- Prerequisites:
121 --   None.
122 --
123 -- In Parameters:
124 --
125 -- Post Success:
126 --   A value of TRUE will be returned indiciating that the g_old_rec
127 --   is current.
128 --   A value of FALSE will be returned if all of the primary key arguments
129 --   have a null value (this indicates that the row has not be inserted into
130 --   the Schema), and therefore could never have a corresponding row.
131 --
132 -- Post Failure:
133 --   A failure can only occur under two circumstances:
134 --   1) The primary key is invalid (i.e. a row does not exist for the
135 --      specified primary key values).
136 --   2) If an object_version_number exists but is NOT the same as the current
137 --      g_old_rec value.
138 --
139 -- Developer Implementation Notes:
140 --   None.
141 --
142 -- Access Status:
143 --   Internal Development Use Only.
144 --
145 -- {End Of Comments}
146 -- ----------------------------------------------------------------------------
147 Function api_updating
148   (p_item_context_id                      in     number
149   ,p_object_version_number                in     number
150   )      Return Boolean;
151 --
152 -- ----------------------------------------------------------------------------
153 -- |---------------------------------< lck >----------------------------------|
154 -- ----------------------------------------------------------------------------
155 -- {Start of comments}
156 --
157 -- Description:
158 --   The Lck process has two main functions to perform. Firstly, the row to be
159 --   updated or deleted must be locked. The locking of the row will only be
160 --   successful if the row is not currently locked by another user.
161 --   Secondly, during the locking of the row, the row is selected into
162 --   the g_old_rec data structure which enables the current row values from the
163 --   server to be available to the api.
164 --
165 -- Prerequisites:
166 --   When attempting to call the lock the object version number (if defined)
167 --   is mandatory.
168 --
169 -- In Parameters:
170 --   The arguments to the Lck process are the primary key(s) which uniquely
171 --   identify the row and the object version number of row.
172 --
173 -- Post Success:
174 --   On successful completion of the Lck process the row to be updated or
175 --   deleted will be locked and selected into the global data structure
176 --   g_old_rec.
177 --
178 -- Post Failure:
179 --   The Lck process can fail for three reasons:
180 --   1) When attempting to lock the row the row could already be locked by
181 --      another user. This will raise the HR_Api.Object_Locked exception.
182 --   2) The row which is required to be locked doesn't exist in the HR Schema.
183 --      This error is trapped and reported using the message name
184 --      'HR_7220_INVALID_PRIMARY_KEY'.
185 --   3) The row although existing in the HR Schema has a different object
186 --      version number than the object version number specified.
187 --      This error is trapped and reported using the message name
188 --      'HR_7155_OBJECT_INVALID'.
189 --
190 -- Developer Implementation Notes:
191 --   For each primary key and the object version number arguments add a
192 --   call to hr_api.mandatory_arg_error procedure to ensure that these
193 --   argument values are not null.
194 --
195 -- Access Status:
196 --   Internal Development Use Only.
197 --
198 -- {End of comments}
199 -- ----------------------------------------------------------------------------
200 Procedure lck
201   (p_item_context_id                      in     number
202   ,p_object_version_number                in     number
203   );
204 --
205 -- ----------------------------------------------------------------------------
206 -- |-----------------------------< convert_args >-----------------------------|
207 -- ----------------------------------------------------------------------------
208 -- {Start Of Comments}
209 --
210 -- Description:
211 --   This function is used to turn attribute parameters into the record
212 --   structure parameter g_rec_type.
213 --
214 -- Prerequisites:
215 --   This is a private function and can only be called from the ins or upd
216 --   attribute processes.
217 --
218 -- In Parameters:
219 --
220 -- Post Success:
221 --   A returning record structure will be returned.
222 --
223 -- Post Failure:
224 --   No direct error handling is required within this function.  Any possible
225 --   errors within this function will be a PL/SQL value error due to conversion
226 --   of datatypes or data lengths.
227 --
228 -- Developer Implementation Notes:
229 --   None.
230 --
231 -- Access Status:
232 --   Internal Row Handler Use Only.
233 --
234 -- {End Of Comments}
235 -- ----------------------------------------------------------------------------
236 Function convert_args
237   (p_item_context_id                in number
238   ,p_object_version_number          in number
239   ,p_id_flex_num                    in number
240   ,p_summary_flag                   in varchar2
241   ,p_enabled_flag                   in varchar2
242   ,p_start_date_active              in date
243   ,p_end_date_active                in date
244   ,p_segment1                       in varchar2
245   ,p_segment2                       in varchar2
246   ,p_segment3                       in varchar2
247   ,p_segment4                       in varchar2
248   ,p_segment5                       in varchar2
249   ,p_segment6                       in varchar2
250   ,p_segment7                       in varchar2
251   ,p_segment8                       in varchar2
252   ,p_segment9                       in varchar2
253   ,p_segment10                      in varchar2
254   ,p_segment11                      in varchar2
255   ,p_segment12                      in varchar2
256   ,p_segment13                      in varchar2
257   ,p_segment14                      in varchar2
258   ,p_segment15                      in varchar2
259   ,p_segment16                      in varchar2
260   ,p_segment17                      in varchar2
261   ,p_segment18                      in varchar2
262   ,p_segment19                      in varchar2
263   ,p_segment20                      in varchar2
264   ,p_segment21                      in varchar2
265   ,p_segment22                      in varchar2
266   ,p_segment23                      in varchar2
267   ,p_segment24                      in varchar2
268   ,p_segment25                      in varchar2
269   ,p_segment26                      in varchar2
270   ,p_segment27                      in varchar2
271   ,p_segment28                      in varchar2
272   ,p_segment29                      in varchar2
273   ,p_segment30                      in varchar2
274   )
275   Return g_rec_type;
276 --
277 end hr_icx_shd;