use of io.crnk.jpa.internal.query.ComputedAttributeRegistryImpl in project crnk-framework by crnk-project.
the class QuerydslQueryBackend method getAttribute.
@Override
public Expression<?> getAttribute(final Expression<?> expression, MetaAttribute pathElement) {
if (pathElement instanceof MetaComputedAttribute) {
ComputedAttributeRegistryImpl virtualAttrs = queryImpl.getComputedAttrs();
QuerydslExpressionFactory expressionFactory = (QuerydslExpressionFactory) virtualAttrs.get((MetaComputedAttribute) pathElement);
return expressionFactory.getExpression(expression, getQuery());
} else {
return QuerydslUtils.get(expression, pathElement.getName());
}
}
Aggregations