org.apache.olingo.commons.api.edm.provider.annotation

## Class CsdlIf

- java.lang.Object
- - org.apache.olingo.commons.api.edm.provider.CsdlAbstractEdmItem
  - - org.apache.olingo.commons.api.edm.provider.annotation.CsdlExpression
    - - org.apache.olingo.commons.api.edm.provider.annotation.CsdlDynamicExpression
      - - org.apache.olingo.commons.api.edm.provider.annotation.CsdlIf

- All Implemented Interfaces:
    CsdlAnnotatable

      public class CsdlIf
      extends CsdlDynamicExpression
      implements CsdlAnnotatable

  Represents a edm:If expression

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CsdlIf()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `List<CsdlAnnotation>` | `getAnnotations()` Returns a list of annotations
    `CsdlExpression` | `getElse()` Return the third expression of the edm:If expression.
    `CsdlExpression` | `getGuard()` Returns the first expression of the edm:If expression.
    `CsdlExpression` | `getThen()` Return the second expression of the edm:If expression.
    `int` | `hashCode()`
    `CsdlIf` | `setAnnotations(List<CsdlAnnotation> annotations)`
    `CsdlIf` | `setElse(CsdlExpression _else)`
    `CsdlIf` | `setGuard(CsdlExpression guard)`
    `CsdlIf` | `setThen(CsdlExpression _then)`

    - ### Methods inherited from class org.apache.olingo.commons.api.edm.provider.annotation.CsdlDynamicExpression

      `asAnnotationPath, asApply, asCast, asCollection, asIf, asIsOf, asLabeledElement, asLabeledElementReference, asLogicalOrComparison, asNavigationPropertyPath, asNull, asPath, asPropertyPath, asRecord, asUrlRef, isAnnotationPath, isApply, isCast, isCollection, isIf, isIsOf, isLabeledElement, isLabeledElementReference, isLogicalOrComparison, isNavigationPropertyPath, isNull, isPath, isPropertyPath, isRecord, isUrlRef`

    - ### Methods inherited from class org.apache.olingo.commons.api.edm.provider.annotation.CsdlExpression

      `asConstant, asDynamic, isConstant, isDynamic`

    - ### Methods inherited from class org.apache.olingo.commons.api.edm.provider.CsdlAbstractEdmItem

      `getAllByName, getOneByName`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CsdlIf

          public CsdlIf()

  - ### Method Detail

    - #### getAnnotations

          public List<CsdlAnnotation> getAnnotations()

      Description copied from interface: `CsdlAnnotatable`
      Returns a list of annotations
      Specified by:
        `getAnnotations` in interface `CsdlAnnotatable`
      Returns:
        list of annotations

    - #### setAnnotations

          public CsdlIf setAnnotations(List<CsdlAnnotation> annotations)

    - #### getGuard

          public CsdlExpression getGuard()

      Returns the first expression of the edm:If expression. This expression represents the condition of the if expression
      Returns:
        First expression of the if expression

    - #### setGuard

          public CsdlIf setGuard(CsdlExpression guard)

    - #### getThen

          public CsdlExpression getThen()

      Return the second expression of the edm:If expression. If the condition of the condition is evaluated to true, this expression as to be executed.
      Returns:
        Second Expression of the edm:If expression

    - #### setThen

          public CsdlIf setThen(CsdlExpression _then)

    - #### getElse

          public CsdlExpression getElse()

      Return the third expression of the edm:If expression. If the condition of the condition is evaluated to false, this expression as to be executed.
      Returns:
        Third Expression of the edm:If expression

    - #### setElse

          public CsdlIf setElse(CsdlExpression _else)

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright © 2013–2020 The Apache Software Foundation. All rights reserved.