DBA Data[Home] [Help]

PACKAGE: APPS.HXC_TAT_SHD

Source


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