![JAR search and dependency download from the Maven repository](/logo.png)
dk.apaq.framework.criteria.Limit Maven / Gradle / Ivy
/*
* CrudContainer
* Copyright (C) 2011 by Apaq
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*/
package dk.apaq.framework.criteria;
/**
* Specifies a limit for requesting data from Cruds
*/
public class Limit {
private final int offset;
private final int count;
/**
* Creates a Limit instance. Defaults offset to 0.
*/
public Limit(int count) {
this(0, count);
}
/**
* Creates a Limit instance.
*/
public Limit(int offset, int count) {
this.offset = offset;
this.count = count;
}
/**
* Retrieves the offset.
* @return The offset.
*/
public int getOffset() {
return offset;
}
/**
* Retrieves the count.
* @return The count.
*/
public int getCount() {
return count;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy