Class SearchQuery

java.lang.Object
org.netxms.client.search.SearchQuery

public class SearchQuery extends Object
Search query. Query can be constructed using the following elements:

word given word should be present in object's text

not word given word should not be present in object's text

"quoted text" words in quotes should be present in object's text

not "quoted text" words in quotes should not be present in object's text

attribute:value1,value2 object should have given attribute, and attribute value should be one of those listed

-attribute:value1,value2 object should not have given attribute, or attribute value should not be one of those listed

  • Constructor Details

    • SearchQuery

      public SearchQuery(String source)
      Construct new search query from source string
      Parameters:
      source - query source
  • Method Details

    • match

      public boolean match(Object object)
      Match given object against this query. If object implements SearchAttributeProvider interface then text for matching will be retrieved from getText method, and attribute matching will take place. Otherwise, text will be retrieved from toString method.
      Parameters:
      object - object to test
      Returns:
      true if this search query matches given object
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also: