se.l4.silo.query.IndexQuery Maven / Gradle / Ivy
The newest version!
package se.l4.silo.query;
import se.l4.silo.FetchResult;
import se.l4.silo.index.IndexQueryType;
/**
* Simple query abilities that run on top of indexed fields.
*
* @author Andreas Holstenson
*
* @param
*/
public interface IndexQuery
extends Query>, LimitableQuery>
{
static QueryType> type()
{
return new IndexQueryType<>();
}
/**
* Set the name of the field that the operation should run on.
*
* @param name
* @return
*/
IndexQuery field(String name);
/**
* Check if the field is equal to the specified value.
*
* @param value
* @return
*/
IndexQuery isEqualTo(Object value);
/**
* Check if the field is more than the specified number.
*
* @param number
* @return
*/
IndexQuery isMoreThan(Number number);
/**
* Check if the field is less than the specified number.
*
* @param number
* @return
*/
IndexQuery isLessThan(Number number);
/**
* Check if the field is less than or equal to the specified number.
*
* @param number
* @return
*/
IndexQuery isLessThanOrEqualTo(Number number);
/**
* Check if the field is more than or equal to the specified number.
*
* @param number
* @return
*/
IndexQuery isMoreThanOrEqualTo(Number number);
/**
* Sort by the specified field in ascending order.
*
* @return
*/
IndexQuery sortAscending();
/**
* Sort by the specified field in descending order.
*
* @return
*/
IndexQuery sortDescending();
/**
* Sort by the specified field in the given order.
*
* @param ascending
* @return
*/
IndexQuery sort(boolean ascending);
/**
* Indicate the default sort should be reversed.
*
* @return
*/
IndexQuery reverseDefaultSort();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy