com.visenze.visearch.PagedSearchResult Maven / Gradle / Ivy
package com.visenze.visearch;
import com.visenze.visearch.internal.constant.ViSearchHttpConstants;
import java.util.List;
import java.util.Map;
public class PagedSearchResult extends PagedResult {
private List productTypes;
private List productTypesList;
private String imId;
private List facets;
private Map queryInfo;
private String rawJson;
private List objects;
private List objectTypesList;
private List groupSearchResults;
public PagedSearchResult(List result) {
this.result = result;
}
public PagedSearchResult(String errorMessage, Throwable e, String rawResponse) {
super.setErrorMessage(errorMessage);
super.setCause(e);
super.setRawResponseMessage(rawResponse);
}
public void setProductTypes(List productTypes) {
this.productTypes = productTypes;
}
public List getProductTypes() {
return productTypes;
}
public void setProductTypesList(List productTypesList) {
this.productTypesList = productTypesList;
}
public List getProductTypesList() {
return productTypesList;
}
public void setImId(String imId) {
this.imId = imId;
}
public String getImId() {
return imId;
}
public void setFacets(List facets) {
this.facets = facets;
}
public List getFacets() {
return facets;
}
public void setQueryInfo(Map queryInfo) {
this.queryInfo = queryInfo;
}
public Map getQueryInfo() {
return queryInfo;
}
public void setRawJson(String rawJson) {
this.rawJson = rawJson;
}
public String getRawJson() {
return rawJson;
}
/**
* Get the request id to identify this request.
*/
public String getReqId(){
if(this.headers!=null && this.headers.containsKey(ViSearchHttpConstants.X_LOG_ID)){
return headers.get(ViSearchHttpConstants.X_LOG_ID);
}
return ViSearchHttpConstants.X_LOG_ID_EMPTY;
}
/**
* Get discoversearch(multiple product search) object result list.
* Available only in {@link ViSearch#discoverSearch(UploadSearchParams)}
* {@link ViSearch#discoverSearch(UploadSearchParams)}
* @return detected object and search result
*/
public List getObjects() {
return objects;
}
/**
* Set discoversearch(multiple product search) object result list.
* Available only in {@link ViSearch#discoverSearch(UploadSearchParams)}
* {@link ViSearch#discoverSearch(UploadSearchParams)}
* @param objects
*/
public void setObjects(List objects) {
this.objects = objects;
}
public List getObjectTypesList() {
return objectTypesList;
}
public void setObjectTypesList(List objectTypesList) {
this.objectTypesList = objectTypesList;
}
public List getGroupSearchResults() { return groupSearchResults; }
public void setGroupSearchResults(List groupSearchResults) { this.groupSearchResults = groupSearchResults; }
}