use of org.thingsboard.server.common.data.query.EntityKey in project thingsboard by thingsboard.
the class BaseEntityServiceTest method createNumericKeyFilter.
private KeyFilter createNumericKeyFilter(String key, EntityKeyType keyType, NumericFilterPredicate.NumericOperation operation, double value) {
KeyFilter filter = new KeyFilter();
filter.setKey(new EntityKey(keyType, key));
NumericFilterPredicate predicate = new NumericFilterPredicate();
predicate.setValue(FilterPredicateValue.fromDouble(value));
predicate.setOperation(operation);
filter.setPredicate(predicate);
return filter;
}
Aggregations