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

titan.lightbatis.result.PageList Maven / Gradle / Ivy

There is a newer version: 1.2.0
Show newest version
/**
 * 
 */
package titan.lightbatis.result;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.*;

/**
 * @author lifei
 *
 */
@Data
@ApiModel(value="带分页查询的数据列表", description = "继承 List 接口,增加了总条数的属性")
public class PageList implements List {

	@JsonProperty("records")
	private List records = new ArrayList<>();
	@ApiModelProperty(value="本次查询的数据总条数")
	@JsonProperty("totalSize")
	private int totalSize = 0;

	public PageList() {
	}
	

	public int size() {
		return records.size();
	}

	public boolean isEmpty() {
		return records.isEmpty();
	}

	public boolean contains(Object o) {
		return records.contains(o);
	}

	public Iterator iterator() {
		return records.iterator();
	}

	public Object[] toArray() {
		return records.toArray();
	}

	public  T[] toArray(T[] a) {
		return records.toArray(a);
	}

	public boolean add(E e) {
		return records.add(e);
	}

	public boolean remove(Object o) {
		return records.remove(o);
	}

	public boolean containsAll(Collection c) {
		return records.containsAll(c);
	}

	public boolean addAll(Collection c) {
		return records.addAll(c);
	}

	public boolean addAll(int index, Collection c) {
		return records.addAll(index, c);
	}

	public boolean removeAll(Collection c) {
		return records.removeAll(c);
	}

	public boolean retainAll(Collection c) {
		return records.retainAll(c);
	}


	public void clear() {
		records.clear();
	}

	public boolean equals(Object o) {
		return records.equals(o);
	}

	public int hashCode() {
		return records.hashCode();
	}

	public E get(int index) {
		return records.get(index);
	}

	public E set(int index, E element) {
		return records.set(index, element);
	}

	public void add(int index, E element) {
		records.add(index, element);
	}


	public E remove(int index) {
		return records.remove(index);
	}


	public int indexOf(Object o) {
		return records.indexOf(o);
	}

	public int lastIndexOf(Object o) {
		return records.lastIndexOf(o);
	}

	public ListIterator listIterator() {
		return records.listIterator();
	}

	public ListIterator listIterator(int index) {
		return records.listIterator(index);
	}

	public List subList(int fromIndex, int toIndex) {
		return records.subList(fromIndex, toIndex);
	}

	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy