use of com.cloudant.client.api.query.Selector in project sw360 by eclipse.
the class ModerationRequestRepository method getRequestsByRequestingUser.
public List<ModerationRequest> getRequestsByRequestingUser(String user) {
final Selector typeSelector = eq("type", "moderation");
final Selector filterByModeratorSelector = eq("requestingUser", user);
final Selector finalSelector = and(typeSelector, filterByModeratorSelector);
QueryBuilder qb = new QueryBuilder(finalSelector);
qb.useIndex("byUsers");
List<ModerationRequest> mrs = getConnector().getQueryResult(qb.build(), ModerationRequest.class).getDocs();
return makeSummaryFromFullDocs(SummaryType.SHORT, mrs);
}
Aggregations