DBA Data[Home] [Help]

PACKAGE: APPS.HR_TMP_SHD

Source


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