DBA Data[Home] [Help]

PACKAGE: APPS.BEN_HASH_UTILITY

Source


1 package ben_hash_utility AUTHID CURRENT_USER as
2 /* $Header: benhashu.pkh 120.1 2005/06/12 21:04:33 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 	Benefit Hash Utility.
13 Purpose
14 	This package is used to aid in the hashing of ids within benefits
15         tables. This is used as a support for caching data during batch
16         processes.
17 History
18         Date             Who        Version  What?
19         ----             ---        -------  -----
20         01-MAY-99        GPERRY     115.0    Created.
21         15-JUN-99        mhoyes     115.1    Added generic cache write
22                                              routines. Write_MastDet_Cache
23                                              and Write_BGP_Cache.
24         12-JUN-05        mhoyes     115.4    Removed Write_MastDet_Cache
25                                              and Write_BGP_Cache. Defined
26                                              package locals as globals.
27 */
28 
29 -----------------------------------------------------------------------
30 --
31 -- PLSQL record types
32 --
33 --   Column/cache details record type
34 --
35 Type InstColNmRecType      is record
36   (col_name    varchar2(100)
37   ,caccol_name varchar2(100)
38   ,col_alias   varchar2(100)
39   ,col_type    varchar2(100)
40   );
41 --
42 Type InstColNmType      is table of InstColNmRecType index by binary_integer;
43 --
44 --   Cursor details record type
45 --
46 Type CurParmRecType      is record
47   (cur_type  varchar2(100)
48   ,parm_type varchar2(100)
49   ,name      varchar2(100)
50   ,datatype  varchar2(100)
51   ,v2val     varchar2(2000)
52   ,dateval   date
53   ,numval    number
54   );
55 --
56 Type CurParmType      is table of CurParmRecType     index by binary_integer;
57 --
58 -- Globals
59 --
60 g_instcolnm_set             ben_hash_utility.InstColNmType;
61 g_curparm_set               ben_hash_utility.CurParmType;
62 -----------------------------------------------------------------------
63 -- Hash Variables
64 -----------------------------------------------------------------------
65 g_hash_key      binary_integer := 1299827; -- 100008th Prime number
66 g_hash_jump     binary_integer := 100;
67 -----------------------------------------------------------------------
68 function get_hashed_index(p_id in number) return number;
69 -----------------------------------------------------------------------
70 function get_next_hash_index(p_hash_index in number) return number;
71 -----------------------------------------------------------------------
72 function get_hash_jump return number;
73 -----------------------------------------------------------------------
74 function get_hash_key return number;
75 -----------------------------------------------------------------------
76 procedure set_hash_jump(p_hash_jump in number);
77 -----------------------------------------------------------------------
78 procedure set_hash_key(p_hash_key in number);
79 -----------------------------------------------------------------------
80 end ben_hash_utility;