1 PACKAGE hr_template_existence AUTHID CURRENT_USER AS
2 /* $Header: pytmplex.pkh 115.0 99/07/17 06:38:10 porting ship $ */
3 /*
4 *******************************************************************
5 * Copyright (C) 1993 Oracle Corporation. *
6 * All rights reserved. *
7 * *
8 * This material has been provided pursuant to an agreement *
9 * containing restrictions on its use. The material is also *
10 * protected by copyright law. No part of this material may *
11 * be copied or distributed, transmitted or transcribed, in *
12 * any form or by any means, electronic, mechanical, magnetic, *
13 * manual, or otherwise, or disclosed to third parties without *
14 * the express written permission of Oracle Corporation, *
15 * 500 Oracle Parkway, Redwood City, CA, 94065. *
16 * *
17 ******************************************************************
18 Name : hr_template_existence
19 Filename : pytmplex.pkh
20
21 Change List
22 Date Name Vers Bug No Description
23 ---- ---- ---- ------ -----------
24 23-MAY-1996 H.Parichabutr 40.0 Created.
25 22-JUL-1996 Hparicha 40.1 373543. Removed comment from exit...
26 25-JUL-1996 hparicha 40.2 Revised spr_exists, now returns
27 existing spr id AND the formula
28 id that it uses...p_ff_id param
29 is now an output.
30 06-AUG-1996 hparicha 40.3 Added functions to check for existence of
31 link input values, element entry values, and
32 run result values for use when upgrading
33 existing earnings and deductions.
34 3rd Oct 1996 hparicha 40.4 398791. Added parameters for
35 effective date to be used in
36 all existence comparisons.
37 */
38
39 /*
40 This package contains functions that check for the existence of the following payroll objects:
41 (*) Element Type
42 (*) Input Value
43 (*) Balances
44 (*) Defined Balances
45 (*) Balance Feeds
46 (*) Status Processing Rules
47 (*) Formula Result Rules
48
49 This package is called from the involuntary, earnings, and deduction generator packages before creating any record...this makes template elements re-generatable and upgradeable !!!
50
51 These functions should check for existence by doing select count(*). If none are found, then return zero.
52 Calling function will perform insertion if value returned is zero. If the object does exist, then this function
53 will perform a select for the id of the record found; this id is returned as the value from the function. The calling function then knows any non-zero value returned from the function is the id of the existing record.
54
55 */
56
57 function bal_feed_exists ( p_bal_id in number,
58 p_iv_id in number,
59 p_bg_id in number,
60 p_eff_date in date default sysdate) return number;
61
62 function result_rule_exists ( p_spr_id in number,
63 p_frr_name in varchar2,
64 p_iv_id in number,
65 p_ele_id in number,
66 p_bg_id in number,
67 p_eff_date in date default sysdate) return number;
68
69 function spr_exists ( p_ele_id in number,
70 p_ff_id out number,
71 p_val_date in date,
72 p_bg_id in number,
73 p_eff_date in date default sysdate) return number;
74
75 function ele_ff_exists ( p_ele_name in varchar2,
76 p_bg_id in number,
77 p_ff_name out varchar2,
78 p_ff_text out varchar2,
79 p_eff_date in date default sysdate) return number;
80
81 function defined_bal_exists ( p_bal_id in number,
82 p_dim_id in number,
83 p_bg_id in number,
84 p_eff_date in date default sysdate) return number;
85
86 function iv_name_exists ( p_ele_id in number,
87 p_iv_name in varchar2,
88 p_bg_id in number,
89 p_eff_date in date default sysdate) return number;
90
91 function ele_exists ( p_ele_name in varchar2,
92 p_bg_id in number,
93 p_eff_date in date default sysdate) return number;
94
95 function bal_exists ( p_bal_name in varchar2,
96 p_bg_id in number,
97 p_eff_date in date default sysdate) return number;
98
99 function upg_link_iv_exists (
100 p_element_link_id IN NUMBER,
101 p_input_val_id IN NUMBER,
102 p_eff_date in date default sysdate) RETURN NUMBER;
103
104 function upg_entry_val_exists (
105 p_element_entry_id IN NUMBER,
106 p_input_val_id IN NUMBER,
107 p_eff_date in date default sysdate) RETURN NUMBER;
108
109 function upg_result_val_exists (
110 p_run_result_id IN NUMBER,
111 p_input_val_id IN NUMBER,
112 p_eff_date in date default sysdate) RETURN NUMBER;
113
114 END hr_template_existence;