DBA Data[Home] [Help]

PACKAGE: APPS.HXC_TBB_SHD

Source


1 package hxc_tbb_shd as
2 /* $Header: hxctbbrhi.pkh 120.1 2005/07/14 17:23:33 arundell noship $ */
3 
4 -- --------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                    |
6 -- --------------------------------------------------------------------------
7 
8 type g_rec_type is record
9   (time_building_block_id          hxc_time_building_blocks.time_building_block_id%type
10   ,type                            hxc_time_building_blocks.type%type
11   ,measure                         hxc_time_building_blocks.measure%type
12   ,unit_of_measure                 hxc_time_building_blocks.unit_of_measure%type
13   ,start_time                      hxc_time_building_blocks.start_time%type
14   ,stop_time                       hxc_time_building_blocks.stop_time%type
15   ,parent_building_block_id        hxc_time_building_blocks.parent_building_block_id%type
16   ,parent_building_block_ovn       hxc_time_building_blocks.parent_building_block_ovn%type
17   ,scope                           hxc_time_building_blocks.scope%type
18   ,object_version_number           hxc_time_building_blocks.object_version_number%type
19   ,approval_status                 hxc_time_building_blocks.approval_status%type
20   ,resource_id                     hxc_time_building_blocks.resource_id%type
21   ,resource_type                   hxc_time_building_blocks.resource_type%type
22   ,approval_style_id               hxc_time_building_blocks.approval_style_id%type
23   ,date_from                       hxc_time_building_blocks.date_from%type
24   ,date_to                         hxc_time_building_blocks.date_to%type
25   ,comment_text                    hxc_time_building_blocks.comment_text%type
26   ,application_set_id              hxc_time_building_blocks.application_set_id%type
27   ,data_set_id                     hxc_time_building_blocks.data_set_id%type
28   ,translation_display_key         hxc_time_building_blocks.translation_display_key%type
29   );
30 
31 -- --------------------------------------------------------------------------
32 -- |           Global Definitions - Internal Development Use Only           |
33 -- --------------------------------------------------------------------------
34 
35 g_old_rec  g_rec_type; -- global record definition
36 
37 -- --------------------------------------------------------------------------
38 -- |---------------------------< constraint_error >-------------------------|
39 -- --------------------------------------------------------------------------
40 -- {Start Of Comments}
41 --
42 -- Description:
43 --   This procedure is called when a constraint has been violated (i.e.
44 --   The exception hr_api.check_integrity_violated,
45 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
46 --   hr_api.unique_integrity_violated has been raised).
47 --   The exceptions can only be raised as follows:
48 --   1) A check constraint can only be violated during an INSERT or UPDATE
49 --      dml operation.
50 --   2) A parent integrity constraint can only be violated during an
51 --      INSERT or UPDATE dml operation.
52 --   3) A child integrity constraint can only be violated during an
53 --      DELETE dml operation.
54 --   4) A unique integrity constraint can only be violated during INSERT or
55 --      UPDATE dml operation.
56 --
57 -- Prerequisites:
58 --   1) Either 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 with the subsequent
61 --      stripping of the constraint name from the generated error message
62 --      text.
63 --   2) Standalone validation test which corresponds with a constraint error.
64 --
65 -- In Parameter:
66 --   p_constraint_name is in upper format and is just the constraint name
67 --   (e.g. not prefixed by brackets, schema owner etc).
68 --
69 -- Post Success:
70 --   Development dependant.
71 --
72 -- Post Failure:
73 --   Developement dependant.
74 --
75 -- Developer Implementation Notes:
76 --   For each constraint being checked the hr system package failure message
77 --   has been generated as a template only. These system error messages should
78 --   be modified as required (i.e. change the system failure message to a user
79 --   friendly defined error message).
80 --
81 -- Access Status:
82 --   Internal Development Use Only.
83 --
84 -- {End Of Comments}
85 -- --------------------------------------------------------------------------
86 procedure constraint_error
87   (p_constraint_name in all_constraints.constraint_name%TYPE);
88 
89 -- --------------------------------------------------------------------------
90 -- |-----------------------------< api_updating >---------------------------|
91 -- --------------------------------------------------------------------------
92 --  {Start Of Comments}
93 --
94 -- Description:
95 --   This function is used to populate the g_old_rec record with the
96 --   current row from the database for the specified primary key
97 --   provided that the primary key exists and is valid and does not
98 --   already match the current g_old_rec. The function will always return
99 --   a TRUE value if the g_old_rec is populated with the current row.
100 --   A FALSE value will be returned if all of the primary key arguments
101 --   are null.
102 --
103 -- Prerequisites:
104 --   None.
105 --
106 -- In Parameters:
107 --
108 -- Post Success:
109 --   A value of TRUE will be returned indiciating that the g_old_rec
110 --   is current.
111 --   A value of FALSE will be returned if all of the primary key arguments
112 --   have a null value (this indicates that the row has not be inserted into
113 --   the Schema), and therefore could never have a corresponding row.
114 --
115 -- Post Failure:
116 --   A failure can only occur under two circumstances:
117 --   1) The primary key is invalid (i.e. a row does not exist for the
118 --      specified primary key values).
119 --   2) If an object_version_number exists but is NOT the same as the current
120 --      g_old_rec value.
121 --
122 -- Developer Implementation Notes:
123 --   None.
124 --
125 -- Access Status:
126 --   Internal Development Use Only.
127 --
128 -- {End Of Comments}
129 -- --------------------------------------------------------------------------
130 function api_updating
131   (p_time_building_block_id in number
132   ,p_object_version_number  in number
133   ) return boolean;
134 
135 -- --------------------------------------------------------------------------
136 -- |---------------------------------< lck >--------------------------------|
137 -- --------------------------------------------------------------------------
138 -- {Start of comments}
139 --
140 -- Description:
141 --   The Lck process has two main functions to perform. Firstly, the row to be
142 --   updated or deleted must be locked. The locking of the row will only be
143 --   successful if the row is not currently locked by another user.
144 --   Secondly, during the locking of the row, the row is selected into
145 --   the g_old_rec data structure which enables the current row values from the
146 --   server to be available to the api.
147 --
148 -- Prerequisites:
149 --   When attempting to call the lock the object version number (if defined)
150 --   is mandatory.
151 --
152 -- In Parameters:
153 --   The arguments to the Lck process are the primary key(s) which uniquely
154 --   identify the row and the object version number of row.
155 --
156 -- Post Success:
157 --   On successful completion of the Lck process the row to be updated or
158 --   deleted will be locked and selected into the global data structure
159 --   g_old_rec.
160 --
161 -- Post Failure:
162 --   The Lck process can fail for three reasons:
163 --   1) When attempting to lock the row the row could already be locked by
164 --      another user. This will raise the HR_Api.Object_Locked exception.
165 --   2) The row which is required to be locked doesn't exist in the HR Schema.
166 --      This error is trapped and reported using the message name
167 --      'HR_7220_INVALID_PRIMARY_KEY'.
168 --   3) The row although existing in the HR Schema has a different object
169 --      version number than the object version number specified.
170 --      This error is trapped and reported using the message name
171 --      'HR_7155_OBJECT_INVALID'.
172 --
173 -- Developer Implementation Notes:
174 --   For each primary key and the object version number arguments add a
175 --   call to hr_api.mandatory_arg_error procedure to ensure that these
176 --   argument values are not null.
177 --
178 -- Access Status:
179 --   Internal Development Use Only.
180 --
181 -- {End of comments}
182 -- --------------------------------------------------------------------------
183 procedure lck
184   (p_time_building_block_id in number
185   ,p_object_version_number  in number
186   );
187 
188 -- --------------------------------------------------------------------------
189 -- |-----------------------------< convert_args >---------------------------|
190 -- --------------------------------------------------------------------------
191 -- {Start Of Comments}
192 --
193 -- Description:
194 --   This function is used to turn attribute parameters into the record
195 --   structure parameter g_rec_type.
196 --
197 -- Prerequisites:
198 --   This is a private function and can only be called from the ins or upd
199 --   attribute processes.
200 --
201 -- In Parameters:
202 --
203 -- Post Success:
204 --   A returning record structure will be returned.
205 --
206 -- Post Failure:
207 --   No direct error handling is required within this function.  Any possible
208 --   errors within this function will be a PL/SQL value error due to conversion
209 --   of datatypes or data lengths.
210 --
211 -- Developer Implementation Notes:
212 --   None.
213 --
214 -- Access Status:
215 --   Internal Row Handler Use Only.
216 --
217 -- {End Of Comments}
218 -- --------------------------------------------------------------------------
219 function convert_args
220   (p_time_building_block_id         in number
221   ,p_type                           in varchar2
222   ,p_measure                        in number
223   ,p_unit_of_measure                in varchar2
224   ,p_start_time                     in date
225   ,p_stop_time                      in date
226   ,p_parent_building_block_id       in number
227   ,p_parent_building_block_ovn      in number
228   ,p_scope                          in varchar2
229   ,p_object_version_number          in number
230   ,p_approval_status                in varchar2
231   ,p_resource_id                    in number
232   ,p_resource_type                  in varchar2
233   ,p_approval_style_id              in number
234   ,p_date_from                      in date
235   ,p_date_to                        in date
236   ,p_comment_text                   in varchar2
237   ,p_application_set_id             in number
238   ,p_data_set_id                    in number
239   ,p_translation_display_key        in varchar2
240   )
241   return g_rec_type;
242 
243 end hxc_tbb_shd;