
org.deephacks.tools4j.config.admin.query.BeanQuery Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tools4j-config-api-admin Show documentation
Show all versions of tools4j-config-api-admin Show documentation
Administrative API for Tools4j Config
package org.deephacks.tools4j.config.admin.query;
import org.deephacks.tools4j.config.model.Bean;
import java.util.List;
/**
* This is a convenient function for administrators that enable them to search for
* configuration and limit/paginate through result sets. Beans are not required to
* be indexed for this to work.
*
* {@link BeanQueryBuilder} is used to compose SQL-like queries together with
* this object. Only logical AND queries are supported at the moment.
*
* @see {@link BeanQueryBuilder}
*/
public interface BeanQuery {
/**
* Add a restriction on the result set.
*
* @param restriction a restriction on the query.
* @return BeanQuery
*/
public abstract BeanQuery add(BeanQueryBuilder.BeanRestriction restriction);
/**
* Set the position of the first result to retrieve.
*
* @param firstResult start position of the first result, numbered from 0
* @return the same query instance
*/
public abstract BeanQuery setFirstResult(int firstResult);
/**
* Set the maximum number of results to retrieve.
*
* @param maxResults -
* @return the same query instance
*/
public abstract BeanQuery setMaxResults(int maxResults);
/**
* Execute the query and retrieve the result set. This is not a lazy evaluation.
*
* @return result set.
*/
public List retrieve();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy