
com.unbxd.client.search.response.SearchResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of unbxd-java-sdk Show documentation
Show all versions of unbxd-java-sdk Show documentation
The project is a Unbxd Java Library
package com.unbxd.client.search.response;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
/**
* Created with IntelliJ IDEA.
* User: sourabh
* Date: 08/07/14
* Time: 10:59 AM
* To change this template use File | Settings | File Templates.
*/
public class SearchResponse {
private int _statusCode;
private int _errorCode;
private String _message;
private int _queryTime;
private int _totalResultsCount;
private SearchResults _results;
private BucketResults _buckets;
private Facets _facets;
private Stats _stats;
private List _spellCorrections;
private Banners _banner;
public SearchResponse(Map params){
if(params.containsKey("error")){
Map error = (Map) params.get("error");
this._errorCode = (Integer) error.get("code");
this._message = (String) error.get("msg");
}else{
this._message = "OK";
Map metaData = (Map) params.get("searchMetaData");
this._statusCode = (Integer) metaData.get("status");
this._queryTime = (Integer) metaData.get("queryTime");
if(params.containsKey("response")){
Map response = (Map) params.get("response");
this._totalResultsCount = (Integer) response.get("numberOfProducts");
this._results = new SearchResults((List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy