com.atlassian.sal.api.search
Class SearchResults

java.lang.Object
  extended by com.atlassian.sal.api.search.SearchResults

public class SearchResults
extends java.lang.Object

Provides searchresults for a query. If there were any errors, check the list of errors. The searchresult will also contain the total searchtime (in milliseconds).

Since:
2.0

Constructor Summary
SearchResults(java.util.List<Message> errors)
          Constructs search results that contained errors
SearchResults(java.util.List<SearchMatch> matches, int totalResults, long searchTime)
          Constructs search results with successful matches
 
Method Summary
 java.util.List<Message> getErrors()
           
 java.util.List<SearchMatch> getMatches()
           
 long getSearchTime()
           
 int getTotalResults()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchResults

public SearchResults(java.util.List<Message> errors)
Constructs search results that contained errors

Parameters:
errors - The error list

SearchResults

public SearchResults(java.util.List<SearchMatch> matches,
                     int totalResults,
                     long searchTime)
Constructs search results with successful matches

Parameters:
matches - The list of matches
totalResults - The total number of available results
searchTime - The time the search took in milliseconds
Method Detail

getErrors

public java.util.List<Message> getErrors()
Returns:
search errors

getMatches

public java.util.List<SearchMatch> getMatches()
Returns:
the matches

getSearchTime

public long getSearchTime()
Returns:
the time the search took in milliseconds

getTotalResults

public int getTotalResults()
Returns:
the total results available


Copyright © 2009 Atlassian. All Rights Reserved.