/** * {@inheritDoc} */ @Override public void visit(LikeExpression expression) { // Only AND, OR, NOT or clause identifiers can follow this expression // when the type is LOGICAL or CLAUSE appendable = appendableType == AppendableType.COMPLETE || appendableType == AppendableType.LOGICAL; if (appendable) { boolean oldConditionalExpression = conditionalExpression; conditionalExpression = false; if (expression.hasEscape()) { expression.getEscapeCharacter().accept(this); } else { expression.getPatternValue().accept(this); } conditionalExpression = oldConditionalExpression; } }
/** * {@inheritDoc} */ public void visit(LikeExpression expression) { if (badExpression) { if (!expression.hasStringExpression() && positionWithinInvalidExpression <= 4 /* LIKE */) { queryPosition.setExpression(expression); queryPosition.addPosition(expression, positionWithinInvalidExpression); } } else { if (expression.hasEscapeCharacter()) { expression.getEscapeCharacter().accept(this); } else if (expression.hasPatternValue() && !expression.hasEscape()) { expression.getPatternValue().accept(this); } if (queryPosition.getExpression() == null) { queryPosition.setExpression(expression); } queryPosition.addPosition(expression, expression.getLength() - correction); } }
if (expression.hasEscape()) {
if (expression.hasEscape()) {