mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-06-22 03:52:10 +00:00
Deleted unused class
This commit is contained in:
parent
dd12461257
commit
c7424cda1a
@ -1,52 +0,0 @@
|
||||
package org.springframework.data.elasticsearch.core;
|
||||
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.springframework.data.domain.PageImpl;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.elasticsearch.core.facet.FacetResult;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Rizwan Idrees
|
||||
* @author Mohsin Husen
|
||||
* @author Artur Konczak
|
||||
* @author Jonathan Yan
|
||||
*/
|
||||
public class FactedPageImpl<T> extends PageImpl<T> implements FacetedPage<T> {
|
||||
|
||||
private List<FacetResult> facets;
|
||||
private Map<String, FacetResult> mapOfFacets;
|
||||
|
||||
public FactedPageImpl(List<T> content) {
|
||||
super(content);
|
||||
}
|
||||
|
||||
public FactedPageImpl(List<T> content, Pageable pageable, long total) {
|
||||
super(content, pageable, total);
|
||||
}
|
||||
|
||||
public FactedPageImpl(List<T> content, Pageable pageable, long total, List<FacetResult> facets) {
|
||||
super(content, pageable, total);
|
||||
this.facets = facets;
|
||||
for (FacetResult facet : facets) {
|
||||
mapOfFacets.put(facet.getName(), facet);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasFacets() {
|
||||
return CollectionUtils.isNotEmpty(facets);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FacetResult> getFacets() {
|
||||
return facets;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FacetResult getFacet(String name) {
|
||||
return mapOfFacets.get(name);
|
||||
}
|
||||
}
|
@ -29,11 +29,10 @@ import org.springframework.data.elasticsearch.core.query.*;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
import static org.elasticsearch.index.query.FilterBuilders.termFilter;
|
||||
import static org.elasticsearch.index.query.QueryBuilders.fieldQuery;
|
||||
import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery;
|
||||
import static org.hamcrest.Matchers.*;
|
||||
import static org.junit.Assert.*;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.is;
|
||||
import static org.junit.Assert.assertThat;
|
||||
|
||||
/**
|
||||
* @author Rizwan Idrees
|
||||
|
Loading…
x
Reference in New Issue
Block a user