List of usage examples for com.mongodb QueryBuilder all
public QueryBuilder all(final Object object)
From source file:org.wrml.contrib.runtime.service.mongo.MongoService.java
License:Apache License
private void addQueryCriterion(final SearchCriterion searchCriterion, final QueryBuilder queryBuilder) { final ComparisonOperator comparisonOperator = searchCriterion.getComparisonOperator(); final Object comparisonValue = searchCriterion.getComparisonValue(); switch (comparisonOperator) { case containsAll: { queryBuilder.all(comparisonValue); break;/*w ww .j a va 2s. com*/ } case equalTo: { queryBuilder.equals(comparisonValue); break; } case equalToAny: { queryBuilder.in(comparisonValue); break; } case exists: { queryBuilder.exists(true); break; } case greaterThan: { queryBuilder.greaterThan(comparisonValue); break; } case greaterThanOrEqualTo: { queryBuilder.greaterThanEquals(comparisonValue); break; } case lessThan: { queryBuilder.lessThan(comparisonValue); break; } case lessThanOrEqualTo: { queryBuilder.lessThanEquals(comparisonValue); break; } case notEqualTo: { queryBuilder.notEquals(comparisonValue); break; } case notEqualToAny: { queryBuilder.notIn(comparisonValue); break; } case notExists: { queryBuilder.exists(false); break; } case regex: { final Pattern regexPattern = searchCriterion.getRegexPattern(); if (regexPattern != null) { queryBuilder.regex(regexPattern); } break; } } }