2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.openecomp.sdc.be.dao.model;
23 import java.util.HashMap;
27 * Contains results for a search query.
31 @SuppressWarnings("PMD.UnusedPrivateField")
32 public class FacetedSearchResult extends GetMultipleDataResult {
33 private static final long serialVersionUID = 1L;
35 private Map<String, FacetedSearchFacet[]> facets;
38 * Argument constructor.
41 * The start index of the returned elements.
43 * The end index of the returned elements.
44 * @param queryDuration
45 * The duration of the query.
47 * The total results for this query.
49 * The types of data found.
53 * The facets if any for the query.
55 public FacetedSearchResult(final int from, final int to, final long queryDuration, final long totalResults,
56 final String[] types, final Object[] data, final HashMap<String, FacetedSearchFacet[]> hashMap) {
57 super(types, data, queryDuration, totalResults, from, to);
58 this.facets = hashMap;
61 public Map<String, FacetedSearchFacet[]> getFacets() {
65 public void setFacets(Map<String, FacetedSearchFacet[]> facets) {
69 public FacetedSearchResult() {