package eu.dnetlib.enabling.resultset.rmi;

import java.util.List;

import javax.xml.bind.annotation.XmlRootElement;

import com.google.common.collect.Lists;

@XmlRootElement
public class ResultSetResponse {
	private int from = 0;
	private int to = 0;
	private boolean end = false;
	private int total = -1;
	private List<?> elements = Lists.newArrayList();
	
	public ResultSetResponse() {}
	
	public ResultSetResponse(int from, int to, boolean end, int total, List<?> elements) {
		this.from = from;
		this.to = to;
		this.end = end;
		this.total = total;
		this.elements = elements;
	}
	
	public int getFrom() {
		return from;
	}

	public void setFrom(int from) {
		this.from = from;
	}

	public int getTo() {
		return to;
	}

	public void setTo(int to) {
		this.to = to;
	}

	public boolean isEnd() {
		return end;
	}
	
	public void setEnd(boolean end) {
		this.end = end;
	}
	
	public int getTotal() {
		return total;
	}
	
	public void setTotal(int total) {
		this.total = total;
	}
	
	public List<?> getElements() {
		return elements;
	}
	
	public void setElements(List<?> elements) {
		this.elements = elements;
	}

}
