Search in sources :

Example 11 with ViewQuery

use of com.couchbase.client.java.view.ViewQuery in project tutorials by eugenp.

the class StudentGradeService method findByCourseAndGradeInRange.

public List<JsonDocument> findByCourseAndGradeInRange(String course, int minGrade, int maxGrade, boolean inclusiveEnd) {
    ViewQuery query = queryBuilder.findByCourseAndGradeInRange(course, minGrade, maxGrade, inclusiveEnd);
    ViewResult result = bucket.query(query);
    return extractDocuments(result);
}
Also used : ViewQuery(com.couchbase.client.java.view.ViewQuery) ViewResult(com.couchbase.client.java.view.ViewResult)

Example 12 with ViewQuery

use of com.couchbase.client.java.view.ViewQuery in project tutorials by eugenp.

the class StudentGradeService method findByGradeGreaterThan.

public List<JsonDocument> findByGradeGreaterThan(int lower) {
    ViewQuery query = queryBuilder.findByGradeGreaterThan(lower);
    ViewResult result = bucket.query(query);
    return extractDocuments(result);
}
Also used : ViewQuery(com.couchbase.client.java.view.ViewQuery) ViewResult(com.couchbase.client.java.view.ViewResult)

Aggregations

ViewQuery (com.couchbase.client.java.view.ViewQuery)12 ViewResult (com.couchbase.client.java.view.ViewResult)12 ViewRow (com.couchbase.client.java.view.ViewRow)4 HashMap (java.util.HashMap)3 JsonArray (com.couchbase.client.java.document.json.JsonArray)1