Class QueryBuilder<T>

java.lang.Object
io.objectbox.query.QueryBuilder<T>
Type Parameters:
T - Entity class for which the Query is built.

public class QueryBuilder<T> extends Object
Builds a Query using conditions which can then be used to return a list of matching Objects.

A simple example:

 userBox.query()
     .equal(User_.firstName, "Joe", StringOrder.CASE_SENSITIVE)
     .order(User_.lastName)
     .build()
     .find()
 

To add a condition use the appropriate method, for example equal(Property, String, StringOrder) or isNull(Property). To order results use order(Property) and its related methods.

Use build() to create a Query object, which is used to actually get the results.

Note: by default Query returns full Objects. To return only values or an aggregate value for a single Property, use Query.property(Property).

See the Queries documentation for details.