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

com.itranswarp.warpdb.Limit Maven / Gradle / Ivy

There is a newer version: 6.0.3
Show newest version
package com.itranswarp.warpdb;

import java.util.List;

import com.itranswarp.warpdb.entity.BaseEntity;

public final class Limit {

	final SelectInfo info;

	Limit(SelectInfo info, int offset, int maxResults) {
		if (offset < 0) {
			throw new IllegalArgumentException("offset must be >= 0.");
		}
		if (maxResults <= 0) {
			throw new IllegalArgumentException("maxResults must be > 0.");
		}
		this.info = info;
		info.offset = offset;
		info.maxResults = maxResults;
	}

	/**
	 * Get all results as list.
	 * 
	 * @return list.
	 */
	public List list() {
		return info.list();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy