}
public static ExpressionTree getExpressionTree(final String str,
final MappingContext mappingContext) throws HBqlException,
RecognitionException {
final Mapping mapping = mappingContext.getMapping();
final Map<String, ExpressionTree> map = mapping.getEvalMap();
ExpressionTree expressionTree = map.get(str);
if (expressionTree == null) {
final HBqlParser parser = ParserUtil.newHBqlParser(str);
expressionTree = parser.nodescWhereExpr();
expressionTree.setMappingContext(mappingContext);
mapping.addToExpressionTreeCache(str, expressionTree);
}
else {
expressionTree.reset();
}
return expressionTree;