All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ejlchina.searcher.SearchResult Maven / Gradle / Ivy

There is a newer version: 3.8.3
Show newest version
package com.ejlchina.searcher;

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



/***
 * 检索结果
 * 
 * @author Troy.Zhou @ 2017-03-20
 * 
 * */
public class SearchResult {

	private Number totalCount = 0;
	
	private Number max;
	private Number offset;
	private Number page;
	private Number totalPage;
	
	private List dataList = new ArrayList<>();
	
	private Number[] summaries;
	
	
	public SearchResult(Number totalCount, Number[] summaries) {
		this.totalCount = totalCount;
		this.summaries = summaries;
	}

	
	public Number getTotalCount() {
		return totalCount;
	}

	public void setTotalCount(Number totalCount) {
		this.totalCount = totalCount;
	}

	public List getDataList() {
		return dataList;
	}
	
	public void addData(T data) {
		dataList.add(data);
	}
	
	public Number getMax() {
		return max;
	}

	public void setMax(Number max) {
		this.max = max;
	}

	public Number getOffset() {
		return offset;
	}

	public void setOffset(Number offset) {
		this.offset = offset;
	}

	public Number getPage() {
		return page;
	}

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

	public Number getTotalPage() {
		return totalPage;
	}

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

	
	public Number[] getSummaries() {
		return summaries;
	}


	public void setSummaries(Number[] summaries) {
		this.summaries = summaries;
	}


	public String toString() {
		String str = "totalCount = " + totalCount + "\n";
		for (T data: dataList) {
			str += "\t" + data.toString();
		}
		return str;
	}
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy