Package se.l4.silo.query
Interface IndexQuery<T>
-
- Type Parameters:
T-
- All Superinterfaces:
LimitableQuery<IndexQuery<T>>,Query<FetchResult<T>>
- All Known Implementing Classes:
IndexQueryImpl
public interface IndexQuery<T> extends Query<FetchResult<T>>, LimitableQuery<IndexQuery<T>>
Simple query abilities that run on top of indexed fields.- Author:
- Andreas Holstenson
-
-
Method Summary
Modifier and Type Method Description IndexQuery<T>field(String name)Set the name of the field that the operation should run on.IndexQuery<T>isEqualTo(Object value)Check if the field is equal to the specified value.IndexQuery<T>isLessThan(Number number)Check if the field is less than the specified number.IndexQuery<T>isLessThanOrEqualTo(Number number)Check if the field is less than or equal to the specified number.IndexQuery<T>isMoreThan(Number number)Check if the field is more than the specified number.IndexQuery<T>isMoreThanOrEqualTo(Number number)Check if the field is more than or equal to the specified number.IndexQuery<T>reverseDefaultSort()Indicate the default sort should be reversed.IndexQuery<T>sort(boolean ascending)Sort by the specified field in the given order.IndexQuery<T>sortAscending()Sort by the specified field in ascending order.IndexQuery<T>sortDescending()Sort by the specified field in descending order.static <T> QueryType<T,T,IndexQuery<T>>type()-
Methods inherited from interface se.l4.silo.query.LimitableQuery
limit, offset, paginate
-
-
-
-
Method Detail
-
type
static <T> QueryType<T,T,IndexQuery<T>> type()
-
field
IndexQuery<T> field(String name)
Set the name of the field that the operation should run on.- Parameters:
name-- Returns:
-
isEqualTo
IndexQuery<T> isEqualTo(Object value)
Check if the field is equal to the specified value.- Parameters:
value-- Returns:
-
isMoreThan
IndexQuery<T> isMoreThan(Number number)
Check if the field is more than the specified number.- Parameters:
number-- Returns:
-
isLessThan
IndexQuery<T> isLessThan(Number number)
Check if the field is less than the specified number.- Parameters:
number-- Returns:
-
isLessThanOrEqualTo
IndexQuery<T> isLessThanOrEqualTo(Number number)
Check if the field is less than or equal to the specified number.- Parameters:
number-- Returns:
-
isMoreThanOrEqualTo
IndexQuery<T> isMoreThanOrEqualTo(Number number)
Check if the field is more than or equal to the specified number.- Parameters:
number-- Returns:
-
sortAscending
IndexQuery<T> sortAscending()
Sort by the specified field in ascending order.- Returns:
-
sortDescending
IndexQuery<T> sortDescending()
Sort by the specified field in descending order.- Returns:
-
sort
IndexQuery<T> sort(boolean ascending)
Sort by the specified field in the given order.- Parameters:
ascending-- Returns:
-
reverseDefaultSort
IndexQuery<T> reverseDefaultSort()
Indicate the default sort should be reversed.- Returns:
-
-