The example below demanstate 3 AND condition, where the 2nd condition is an OR condition
final Dao<Image, String> dao = ...QueryBuilder queryBuilder = dao.queryBuilder();Where<Image, String> where = queryBuilder.where();where.and(where.isNotNull("local_file_path"), where.or(where.isNotNull("blob_url"), where.eq("is_active", false)), where.eq("is_local1600_cache", true));queryBuilder.orderBy("created", true);
Count
final Long count =queryBuilder.countOf()
Query
final List<Image> items = queryBuilder.query();
Query with limit
final List<Image> items = queryBuilder.limit((long)100).query();
Single field simple query
final List<Image> items = dao.queryForEq("is_active", true);
Query by id
Image item = dao.queryForId(imageId);
Batch Update
dao.callBatchTasks(new Callable<Void>() { @Override public Void call() throws Exception { for (Image item : items) { dao.update(item); } return null; }});