package eu.dnetlib.espas.gui.shared;

import com.google.gwt.user.client.rpc.IsSerializable;

import java.util.ArrayList;
import java.util.List;

@SuppressWarnings("serial")
public class SearchResults implements IsSerializable {

	private Query query;
	private List<RefineOption> refineOptions = new ArrayList<RefineOption>();
    private DateRange selectedDateRange;
	
	private int currentPage;
	private int totalPages;
	private List<ResultObservation> results = new ArrayList<ResultObservation>();
	
	public SearchResults() {
	}
	
	public SearchResults(Query query, List<RefineOption> refineOptions, DateRange selectedDateRange, int currentPage, int totalPages) {
		this.query = query;
		this.refineOptions = refineOptions;
        this.selectedDateRange = selectedDateRange;
		this.totalPages = totalPages;
		this.currentPage = currentPage;
	}
	
	public SearchResults(Query query, List<RefineOption> refineOptions, DateRange selectedDateRange,
			int currentPage, int totalPages, List<ResultObservation> results) {
		super();
		this.query = query;
		this.refineOptions = refineOptions;
        this.selectedDateRange = selectedDateRange;
		this.currentPage = currentPage;
		this.totalPages = totalPages;
		this.results = results;
	}

	public Query getQuery() {
		return query;
	}

	public void setQuery(Query query) {
		this.query = query;
	}
	
	public List<RefineOption> getRefineOptions() {
		return refineOptions;
	}

	public void setRefineOptions(List<RefineOption> refineOptions) {
		this.refineOptions = refineOptions;
	}

    public DateRange getSelectedDateRange() {
        return selectedDateRange;
    }

    public void setSelectedDateRange(DateRange selectedDateRange) {
        this.selectedDateRange = selectedDateRange;
    }

    public int getCurrentPage() {
		return currentPage;
	}

	public void setCurrentPage(int currentPage) {
		this.currentPage = currentPage;
	}

	public int getTotalPages() {
		return totalPages;
	}

	public void setTotalPages(int totalPages) {
		this.totalPages = totalPages;
	}

	public List<ResultObservation> getResults() {
		return results;
	}

	public void setResults(List<ResultObservation> results) {
		this.results = results;
	}
}
