Package se.l4.silo.index
Class IndexQueryImpl<T>
- java.lang.Object
-
- se.l4.silo.index.IndexQueryImpl<T>
-
- All Implemented Interfaces:
IndexQuery<T>,LimitableQuery<IndexQuery<T>>,Query<FetchResult<T>>
public class IndexQueryImpl<T> extends Object implements IndexQuery<T>
-
-
Constructor Summary
Constructors Constructor Description IndexQueryImpl(QueryRunner<T,T> runner)
-
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>limit(long limit)Set the number of results this query can return.IndexQuery<T>offset(long offset)Set the offset of this query.IndexQuery<T>reverseDefaultSort()Indicate the default sort should be reversed.FetchResult<T>run()Run this query and return the result.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.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface se.l4.silo.query.LimitableQuery
paginate
-
-
-
-
Constructor Detail
-
IndexQueryImpl
public IndexQueryImpl(QueryRunner<T,T> runner)
-
-
Method Detail
-
run
public FetchResult<T> run()
Description copied from interface:QueryRun this query and return the result.
-
field
public IndexQuery<T> field(String name)
Description copied from interface:IndexQuerySet the name of the field that the operation should run on.- Specified by:
fieldin interfaceIndexQuery<T>- Returns:
-
isEqualTo
public IndexQuery<T> isEqualTo(Object value)
Description copied from interface:IndexQueryCheck if the field is equal to the specified value.- Specified by:
isEqualToin interfaceIndexQuery<T>- Returns:
-
isMoreThan
public IndexQuery<T> isMoreThan(Number number)
Description copied from interface:IndexQueryCheck if the field is more than the specified number.- Specified by:
isMoreThanin interfaceIndexQuery<T>- Returns:
-
isLessThan
public IndexQuery<T> isLessThan(Number number)
Description copied from interface:IndexQueryCheck if the field is less than the specified number.- Specified by:
isLessThanin interfaceIndexQuery<T>- Returns:
-
isLessThanOrEqualTo
public IndexQuery<T> isLessThanOrEqualTo(Number number)
Description copied from interface:IndexQueryCheck if the field is less than or equal to the specified number.- Specified by:
isLessThanOrEqualToin interfaceIndexQuery<T>- Returns:
-
isMoreThanOrEqualTo
public IndexQuery<T> isMoreThanOrEqualTo(Number number)
Description copied from interface:IndexQueryCheck if the field is more than or equal to the specified number.- Specified by:
isMoreThanOrEqualToin interfaceIndexQuery<T>- Returns:
-
sortAscending
public IndexQuery<T> sortAscending()
Description copied from interface:IndexQuerySort by the specified field in ascending order.- Specified by:
sortAscendingin interfaceIndexQuery<T>- Returns:
-
sortDescending
public IndexQuery<T> sortDescending()
Description copied from interface:IndexQuerySort by the specified field in descending order.- Specified by:
sortDescendingin interfaceIndexQuery<T>- Returns:
-
sort
public IndexQuery<T> sort(boolean ascending)
Description copied from interface:IndexQuerySort by the specified field in the given order.- Specified by:
sortin interfaceIndexQuery<T>- Returns:
-
reverseDefaultSort
public IndexQuery<T> reverseDefaultSort()
Description copied from interface:IndexQueryIndicate the default sort should be reversed.- Specified by:
reverseDefaultSortin interfaceIndexQuery<T>- Returns:
-
limit
public IndexQuery<T> limit(long limit)
Description copied from interface:LimitableQuerySet the number of results this query can return.- Specified by:
limitin interfaceLimitableQuery<T>- Returns:
-
offset
public IndexQuery<T> offset(long offset)
Description copied from interface:LimitableQuerySet the offset of this query.- Specified by:
offsetin interfaceLimitableQuery<T>- Returns:
-
-