public MemberExpressionImpl(final CommonExpression path, final CommonExpression property) { this.path = path; this.property = property; edmType = property.getEdmType(); }
EdmType parentType = leftExpression.getEdmType(); // parentType point now to the type of property "address" return; } else { if ((leftExpression.getKind() != ExpressionKind.PROPERTY) && (leftExpression.getKind() != ExpressionKind.MEMBER)) { if (actBinOp != null) {
private void appendExpression(final CommonExpression expression, final Writer writer) throws IOException { final ExpressionKind kind = expression.getKind(); writer.append("<span class=\"kind\">") .append(kind.toString()) .append("</span> <span class=\"literal\">") .append(kind == ExpressionKind.MEMBER ? ((MemberExpression) expression).getProperty().getUriLiteral() : expression.getUriLiteral()) .append("</span>, type <span class=\"type\">") .append(expression.getEdmType().toString()) .append("</span>"); if (kind == ExpressionKind.UNARY) {
switch (whereExpression.getKind()) { case UNARY: final UnaryExpression unaryExpression = (UnaryExpression) whereExpression; final BinaryExpression binaryExpression = (BinaryExpression) whereExpression; MethodOperator operator = null; if (binaryExpression.getLeftOperand().getKind() == ExpressionKind.METHOD) { operator = ((MethodExpression) binaryExpression.getLeftOperand()).getMethod(); MemberExpression member = null; CommonExpression tempExp = whereExpression; while (tempExp != null && tempExp.getKind() == ExpressionKind.MEMBER) { member = (MemberExpression) tempExp; if (i > 0) {
if (exception != null && exception.getFilterTree() != null) { writer.append("<h2>Expression Information</h2>\n") .append("<pre class=\"code\">").append(exception.getFilterTree().getUriLiteral()) .append("</pre>\n"); writer.append("<li>"); appendExpression(order.getExpression(), writer); final ExpressionKind kind = order.getExpression().getKind(); if (kind == ExpressionKind.PROPERTY || kind == ExpressionKind.LITERAL) { writer.append("<br />");
public static ExpressionParserException createINVALID_METHOD_CALL(final CommonExpression leftNode, final Token prevToken, final String expression) { final MessageReference msgRef = ExpressionParserException.INVALID_METHOD_CALL.create(); msgRef.addContent(leftNode.getUriLiteral()); msgRef.addContent(prevToken.getPosition() + 1); msgRef.addContent(expression); return new ExpressionParserException(msgRef); }
EdmType parentType = leftExpression.getEdmType(); // parentType point now to the type of property "address" return; } else { if ((leftExpression.getKind() != ExpressionKind.PROPERTY) && (leftExpression.getKind() != ExpressionKind.MEMBER)) { if (actBinOp != null) {
private void appendExpression(final CommonExpression expression, final Writer writer) throws IOException { final ExpressionKind kind = expression.getKind(); writer.append("<span class=\"kind\">") .append(kind.toString()) .append("</span> <span class=\"literal\">") .append(kind == ExpressionKind.MEMBER ? ((MemberExpression) expression).getProperty().getUriLiteral() : expression.getUriLiteral()) .append("</span>, type <span class=\"type\">") .append(expression.getEdmType().toString()) .append("</span>"); if (kind == ExpressionKind.UNARY) {
if (orderBy.getExpression().getKind() == ExpressionKind.MEMBER) { orderByField = parseToJPAWhereExpression(orderBy.getExpression(), tableAlias); } else {
if (exception != null && exception.getFilterTree() != null) { writer.append("<h2>Expression Information</h2>\n") .append("<pre class=\"code\">").append(exception.getFilterTree().getUriLiteral()) .append("</pre>\n"); writer.append("<li>"); appendExpression(order.getExpression(), writer); final ExpressionKind kind = order.getExpression().getKind(); if (kind == ExpressionKind.PROPERTY || kind == ExpressionKind.LITERAL) { writer.append("<br />");
public static ExpressionParserException createINVALID_METHOD_CALL(final CommonExpression leftNode, final Token prevToken, final String expression) { final MessageReference msgRef = ExpressionParserException.INVALID_METHOD_CALL.create(); msgRef.addContent(leftNode.getUriLiteral()); msgRef.addContent(prevToken.getPosition() + 1); msgRef.addContent(expression); return new ExpressionParserException(msgRef); }
EdmType parentType = leftExpression.getEdmType(); // parentType point now to the type of property "address" return; } else { if ((leftExpression.getKind() != ExpressionKind.PROPERTY) && (leftExpression.getKind() != ExpressionKind.MEMBER)) { if (actBinOp != null) {
public MemberExpressionImpl(final CommonExpression path, final CommonExpression property) { this.path = path; this.property = property; edmType = property.getEdmType(); }
if (orderBy.getExpression().getKind() == ExpressionKind.MEMBER) { orderByField = parseToJPAWhereExpression(orderBy.getExpression(), tableAlias); } else {
public static ExpressionParserException createINVALID_METHOD_CALL(final CommonExpression leftNode, final Token prevToken, final String expression) { final MessageReference msgRef = ExpressionParserException.INVALID_METHOD_CALL.create(); msgRef.addContent(leftNode.getUriLiteral()); msgRef.addContent(prevToken.getPosition() + 1); msgRef.addContent(expression); return new ExpressionParserException(msgRef); }
private <T> String evaluateExpression(final T data, final CommonExpression expression) throws ODataException { switch (expression.getKind()) { case UNARY: final UnaryExpression unaryExpression = (UnaryExpression) expression; final EdmSimpleType type = (EdmSimpleType) binaryExpression.getLeftOperand().getEdmType(); final String left = evaluateExpression(data, binaryExpression.getLeftOperand()); final String right = evaluateExpression(data, binaryExpression.getRightOperand()); while (currentExpression != null) { final PropertyExpression currentPropertyExpression = (PropertyExpression) (currentExpression.getKind() == ExpressionKind.MEMBER ? ((MemberExpression) currentExpression).getProperty() : currentExpression); final EdmTyped currentProperty = currentPropertyExpression.getEdmProperty(); currentExpression.getKind() == ExpressionKind.MEMBER ? ((MemberExpression) currentExpression).getPath() : null;
public MemberExpressionImpl(final CommonExpression path, final CommonExpression property) { this.path = path; this.property = property; edmType = property.getEdmType(); }
if ((leftNode.getKind() == ExpressionKind.PROPERTY) && (tokenList.lookToken().getKind() == TokenKind.OPENPAREN)) {