DBA Data[Home] [Help]

PACKAGE: APPS.HR_PUMP_UTILS

Source


1 package hr_pump_utils AUTHID CURRENT_USER as
2 /* $Header: hrdputil.pkh 120.1 2006/01/11 08:24:19 arashid noship $ */
3 /*
4   Notes:
5     These declarations are for various user utility functions related
6     to the Data Pump engine.
7 */
8 
9 ----------------------------- create_batch_header -----------------------------
10 /*
11   NAME
12     create_batch_header
13   DESCRIPTION
14     Create a row in batch headers table.
15   NOTES
16     This is the public interface to be used to create
17     a batch header row.  The user should not insert
18     directly into the table.
19   PARAMETERS
20     p_batch_name          : this batch name must be unique.
21     p_business_group_name : the business group can be null.
22     p_reference           : (non unique) user reference.
23     p_atomic_linked_calls : 'Y' means that, for a set of linked API calls
24                             within this batch Data Pump only COMMITs the
25                             results if all API calls in the set were
26                             successful.  If an API call within a linked set
27                             fails then Data Pump will ROLLBACK the whole set
28                             of linked API calls.
29                             For values other than 'Y', Data Pump will COMMIT
30                             all successful API calls.
31   RETURNS
32     The batch_id for this batch header.  This is needed for making
33     insert_batch_lines procedure calls.
34 */
35 
36 function create_batch_header
37 (
38    p_batch_name          in varchar2,
39    p_business_group_name in varchar2  default null,
40    p_reference           in varchar2  default null,
41    p_atomic_linked_calls in varchar2  default 'N'
42 ) return number;
43 
44 -------------------------------- add_user_key ---------------------------------
45 /*
46   NAME
47     add_user_key
48   DESCRIPTION
49     Create a user key value in the user keys table.
50   NOTES
51     This is the public interface to be used to create a
52     user key for use with the data pump API calls. The user
53     should not insert directly into the table.
54   PARAMETERS
55     p_user_key_value : unique character string identifying the user key.
56                        p_user_key must be non-null.
57     p_unique_key_id  : id associated with the user key. p_unique_key must be
58                        non-null.
59 
60 */
61 procedure add_user_key
62 (
63    p_user_key_value in varchar2,
64    p_unique_key_id  in number
65 );
66 
67 ------------------------------ modify_user_key --------------------------------
68 /*
69   NAME
70      modify_user_key
71   DESCRIPTION
72     Modify a user key value in the user keys table.
73   NOTES
74     This is the public interface to be used to modify a
75     user key for use with the data pump API calls. The user
76     should not insert directly into the table.
77   PARAMETERS
78     p_user_key_value     : unique character string identifying the user key to
79                            be changed. p_user_key must be non-null.
80     p_new_user_key_value : modified user key value (no change if null).
81     p_unique_key_id      : modified id associated with the user key (no change
82                            if null).
83 */
84 procedure modify_user_key
85 (
86    p_user_key_value     in varchar2,
87    p_new_user_key_value in varchar2,
88    p_unique_key_id      in number
89 );
90 
91 ---------------------------------- name --------------------------------------
92 /*
93   NAME
94      name
95   DESCRIPTION
96      Returns the names for the view and package that would be created by a
97      generate call for an API.
98   PARAMETERS
99     p_module_package     : name of the PL/SQL package for the API.
100     p_module_name        : name of the API procedure within p_module_package.
101     p_package_name       : name of the generated package.
102     p_view_name          : name of the generated view.
103 */
104 procedure name
105 ( p_module_package in  varchar2,
106   p_module_name    in  varchar2,
107   p_package_name   out nocopy varchar2,
108   p_view_name      out nocopy varchar2
109 );
110 pragma restrict_references( name, WNDS );
111 
112 -------------------------------- SEED_ZAP -------------------------------------
113 /*
114   NAME
115     SEED_ZAP
116   DESCRIPTION
117     Deletes seed data rows for the API specified by P_MODULE_NAME and
118     API_MODULE_TYPE. Does not delete rows from HR_API_MODULES.
119 */
120 PROCEDURE SEED_ZAP
121 (P_MODULE_NAME     IN     VARCHAR2
122 ,P_API_MODULE_TYPE IN     VARCHAR2
123 );
124 
125 -------------------------------- SEED_API -------------------------------------
126 /*
127   NAME
128     SEED_API
129   DESCRIPTION
130     Creates a row for the API specified by P_MODULE_NAME and API_MODULE_TYPE
131     in HR_API_MODULES.
132 */
133 PROCEDURE SEED_API
134 (P_MODULE_NAME                IN     VARCHAR2
135 ,P_API_MODULE_TYPE            IN     VARCHAR2
136 ,P_MODULE_PACKAGE             IN     VARCHAR2
137 ,P_DATA_WITHIN_BUSINESS_GROUP IN     VARCHAR2 DEFAULT 'Y'
138 ,P_LEGISLATION_CODE           IN     VARCHAR2 DEFAULT NULL
139 );
140 
141 --------------------------- SEED_DFLT_EXC -------------------------------------
142 /*
143   NAME
144     SEED_DFLT_EXC
145   DESCRIPTION
146     Creates a row for the API specified by P_MODULE_NAME and API_MODULE_TYPE
147     in HR_PUMP_DEFAULT_EXCEPTIONS.
148 */
149 PROCEDURE SEED_DFLT_EXC
150 (P_MODULE_NAME     IN     VARCHAR2
151 ,P_API_MODULE_TYPE IN     VARCHAR2
152 );
153 
154 ------------------------------- SEED_PARM -------------------------------------
155 /*
156   NAME
157     SEED_PARM
158   DESCRIPTION
159     Creates a row for parameter P_PARAMETER_NAME of the API specified by
160     P_MODULE_NAME and API_MODULE_TYPE in HR_PUMP_MODULE_PARAMETERS.
161 */
162 PROCEDURE SEED_PARM
163 (P_MODULE_NAME        IN     VARCHAR2
164 ,P_API_MODULE_TYPE    IN     VARCHAR2
165 ,P_PARAMETER_NAME     IN     VARCHAR2
166 ,P_MAPPING_TYPE       IN     VARCHAR2 DEFAULT 'FUNCTION'
167 ,P_MAPPING_DEFINITION IN     VARCHAR2 DEFAULT NULL
168 ,P_DEFAULT_VALUE      IN     VARCHAR2 DEFAULT NULL
169 );
170 
171 ------------------------------- SEED_MAP_PKGS ---------------------------------
172 /*
173   NAME
174     SEED_MAP_PKGS
175   DESCRIPTION
176     Creates a row for the mapping function package specified by
177     P_MAPPING_PACKAGE in HR_PUMP_MAPPING_PACKAGES.
178 */
179 PROCEDURE SEED_MAP_PKGS
180 (P_MAPPING_PACKAGE    IN     VARCHAR2
181 ,P_MODULE_NAME        IN     VARCHAR2 DEFAULT NULL
182 ,P_API_MODULE_TYPE    IN     VARCHAR2 DEFAULT NULL
183 ,P_MODULE_PACKAGE     IN     VARCHAR2 DEFAULT NULL
184 ,P_CHECKING_ORDER     IN     NUMBER
185 );
186 
187 ------------------------- set_current_session_running ------------------------
188 /*
189   NAME
190     set_current_session_running
191 
192   DESCRIPTION
193     Set an indicator to specify whether or not this session is running Data
194     Pump.
195 
196   NOTES
197     Part of the Date-Track locking solution. This procedure may only be
198     called by Data Pump.
199 */
200 procedure set_current_session_running(p_running in boolean);
201 
202 ----------------------- set_dt_enforce_foreign_locks ------------------------
203 /*
204   NAME
205     set_dt_enforce_foreign_locks
206 
207   DESCRIPTION
208     Set an indicator to specify that this session is running Data Pump.
209 
210   NOTES
211     Part of the Date-Track locking solution. This procedure may only be
212     called by Data Pump.
213 */
214 procedure set_dt_enforce_foreign_locks(p_enforce in boolean);
215 
216 ------------------------------- any_session_running --------------------------
217 /*
218   NAME
219     any_session_running
220 
221   DESCRIPTION
222     Returns a boolean value that indicates whether or not a Data Pump session
223     is running without foreign key locking.
224 
225   NOTES
226     Part of the Date-Track locking solution.
227 */
228 function any_session_running return boolean;
229 
230 --------------------------- current_session_running --------------------------
231 /*
232   NAME
233     current_session_running
234 
235   DESCRIPTION
236     Returns a boolean value that indicates whether or not a this database
237     session is currently running Data Pump.
238 
239   NOTES
240     Part of the Date-Track locking solution.
241 */
242 function current_session_running return boolean;
243 
244 ------------------------- dt_enforce_foreign_locks ---------------------------
245 /*
246   NAME
247     dt_enforce_foreign_locks
248 
249   DESCRIPTION
250     Provides a boolean version of the PAY_ACTION_PARAMETERS table
251     PUMP_DT_ENFORCE_FOREIGN_LOCKS parameter value.
252 
253   NOTES
254     Part of the Date-Track locking solution.
255 */
256 function dt_enforce_foreign_locks return boolean;
257 
258 ------------------------- set_multi_msg_error_flag ---------------------------
259 /*
260   NAME
261     set_multi_msg_error_flag
262 
263   DESCRIPTION
264     Sets the value of the multi-message indicator flag.
265 
266   NOTES
267     Not intended for use outside of data pump.
268 */
269 procedure set_multi_msg_error_flag(p_value in boolean);
270 
271 --------------------------- multi_msg_errors_exist ----------------------------
272 /*
273   NAME
274     multi_msg_errors_exist
275 
276   DESCRIPTION
277     Gets the value of the multi-message indicator flag.
278 
279   NOTES
280     Not intended for use outside of data pump.
281 */
282 function multi_msg_errors_exist return boolean;
283 
284 ------------------------- populate_spread_loaders_tab ------------------------
285 /*
286   NAME
287     populate_spread_loaders_tab
288 
289   DESCRIPTION
290     Populate hr_pump_spread_loader table with spreadsheet interface enabled
291     data pump entities.
292 
293   NOTES
294     This procedure will be called from Data Pump script for User Tables.
295 */
296 procedure populate_spread_loaders_tab
297 (
298  p_module_name               in varchar2
299 ,p_integrator_code           in varchar2
300 ,p_entity_name               in varchar2 default null
301 ,p_module_mode               in varchar2
302 ,p_entity_sql_column_name    in varchar2 default null
303 ,p_entity_sql_column_id      in varchar2 default null
304 ,p_entity_sql_addl_column    in varchar2 default null
305 ,p_entity_sql_object_name    in varchar2 default null
306 ,p_entity_sql_where_clause   in varchar2 default null
307 ,p_entity_sql_parameters     in varchar2 default null
308 ,p_entity_sql_order_by       in varchar2 default null
309 ,p_integrator_parameters     in varchar2
310 );
311 
312 
313 
314 end hr_pump_utils;