Package org.waveprotocol.box.search.SearchProto.SearchResponse

Examples of org.waveprotocol.box.search.SearchProto.SearchResponse.Builder


   *
   * @param searchResult the search results with digests.
   * @return SearchResponse
   */
  public static SearchResponse serializeSearchResult(SearchResult searchResult, int total) {
    Builder searchBuilder = SearchResponse.newBuilder();
    searchBuilder.setQuery(searchResult.getQuery()).setTotalResults(total);
    for (SearchResult.Digest searchResultDigest : searchResult.getDigests()) {
      SearchResponse.Digest digest = serializeDigest(searchResultDigest);
      searchBuilder.addDigests(digest);
    }
    SearchResponse searchResponse = searchBuilder.build();
    return searchResponse;
  }
View Full Code Here


   *
   * @param searchResult the search results with digests.
   * @return SearchResponse
   */
  public static SearchResponse serializeSearchResult(SearchResult searchResult, int total) {
    Builder searchBuilder = SearchResponse.newBuilder();
    searchBuilder.setQuery(searchResult.getQuery()).setTotalResults(total);
    for (SearchResult.Digest searchResultDigest : searchResult.getDigests()) {
      SearchResponse.Digest digest = serializeDigest(searchResultDigest);
      searchBuilder.addDigests(digest);
    }
    SearchResponse searchResponse = searchBuilder.build();
    return searchResponse;
  }
View Full Code Here

TOP

Related Classes of org.waveprotocol.box.search.SearchProto.SearchResponse.Builder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.