com.adobe.flexbuilder.codemodel.search
Class SearchFilter

java.lang.Object
  extended bycom.adobe.flexbuilder.codemodel.search.SearchFilter

public class SearchFilter
extends java.lang.Object

A SearchFiler is used to help determine what type of results should be returned back from searches made into the an ISearchIndex A SearchFilter can specific what to return: references, declarations, textual matches of any combination of the three, as well as determine the number of occurrences to return in a given query

Author:
dz

Field Summary
static SearchFilter ALL_OCCURRENCES
          Creates a SearchFilter that will return both references and declarations in the given query
static SearchFilter ALL_OCCURRENCES_AND_TEXT
          Creates a SearchFilter that will return references, declarations and texual matches in the given query
static SearchFilter DECLARATIONS_FILTER
          Creates a SearchFilter that will only return declarations in the given query
static SearchFilter REFERENCES_FILTER
          Creates a SearchFilter that will only return references in the given query
static SearchFilter TEXTUAL_MATCHES
          Creates a SearchFilter that will only return textual matches in the given query
 
Constructor Summary
SearchFilter(boolean references, boolean declarations, boolean textualMatches)
          Creates a new SearchFilter
 
Method Summary
 boolean getFindDeclarations()
           
 boolean getFindReferences()
           
 boolean getFindTextualMatches()
           
 int getOccurrencesLimit()
           
 boolean hasOccurrencesLimit()
           
 void setOccurrenceLimit(int limit)
          Sets the current limit of how many occurrences we should return for a specific search query
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REFERENCES_FILTER

public static final SearchFilter REFERENCES_FILTER
Creates a SearchFilter that will only return references in the given query


DECLARATIONS_FILTER

public static final SearchFilter DECLARATIONS_FILTER
Creates a SearchFilter that will only return declarations in the given query


TEXTUAL_MATCHES

public static final SearchFilter TEXTUAL_MATCHES
Creates a SearchFilter that will only return textual matches in the given query


ALL_OCCURRENCES

public static final SearchFilter ALL_OCCURRENCES
Creates a SearchFilter that will return both references and declarations in the given query


ALL_OCCURRENCES_AND_TEXT

public static final SearchFilter ALL_OCCURRENCES_AND_TEXT
Creates a SearchFilter that will return references, declarations and texual matches in the given query

Constructor Detail

SearchFilter

public SearchFilter(boolean references,
                    boolean declarations,
                    boolean textualMatches)
Creates a new SearchFilter

Parameters:
references - true if we want to find references
declarations - true if we want to find declarations
textualMatches - true if we want to find textual matches
Method Detail

getFindReferences

public boolean getFindReferences()
Returns:
true if this SearchFilter can find references

getFindDeclarations

public boolean getFindDeclarations()
Returns:
true if this SearchFilter can find declarations

getFindTextualMatches

public boolean getFindTextualMatches()
Returns:
true if this SearchFilter can find textual matches

setOccurrenceLimit

public void setOccurrenceLimit(int limit)
Sets the current limit of how many occurrences we should return for a specific search query

Parameters:
limit - the upper bound of results we should return

getOccurrencesLimit

public int getOccurrencesLimit()
Returns:
the limit of occurrences we find

hasOccurrencesLimit

public boolean hasOccurrencesLimit()
Returns:
true if this SearchFilter has a limit set