Search in sources :

Example 1 with FieldExpr

use of com.enonic.xp.query.expr.FieldExpr in project xp by enonic.

the class AbstractQueryFieldNameResolver method resolve.

@Override
public String resolve(final CompareExpr compareExpr) {
    final FieldExpr field = compareExpr.getField();
    final String baseFieldName = IndexFieldNameNormalizer.normalize(field.getFieldPath());
    final ValueExpr firstValue = compareExpr.getFirstValue();
    if (firstValue == null) {
        return "";
    }
    return createValueTypeAwareFieldName(baseFieldName, firstValue.getValue());
}
Also used : ValueExpr(com.enonic.xp.query.expr.ValueExpr) FieldExpr(com.enonic.xp.query.expr.FieldExpr)

Aggregations

FieldExpr (com.enonic.xp.query.expr.FieldExpr)1 ValueExpr (com.enonic.xp.query.expr.ValueExpr)1