use of com.yahoo.elide.core.filter.visitors.FilterExpressionCheckEvaluationVisitor in project elide by yahoo.
the class FilterExpressionCheck method ok.
/**
* The filter expression is evaluated in memory if it cannot be pushed to the data store by elide for any reason.
*
* @param object object returned from datastore
* @param requestScope Request scope object
* @param changeSpec Summary of modifications
* @return true if the object pass evaluation against FilterExpression.
*/
@Override
public final boolean ok(T object, RequestScope requestScope, Optional<ChangeSpec> changeSpec) {
EntityDictionary dictionary = coreScope(requestScope).getDictionary();
Type<?> entityClass = dictionary.lookupBoundClass(EntityDictionary.getType(object));
FilterExpression filterExpression = getFilterExpression(entityClass, requestScope);
return filterExpression.accept(new FilterExpressionCheckEvaluationVisitor(object, this, requestScope));
}
Aggregations