ccc.api.types
Class SearchResult

java.lang.Object
  extended by ccc.api.types.SearchResult

public class SearchResult
extends java.lang.Object

Value object for search results.

Author:
Civic Computing Ltd.

Constructor Summary
SearchResult(java.util.Set<java.util.UUID> hits, int totalResults, int noOfResultsPerPage, java.lang.String terms, int pageNo)
          Constructor.
 
Method Summary
 int getPageNo()
          Accessor.
 java.lang.String getTerms()
          Accessor.
 java.util.Set<java.util.UUID> hits()
          Accessor.
 void hits(java.util.Set<java.util.UUID> hits)
          Mutator.
 int noOfResultsPerPage()
          Accessor.
 void noOfResultsPerPage(int noOfResultsPerPage)
          Mutator.
 int totalResults()
          Accessor.
 void totalResults(int totalResults)
          Mutator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchResult

public SearchResult(java.util.Set<java.util.UUID> hits,
                    int totalResults,
                    int noOfResultsPerPage,
                    java.lang.String terms,
                    int pageNo)
Constructor.

Parameters:
hits - The search hits.
totalResults - The total number of results for this search.
noOfResultsPerPage - The number of results displayed on each page
terms - The search terms used.
pageNo - The current page of results returned.
Method Detail

totalResults

public int totalResults()
Accessor.

Returns:
Number of total results.

totalResults

public void totalResults(int totalResults)
Mutator.

Parameters:
totalResults - The total results.

hits

public java.util.Set<java.util.UUID> hits()
Accessor.

Returns:
Set of UUID of currently shown search results.

hits

public void hits(java.util.Set<java.util.UUID> hits)
Mutator.

Parameters:
hits - Set of UUID.

getTerms

public final java.lang.String getTerms()
Accessor.

Returns:
Returns the terms.

getPageNo

public final int getPageNo()
Accessor.

Returns:
Returns the pageNo.

noOfResultsPerPage

public void noOfResultsPerPage(int noOfResultsPerPage)
Mutator.

Parameters:
noOfResultsPerPage - Number of results per page.

noOfResultsPerPage

public int noOfResultsPerPage()
Accessor.

Returns:
noOfResultsPerPage


Copyright © 2010. All Rights Reserved.