com.itranswarp.warpdb.Limit Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of warpdb Show documentation
Show all versions of warpdb Show documentation
Simple, DSL-driven RDBMS interface for Java
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();
}
}