01: /*
02: * Copyright 2006 Pentaho Corporation. All rights reserved.
03: * This software was developed by Pentaho Corporation and is provided under the terms
04: * of the Mozilla Public License, Version 1.1, or any later version. You may not use
05: * this file except in compliance with the license. If you need a copy of the license,
06: * please go to http://www.mozilla.org/MPL/MPL-1.1.txt. The Original Code is the Pentaho
07: * BI Platform. The Initial Developer is Pentaho Corporation.
08: *
09: * Software distributed under the Mozilla Public License is distributed on an "AS IS"
10: * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. Please refer to
11: * the license for the specific language governing your rights and limitations.
12: *
13: * @created Jul 7, 2005
14: * @author Marc Batchelor
15: *
16: */
17: package org.pentaho.repository;
18:
19: public interface ISearchable {
20: /**
21: * SEARCH_TYPE_PHRASE Searches for the exact phrase
22: */
23: public static final int SEARCH_TYPE_PHRASE = 0;
24:
25: /**
26: * SEARCH_TYPE_WORDS_OR Searches for each word with each column using an OR
27: * connector
28: */
29: public static final int SEARCH_TYPE_WORDS_OR = 1;
30:
31: /**
32: * SEARCH_TYPE_WORDS_AND Searches for each word with each column using an
33: * AND connector
34: */
35: public static final int SEARCH_TYPE_WORDS_AND = 2;
36:
37: /**
38: * @return Returns an array of the char/varchar columns that can be
39: * searched.
40: */
41: public String[] getSearchableColumns();
42:
43: /**
44: * @return Returns the name of the hibernated object which will be used in
45: * the search.
46: */
47: public String getSearchableTable();
48:
49: /**
50: * @return Returns the fully-package-qualified name of a named query in the
51: * Hibernate Schema that supports a full-text search of all
52: * searchable columns. The parameter name for the search term in the
53: * query must be :searchTerm or the query will fail.
54: */
55: public String getPhraseSearchQueryName();
56: }
|