1 PACKAGE HR_XML_UTIL AUTHID CURRENT_USER AS
2 /* $Header: hrxmlutl.pkh 120.0 2005/06/24 07:40:43 appldev noship $*/
3
4 TYPE Primary_Key_Tbl_Type IS TABLE OF VARCHAR2(240) INDEX BY BINARY_INTEGER;
5
6 TYPE Primary_Key_Rec IS RECORD
7 ( primary_Key1 Primary_Key_Tbl_Type
8 ,primary_Key2 Primary_Key_Tbl_Type
9 ,primary_Key3 Primary_Key_Tbl_Type
10 ,primary_Key4 Primary_Key_Tbl_Type
11 ,primary_Key5 Primary_Key_Tbl_Type);
12
13 pk_rec Primary_Key_Rec;
14
15 -- ----------------------------------------------------------------------------
16 -- |---------------------------<value_Of >--------------------------|
17 -- ----------------------------------------------------------------------------
18 -- {Start of comments}
19 --
20 -- Description:
21 -- This function uses the xpath to retrive a node value from the xmldom.DOMDocument
22 --
23 -- Pre-requisites
24 -- All 'IN' parameters to this procedure have been appropriately derived.
25 --
26 -- Post Success:
27 -- The value returned would be non-null
28 --
29 -- Post Failure:
30 -- The value returned would be null
31 --
32 -- Access Status:
33 -- Internal Development use only.
34 --
35 -- {End of comments}
36 -- ----------------------------------------------------------------------------
37 FUNCTION value_Of
38 (doc in xmldom.DOMDocument
39 ,xpath in varchar2
40 )return varchar2;
41 -- ----------------------------------------------------------------------------
42 -- |---------------------------< value_Of >--------------------------|
43 -- ----------------------------------------------------------------------------
44 -- {Start of comments}
45 --
46 -- Description:
47 -- This function uses the xpath to retrive a node value from the CLOB
48 --
49 -- Pre-requisites
50 -- All 'IN' parameters to this procedure have been appropriately derived.
51 --
52 -- Post Success:
53 -- The value returned would be non-null
54 --
55 -- Post Failure:
56 -- The value returned would be null
57 --
58 -- Access Status:
59 -- Internal Development use only.
60 --
61 -- {End of comments}
62 -- ----------------------------------------------------------------------------
63 FUNCTION value_Of
64 (doc in CLOB
65 ,xpath in varchar2
66 )return varchar2;
67 -- ----------------------------------------------------------------------------
68 -- |---------------------------< value_Of >--------------------------|
69 -- ----------------------------------------------------------------------------
70 -- {Start of comments}
71 --
72 -- Description:
73 -- This function uses the xpath to retrive a node value from the document that is passed as a varchar2
74 --
75 -- Pre-requisites
76 -- All 'IN' parameters to this procedure have been appropriately derived.
77 --
78 -- Post Success:
79 -- The value returned would be non-null
80 --
81 -- Post Failure:
82 -- The value returned would be null
83 --
84 -- Access Status:
85 -- Internal Development use only.
86 --
87 -- {End of comments}
88 -- ----------------------------------------------------------------------------
89
90 FUNCTION value_Of
91 (doc in varchar2
92 ,xpath in varchar2
93 )return varchar2;
94
95 -- ----------------------------------------------------------------------------
96 -- |---------------------------< get_Node_Value >--------------------------|
97 -- ----------------------------------------------------------------------------
98 -- {Start of comments}
99 --
100 --1. Description:
101 -- This function would fetch the value of the desired node from the transaction_document
102 --
103 --2. Pre-requisites
104 -- All 'IN' parameters to this procedure have been appropriately derived.
105 --
106 --3. Post Success:
107 -- The value returned would be non-null
108 --
109 --4. Post Failure:
110 -- The value returned would be null
111 --
112 --5. Access Status:
113 -- Internal Development use only.
114 --
115 -- {End of comments}
116 -- ----------------------------------------------------------------------------
117
118 FUNCTION get_Node_Value
119 (p_transaction_document in CLOB
120 ,p_desired_node_value in varchar2
121 ,p_xpath in varchar2
122 ,p_EO_name in varchar default null
123 ,p_pk_1 in varchar default null
124 ,p_value_1 in varchar default null
125 ,p_pk_2 in varchar default null
126 ,p_value_2 in varchar default null
127 ,p_pk_3 in varchar default null
128 ,p_value_3 in varchar default null
129 ,p_pk_4 in varchar default null
130 ,p_value_4 in varchar default null
131 ,p_pk_5 in varchar default null
132 ,p_value_5 in varchar default null
133 )return varchar2;
134 -- ----------------------------------------------------------------------------
135 -- |---------------------------< get_Node_Value >--------------------------|
136 -- ----------------------------------------------------------------------------
137 -- {Start of comments}
138 --
139 --1. Description:
140 -- This function would fetch the value of the desired node from the txn_doc
141 -- that corresponds to the txn_id that is passed
142 --
143 --2. Pre-requisites
144 -- All 'IN' parameters to this procedure have been appropriately derived.
145 --
146 --3. Post Success:
147 -- The value returned would be non-null
148 --
149 --4. Post Failure:
150 -- The value returned would be null
151 --
152 --5. Access Status:
153 -- Internal Development use only.
154 --
155 -- {End of comments}
156 -- ----------------------------------------------------------------------------
157
158 FUNCTION get_Node_Value
159 (p_transaction_id in number
160 ,p_desired_node_value in varchar2
161 ,p_xpath in varchar2
162 ,p_EO_name in varchar default null
163 ,p_pk_1 in varchar default null
164 ,p_value_1 in varchar default null
165 ,p_pk_2 in varchar default null
166 ,p_value_2 in varchar default null
167 ,p_pk_3 in varchar default null
168 ,p_value_3 in varchar default null
169 ,p_pk_4 in varchar default null
170 ,p_value_4 in varchar default null
171 ,p_pk_5 in varchar default null
172 ,p_value_5 in varchar default null
173 )return varchar2;
174 -- ----------------------------------------------------------------------------
175 -- |---------------------------< get_Transaction_Id >--------------------------|
176 -- ----------------------------------------------------------------------------
177 -- {Start of comments}
178 --
179 -- 1.Description:
180 -- This function returns the transaction id , given the item type and item key
181 --
182 --2. Pre-requisites
183 -- All 'IN' parameters to this procedure have been appropriately derived.
184 --
185 --3. Post Success:
186 -- The value for txn_id that is returned would be non-null.
187 --
188 --4. Post Failure:
189 -- The value for txn_id that is returned would be null.
190 --
191 --5. Access Status:
192 -- Internal Development use only.
193 --
194 -- {End of comments}
195 -- ----------------------------------------------------------------------------
196
197 FUNCTION get_Transaction_Id
198 (p_item_type in varchar2
199 ,p_item_key in varchar2
200 )return number;
201
202 -- ----------------------------------------------------------------------------
203 -- |---------------------------< get_Primary_Keys >--------------------------|
204 -- ----------------------------------------------------------------------------
205 -- {Start of comments}
206 --
207 -- 1.Description:
208 -- This function would return the set of primary key values as a Array Of Records
209 -- pk_rec : pk_rec is of type Primary_Key_Rec, It is an array of records. Each record is a set of 5 primary key values
210 -- The number of records is populated in the out parameter p_row_Count
211 --
212 -- 2.Pre-requisites
213 -- All 'IN' parameters to this procedure have been appropriately derived.
214 --
215 --3. Post Success:
216 -- The array of records returned would be non-null &
217 -- p_row_Count the out parameter would hold the number of records in the primarykey record array
218 --
219 --4. Post Failure:
220 -- p_row_Count the out parameter would be null
221 --
222 -- 5.Access Status:
223 -- Internal Development use only.
224 --
225 -- {End of comments}
226 -- ----------------------------------------------------------------------------
227
228 FUNCTION get_Primary_Keys
229 (p_transaction_id in number
230 ,p_object_type in varchar2
231 ,p_object_name in varchar2
232 ,p_row_Count out nocopy number
233 )return Primary_Key_Rec;
234
235 end hr_xml_util;
236