package com.uas.search.b2b.model;

import java.io.Serializable;
import java.util.List;

public class SPage<T> implements Serializable {

	private static final long serialVersionUID = 1L;

	private int totalPage;

	private long totalElement;

	private int page;

	private int size;

	private boolean first;

	private boolean last;

	private List<T> content;

	private String token;

	public SPage() {
		super();
	}

	public SPage(int totalPage, long totalElement, int page, int size, boolean first, boolean last) {
		super();
		this.totalPage = totalPage;
		this.totalElement = totalElement;
		this.page = page;
		this.size = size;
		this.first = first;
		this.last = last;
	}

	public int getTotalPage() {
		return totalPage;
	}

	public void setTotalPage(int totalPage) {
		this.totalPage = totalPage;
	}

	public long getTotalElement() {
		return totalElement;
	}

	public void setTotalElement(long totalElement) {
		this.totalElement = totalElement;
	}

	public int getPage() {
		return page;
	}

	public void setPage(int page) {
		this.page = page;
	}

	public int getSize() {
		return size;
	}

	public void setSize(int size) {
		this.size = size;
	}

	public boolean isFirst() {
		return first;
	}

	public void setFirst(boolean first) {
		this.first = first;
	}

	public boolean isLast() {
		return last;
	}

	public void setLast(boolean last) {
		this.last = last;
	}

	public List<T> getContent() {
		return content;
	}

	public void setContent(List<T> content) {
		this.content = content;
	}

	public String getToken() {
		return token;
	}

	public void setToken(String token) {
		this.token = token;
	}

	@Override
	public String toString() {
		return "SPage [totalPage=" + totalPage + ", totalElement=" + totalElement + ", page=" + page + ", size=" + size
				+ ", first=" + first + ", last=" + last + ", content=" + content + ", token=" + token + "]";
	}


}
