org.eclipse.datatools.sqltools.result.internal.index
Class ResultHistoryLuceneIndex

java.lang.Object
  extended by org.eclipse.datatools.sqltools.result.internal.index.ResultHistoryLuceneIndex
All Implemented Interfaces:
IResultHistoryIndex

public class ResultHistoryLuceneIndex
extends java.lang.Object
implements IResultHistoryIndex

Lucene based index

Author:
Dafan Yang

Constructor Summary
ResultHistoryLuceneIndex()
           
 
Method Summary
 void addResult(IResultInstance instance)
          Adds a new instance for indexing
 void addResults(IResultInstance[] instances)
          Adds a list of result instances for indexing
 void refreshResult(IResultInstance instance)
          Refreshes the given result instance
 void removeResult(IResultInstance instance)
          Removes the specified result instance
 void removeResults(IResultInstance[] instances)
          Removes a list of result instances
 IResultInstance[] search(java.lang.String expression)
          Searches the index by the given expression and returns the searching results
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultHistoryLuceneIndex

public ResultHistoryLuceneIndex()
Method Detail

addResult

public void addResult(IResultInstance instance)
Description copied from interface: IResultHistoryIndex
Adds a new instance for indexing

Specified by:
addResult in interface IResultHistoryIndex
Parameters:
instance - a result instance

addResults

public void addResults(IResultInstance[] instances)
Description copied from interface: IResultHistoryIndex
Adds a list of result instances for indexing

Specified by:
addResults in interface IResultHistoryIndex
Parameters:
instances - a list of result instances

removeResult

public void removeResult(IResultInstance instance)
Description copied from interface: IResultHistoryIndex
Removes the specified result instance

Specified by:
removeResult in interface IResultHistoryIndex
Parameters:
instance - a result instance

removeResults

public void removeResults(IResultInstance[] instances)
Description copied from interface: IResultHistoryIndex
Removes a list of result instances

Specified by:
removeResults in interface IResultHistoryIndex
Parameters:
instances - a list of result instances

search

public IResultInstance[] search(java.lang.String expression)
Description copied from interface: IResultHistoryIndex
Searches the index by the given expression and returns the searching results

Specified by:
search in interface IResultHistoryIndex
Parameters:
expression - the search expression
Returns:
the searching results

refreshResult

public void refreshResult(IResultInstance instance)
Description copied from interface: IResultHistoryIndex
Refreshes the given result instance

Specified by:
refreshResult in interface IResultHistoryIndex
Parameters:
instance - a result instance