org.apache.olingo.odata2.api.uri.expression

## Interface CommonExpression

- All Superinterfaces:
    Visitable
  All Known Subinterfaces:
    BinaryExpression, FilterExpression, LiteralExpression, MemberExpression, MethodExpression, OrderByExpression, OrderExpression, PropertyExpression, UnaryExpression

      public interface CommonExpression
      extends Visitable

  Parent class of all classes used to build the expression tree

  This interface defines the default methods for all expression tree nodes

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `EdmType` | `getEdmType()`
    `ExpressionKind` | `getKind()`
    `String` | `getUriLiteral()` Returns the URI literal which lead to the creation of this expression.
    `CommonExpression` | `setEdmType(EdmType edmType)` Set the edmType of this expression node

    - ### Methods inherited from interface org.apache.olingo.odata2.api.uri.expression.Visitable

      `accept`

- - ### Method Detail

    - #### getKind

          ExpressionKind getKind()

      Returns:
        Kind of this expression
      See Also:
        `ExpressionKind`

    - #### getEdmType

          EdmType getEdmType()

      Returns:
        The return type of the value represented with this expression. For example the `getEdmType()` method for an expression representing the "concat" method will return always "Edm.String".

        This type information is set while parsing the $filter or $orderby expressions and used to do a first validation of the expression. For calculating operators like "add, sub, mul" this type information is purely based on input and output types of the operator as defined in the OData specification. So for $filter=2 add 7 the `getEdmType()` method of the binary expression will return Edm.Byte and not Edm.Int16 because the parser performs no real addition.

        However, the application may change this type while evaluating the expression tree.

    - #### setEdmType

          CommonExpression setEdmType(EdmType edmType)

      Set the edmType of this expression node
      Parameters:
        `edmType` - Type to be set
      Returns:
        A self reference for method chaining"

    - #### getUriLiteral

          String getUriLiteral()

      Returns the URI literal which lead to the creation of this expression.
      Returns:
        URI literal

Copyright © 2013-2023 The Apache Software Foundation. All Rights Reserved.