/** * {@inheritDoc} */ public void acceptChildren(ExpressionVisitor visitor) { getIdentificationVariable().accept(visitor); }
/** * {@inheritDoc} */ public void acceptChildren(ExpressionVisitor visitor) { getIdentificationVariable().accept(visitor); }
protected void visitAbstractPathExpression(AbstractPathExpression expression) { if (type == LiteralType.PATH_EXPRESSION_IDENTIFICATION_VARIABLE) { expression.getIdentificationVariable().accept(this); } else if (type == LiteralType.PATH_EXPRESSION_ALL_PATH) { literal = expression.toParsedText(); } else if (type == LiteralType.PATH_EXPRESSION_LAST_PATH) { literal = expression.getPath(expression.pathSize() - 1); } } }
private void visitAbstractPathExpression(AbstractPathExpression expression) { if (!expression.startsWithDot()) { // Visit the general identification variable to make sure it's not a map key, map entry // or map value expression GeneralIdentificationVariableVisitor visitor = generalIdentificationVariableVisitor(); expression.getIdentificationVariable().accept(visitor); if (visitor.expression == null) { expression.setVirtualIdentificationVariable(variableName); } } }
protected void visitAbstractPathExpression(AbstractPathExpression expression) { if (type == LiteralType.PATH_EXPRESSION_IDENTIFICATION_VARIABLE) { expression.getIdentificationVariable().accept(this); } else if (type == LiteralType.PATH_EXPRESSION_ALL_PATH) { literal = expression.toParsedText(); } else if (type == LiteralType.PATH_EXPRESSION_LAST_PATH) { literal = expression.getPath(expression.pathSize() - 1); } } }
private void visitAbstractPathExpression(AbstractPathExpression expression) { if (!expression.startsWithDot()) { // Visit the general identification variable to make sure it's not a map key, map entry // or map value expression GeneralIdentificationVariableVisitor visitor = generalIdentificationVariableVisitor(); expression.getIdentificationVariable().accept(visitor); if (visitor.expression == null) { expression.setVirtualIdentificationVariable(variableName); } } }
protected void validatePathExpression(AbstractPathExpression expression) { // Missing identification variable if (!expression.hasIdentificationVariable() && !expression.hasVirtualIdentificationVariable()) { addProblem(expression, AbstractPathExpression_MissingIdentificationVariable); } // Validate the identification variable else { expression.getIdentificationVariable().accept(this); } // Cannot end with a dot if (expression.endsWithDot()) { addProblem(expression, AbstractPathExpression_CannotEndWithComma); } }
protected void validatePathExpression(AbstractPathExpression expression) { // Missing identification variable if (!expression.hasIdentificationVariable() && !expression.hasVirtualIdentificationVariable()) { addProblem(expression, AbstractPathExpression_MissingIdentificationVariable); } // Validate the identification variable else { expression.getIdentificationVariable().accept(this); } // Cannot end with a dot if (expression.endsWithDot()) { addProblem(expression, AbstractPathExpression_CannotEndWithComma); } }
expression.getIdentificationVariable(), LiteralType.IDENTIFICATION_VARIABLE );
private void visitPathExpression(AbstractPathExpression expression) { // First resolve the identification variable expression.getIdentificationVariable().accept(this); // The path expression is composed with an identification // variable that is mapped to a subquery as the "root" object if ((declaration != null) && (declaration.getType() == Type.SUBQUERY)) { resolveVirtualPath(expression); return; } // A null value would most likely mean it's coming from a // state field path expression that represents an enum constant if (localExpression == null) { boolean result = resolveEnumConstant(expression); if (result) { return; } } // The path expression is mapping to a database table if ((declaration != null) && (declaration.getType() == Type.TABLE)) { resolveColumn(expression); return; } // Traverse the rest of the path expression resolvePath(expression); } }
private void visitPathExpression(AbstractPathExpression expression) { // First resolve the identification variable expression.getIdentificationVariable().accept(this); // The path expression is composed with an identification // variable that is mapped to a subquery as the "root" object if ((declaration != null) && (declaration.getType() == Type.SUBQUERY)) { resolveVirtualPath(expression); return; } // A null value would most likely mean it's coming from a // state field path expression that represents an enum constant if (localExpression == null) { boolean result = resolveEnumConstant(expression); if (result) { return; } } // The path expression is mapping to a database table if ((declaration != null) && (declaration.getType() == Type.TABLE)) { resolveColumn(expression); return; } // Traverse the rest of the path expression resolvePath(expression); } }
resolver = queryContext.getResolver(expression.getIdentificationVariable());
Resolver resolver = queryContext.getResolver(expression.getIdentificationVariable());
private void visitPathExpression(AbstractPathExpression expression) { expression.getIdentificationVariable().accept(this);
private void visitPathExpression(AbstractPathExpression expression) { expression.getIdentificationVariable().accept(this);