1 Package hxc_ulc_shd as
2 /* $Header: hxculcrhi.pkh 120.0 2005/05/29 06:04:07 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Global Record Type Specification |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9 (layout_component_id number(15)
10 ,layout_id number(15)
11 ,parent_component_id number(15)
12 ,component_name varchar2(240)
13 ,component_value varchar2(240)
14 ,sequence number(9)
15 ,name_value_string varchar2(2000)
16 ,region_code varchar2(30)
17 ,region_code_app_id number(15)
18 ,attribute_code varchar2(30)
19 ,attribute_code_app_id number(15)
20 ,object_version_number number(9)
21 ,layout_comp_definition_id number(15)
22 ,component_alias varchar2(240)
23 ,parent_bean varchar2(240)
24 ,attribute1 varchar2(240)
25 ,attribute2 varchar2(240)
26 ,attribute3 varchar2(240)
27 ,attribute4 varchar2(240)
28 ,attribute5 varchar2(240)
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_layout_component_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_layout_component_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_layout_component_id in number
221 ,p_layout_id in number
222 ,p_parent_component_id in number
223 ,p_component_name in varchar2
224 ,p_component_value in varchar2
225 ,p_sequence in number
226 ,p_name_value_string in varchar2
227 ,p_region_code in varchar2
228 ,p_region_code_app_id in number
229 ,p_attribute_code in varchar2
230 ,p_attribute_code_app_id in number
231 ,p_object_version_number in number
232 ,p_layout_comp_definition_id in number
233 ,p_component_alias in varchar2
234 ,p_parent_bean in varchar2
235 ,p_attribute1 in varchar2
236 ,p_attribute2 in varchar2
237 ,p_attribute3 in varchar2
238 ,p_attribute4 in varchar2
239 ,p_attribute5 in varchar2
240 )
241 Return g_rec_type;
242 --
243 end hxc_ulc_shd;