1 package ben_batch_dt_api AUTHID CURRENT_USER as
2 /* $Header: bendtapi.pkh 115.5 2003/09/18 16:00:18 mhoyes noship $ */
3 --------------------------------------------------------------------------------
4 /*
5 +==============================================================================+
6 | Copyright (c) 1997 Oracle Corporation |
7 | Redwood Shores, California, USA |
8 | All rights reserved. |
9 +==============================================================================+
10
11 Name
12 Comp Object Caching Routine
13 Purpose
14 This package is used to return comp object information.
15 History
16 Date Who Version What?
17 ---- --- ------- -----
18 15 May 99 mhoyes 115.0 Created
19 29 Dec 00 Tmathers 115.1 fixed check_sql errors.
20 22 May 01 mhoyes 115.2 Added batch_validate_bgp_id.
21 18 Sep 03 mhoyes 115.4 3150329 - Update eligibility
22 APIs.
23 */
24 --------------------------------------------------------------------------------
25 --
26 -- Cache all comp object stuff
27 --
28 type gtyp_dtsum_row is record
29 (id number
30 ,min_esd date
31 ,max_eed date
32 );
33 --
34 type gtyp_dtsum_tab is table of gtyp_dtsum_row index by binary_integer;
35 --
36 -- On demand caches
37 --
38 g_person_dtsum_odcache gtyp_dtsum_tab;
39 g_ler_dtsum_odcache gtyp_dtsum_tab;
40 g_pgm_dtsum_odcache gtyp_dtsum_tab;
41 g_ptip_dtsum_odcache gtyp_dtsum_tab;
42 g_plip_dtsum_odcache gtyp_dtsum_tab;
43 g_pl_dtsum_odcache gtyp_dtsum_tab;
44 g_elig_per_dtsum_odcache gtyp_dtsum_tab;
45 --
46 -- Caches current rows
47 --
48 g_lastperson_dtsum_row gtyp_dtsum_row;
49 g_lastler_dtsum_row gtyp_dtsum_row;
50 g_lastpgm_dtsum_row gtyp_dtsum_row;
51 g_lastptip_dtsum_row gtyp_dtsum_row;
52 g_lastplip_dtsum_row gtyp_dtsum_row;
53 g_lastpl_dtsum_row gtyp_dtsum_row;
54 g_lastelig_per_dtsum_row gtyp_dtsum_row;
55 --
56 -- Get start and end dates
57 --
58 procedure Get_DtIns_Start_and_End_Dates
59 (p_effective_date in date
60 ,p_parcolumn_name in varchar2
61 ,p_min_esd in date
62 ,p_max_eed in date
63 --
64 ,p_esd in out nocopy date
65 ,p_eed in out nocopy date
66 );
67 --
68 -- Get object routines
69 --
70 procedure get_personobject
71 (p_person_id in number
72 ,p_rec in out NOCOPY gtyp_dtsum_row
73 );
74 --
75 procedure get_lerobject
76 (p_ler_id in number
77 ,p_rec in out NOCOPY gtyp_dtsum_row
78 );
79 --
80 procedure get_pgmobject
81 (p_pgm_id in number
82 ,p_rec in out NOCOPY gtyp_dtsum_row
83 );
84 --
85 procedure get_ptipobject
86 (p_ptip_id in number
87 ,p_rec in out NOCOPY gtyp_dtsum_row
88 );
89 --
90 procedure get_plipobject
91 (p_plip_id in number
92 ,p_rec in out NOCOPY gtyp_dtsum_row
93 );
94 --
95 procedure get_plobject
96 (p_pl_id in number
97 ,p_rec in out NOCOPY gtyp_dtsum_row
98 );
99 --
100 procedure get_elig_perobject
101 (p_elig_per_id in number
102 ,p_rec in out NOCOPY gtyp_dtsum_row
103 );
104 --
105 procedure clear_down_cache;
106 --
107 procedure batch_validate_bgp_id
108 (p_business_group_id in number
109 );
110 --
111 procedure validate_dt_mode_insert
112 (p_effective_date in date
113 ,p_person_id in number default null
114 ,p_ler_id in number default null
115 ,p_pgm_id in number default null
116 ,p_ptip_id in number default null
117 ,p_plip_id in number default null
118 ,p_pl_id in number default null
119 --
120 ,p_effective_start_date in out nocopy date
121 ,p_effective_end_date in out nocopy date
122 );
123 --
124 PROCEDURE return_effective_dates
125 (p_base_table_name IN varchar2
126 ,p_effective_date IN DATE
127 ,p_base_key_value IN NUMBER
128 --
129 ,p_effective_start_date in out nocopy date
130 ,p_effective_end_date in out nocopy date
131 );
132 --
133 -- ----------------------------------------------------------------------------
134 -- |------------------------< Return_Max_End_Date >---------------------------|
135 -- ----------------------------------------------------------------------------
136 --
137 FUNCTION return_max_end_date
138 (p_base_table_name IN varchar2
139 ,p_base_key_value IN NUMBER
140 )
141 RETURN DATE;
142 --
143 -- ----------------------------------------------------------------------------
144 -- |-------------------------< Future_Rows_Exists >---------------------------|
145 -- ----------------------------------------------------------------------------
146 --
147 Function Future_Rows_Exist
148 (p_base_table_name IN varchar2
149 ,p_effective_date in date
150 ,p_base_key_value in number
151 )
152 return Boolean;
153 --
154 -- ----------------------------------------------------------------------------
155 -- |-------------------------< validate_dt_mode_pep >-------------------------|
156 -- ----------------------------------------------------------------------------
157 --
158 procedure validate_dt_mode_pep
159 (p_effective_date in date
160 ,p_datetrack_mode in varchar2
161 ,p_elig_per_id in number
162 --
163 ,p_validation_start_date in out nocopy date
164 ,p_validation_end_date in out nocopy date
165 );
166 --
167 -- ----------------------------------------------------------------------------
168 -- |-------------------------< validate_dt_mode_epo >-------------------------|
169 -- ----------------------------------------------------------------------------
170 --
171 procedure validate_dt_mode_epo
172 (p_effective_date in date
173 ,p_datetrack_mode in varchar2
174 ,p_elig_per_opt_id in number
175 --
176 ,p_validation_start_date in out nocopy date
177 ,p_validation_end_date in out nocopy date
178 );
179 --
180 end ben_batch_dt_api;