DBA Data[Home] [Help]

PACKAGE: APPS.BIS_GNRL_SEARCH_ENGINE_PVT_OA

Source


1 PACKAGE bis_gnrl_search_engine_pvt_oa  AS
2 /* $Header: BISSRCQS.pls 120.0 2005/05/31 18:28:52 appldev noship $ */
3 
4 -- Exceptions
5 -- ********************************
6 e_noIndexDefined   EXCEPTION;
7 
8 -- Record and Table type declarations
9 -- ************************************************************
10 TYPE results_tbl_rec   IS RECORD(folder_id           pls_integer
11                                 ,folder_name         varchar2(400)
12                                 ,folder_description  varchar2(32000)
13                                 ,folder_eul	     varchar2(15));
14 TYPE results_tbl_typ  IS TABLE of results_tbl_rec INDEX BY BINARY_INTEGER;
15 TYPE keywords_tbl_typ IS TABLE of varchar2(2000) INDEX BY BINARY_INTEGER;
16 
17 TYPE eul_results_rec IS RECORD(
18   eul_schema		varchar2(30));
19 
20 TYPE eul_results IS TABLE of eul_results_rec
21   INDEX BY BINARY_INTEGER;
22 
23 -- Constants declaration
24 -- ************************************************************
25 c_stem_optr    CONSTANT varchar2(1) :=  '$';
26 c_accum_optr   CONSTANT varchar2(1) :=  ',';
27 C_ROW_COUNT  CONSTANT PLS_INTEGER := 40;  -- To be used in case I need to show only so many at a time
28 C_MAX_HITS   CONSTANT PLS_INTEGER := 200; -- To be used in case I need to stop searching after this
29 
30 -- Procedure declarations
31 -- *************************************************************
32 -- Procedure : BUILD_QUERY  = Procedure creates and runs the
33 --      Intermedia query to search the pre-indexed table.
34 --      The script BISPBVI.sql should be run first to create the
35 --      InterMedia Domain Index. It needs to be run in the Discoverer
36 --      eul schema that contains the Business Views in the specified language.
37 -- Parameters 1. p_api_version    =  version of this api
38 --            2. p_eul            =  Name of the schema in which the
39 --                                Intermedia domain index was created
40 --            3. p_keywords_tbl    = plsql table containing the search words
41 --            4. x_results_tbl    = plsql table containing the query results
42 --            5. x_return_status  = return status
43 --            6. x_error_tbl      = error table for debugging
44 -- *************************************************************
45 PROCEDURE  build_query
46 ( p_api_version      in   pls_integer
47  ,p_eul              in   varchar2
48  ,p_keywords_tbl     in   BIS_GNRL_SEARCH_ENGINE_PVT_OA.keywords_tbl_typ
49  ,x_results_tbl      out  NOCOPY BIS_GNRL_SEARCH_ENGINE_PVT_OA.results_tbl_typ
50  ,x_return_status    out  NOCOPY varchar2
51  ,x_error_tbl        out  NOCOPY BIS_UTILITIES_PUB.Error_Tbl_Type
52 );
53 
54 -- ****************************************************
55 --  Function: get_a_index_owner
56 --      Given an intermedia index name returns a possible
57 --      index owner, in order to get the Schema name
58 -- ****************************************************
59 Function get_a_index_owner( p_index    in   varchar2 )
60    RETURN    eul_results;
61 
62 
63 -- *****************************************************
64 -- Function : concat_string
65 --     Given a string, this concatenates the appropriate
66 --     number of single quotes on either sides, so that
67 --     it could be inserted into a quoted sql query string.
68 -- ****************************************************
69 Function concat_string (p_str  in varchar2)
70    RETURN VARCHAR2;
71 
72 -- **********************************************************
73 -- Function that returns the Oracle Discoverer EUL TABLE VERSIONS
74 -- 4 incase of discover 4i and 5 incase of discover 10G
75 -- **********************************************************
76 
77 FUNCTION get_eul_table_version RETURN VARCHAR2;
78 
79 -- *****************************************************
80 END bis_gnrl_search_engine_pvt_oa;