@Override public String getUriLiteral() { return operatorInfo.getSyntax(); }
@Override public Object accept(final ExpressionVisitor visitor) throws ExceptionVisitExpression, ODataApplicationException { Object retOperand = operand.accept(visitor); return visitor.visitUnary(this, operatorInfo.getOperator(), retOperand); }
protected void validateUnaryOperatorTypes(final UnaryExpression unaryExpression) throws ExpressionParserInternalError { InfoUnaryOperator unOpt = availableUnaryOperators.get(unaryExpression.getOperator().toUriLiteral()); EdmType operandType = unaryExpression.getOperand().getEdmType(); if ((operandType == null) && (resourceEntityType == null)) { return; } List<EdmType> actualParameterTypes = new ArrayList<EdmType>(); actualParameterTypes.add(operandType); ParameterSet parameterSet = unOpt.validateParameterSet(actualParameterTypes); if (parameterSet != null) { unaryExpression.setEdmType(parameterSet.getReturnType()); } }
lAvailableUnaryOperators.put(UnaryOperator.MINUS.toUriLiteral(), new InfoUnaryOperator(UnaryOperator.MINUS, "minus", combination)); lAvailableUnaryOperators.put(UnaryOperator.NOT.toUriLiteral(), new InfoUnaryOperator(UnaryOperator.NOT, "not", combination));
@Override public Object accept(final ExpressionVisitor visitor) throws ExceptionVisitExpression, ODataApplicationException { Object retOperand = operand.accept(visitor); return visitor.visitUnary(this, operatorInfo.getOperator(), retOperand); }
protected void validateUnaryOperatorTypes(final UnaryExpression unaryExpression) throws ExpressionParserInternalError { InfoUnaryOperator unOpt = availableUnaryOperators.get(unaryExpression.getOperator().toUriLiteral()); EdmType operandType = unaryExpression.getOperand().getEdmType(); if ((operandType == null) && (resourceEntityType == null)) { return; } List<EdmType> actualParameterTypes = new ArrayList<EdmType>(); actualParameterTypes.add(operandType); ParameterSet parameterSet = unOpt.validateParameterSet(actualParameterTypes); if (parameterSet != null) { unaryExpression.setEdmType(parameterSet.getReturnType()); } }
lAvailableUnaryOperators.put(UnaryOperator.MINUS.toUriLiteral(), new InfoUnaryOperator(UnaryOperator.MINUS, "minus", combination)); combination.add(new ParameterSet(boolean_, boolean_)); combination.add(new ParameterSet(null_, null_)); lAvailableUnaryOperators.put(UnaryOperator.NOT.toUriLiteral(), new InfoUnaryOperator(UnaryOperator.NOT, "not", combination));
@Override public Object accept(final ExpressionVisitor visitor) throws ExceptionVisitExpression, ODataApplicationException { Object retOperand = operand.accept(visitor); return visitor.visitUnary(this, operatorInfo.getOperator(), retOperand); }
@Override public String getUriLiteral() { return operatorInfo.getSyntax(); }
protected void validateUnaryOperatorTypes(final UnaryExpression unaryExpression) throws ExpressionParserInternalError { InfoUnaryOperator unOpt = availableUnaryOperators.get(unaryExpression.getOperator().toUriLiteral()); EdmType operandType = unaryExpression.getOperand().getEdmType(); if ((operandType == null) && (resourceEntityType == null)) { return; } List<EdmType> actualParameterTypes = new ArrayList<EdmType>(); actualParameterTypes.add(operandType); ParameterSet parameterSet = unOpt.validateParameterSet(actualParameterTypes); if (parameterSet != null) { unaryExpression.setEdmType(parameterSet.getReturnType()); } }
lAvailableUnaryOperators.put(UnaryOperator.MINUS.toUriLiteral(), new InfoUnaryOperator(UnaryOperator.MINUS, "minus", combination)); combination.add(new ParameterSet(boolean_, boolean_)); combination.add(new ParameterSet(null_, null_)); lAvailableUnaryOperators.put(UnaryOperator.NOT.toUriLiteral(), new InfoUnaryOperator(UnaryOperator.NOT, "not", combination));
@Override public String getUriLiteral() { return operatorInfo.getSyntax(); }