javax.jdo.query

## Interface IfThenElseExpression<T>

- Type Parameters:
    `T` - Java type
  All Superinterfaces:
    ComparableExpression<T>, Expression<T>

      public interface IfThenElseExpression<T>
      extends ComparableExpression<T>

  Representation of an IF-THEN-ELSE expression.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `IfThenElseExpression<T>` | `elseEnd(Expression<T> elseValueExpr)` Method to add the "ELSE ..." clause.
    `IfThenElseExpression<T>` | `elseEnd(T elseValue)` Method to add the "ELSE ..." clause.
    `IfThenElseExpression<T>` | `ifThen(BooleanExpression cond, Expression<T> thenValueExpr)` Method to add an "IF (...) ..." clause.
    `IfThenElseExpression<T>` | `ifThen(BooleanExpression cond, T thenValue)` Method to add an "IF (...) ..." clause.

    - ### Methods inherited from interface javax.jdo.query.ComparableExpression

      `asc, desc, gt, gt, gteq, gteq, lt, lt, lteq, lteq, max, min`

    - ### Methods inherited from interface javax.jdo.query.Expression

      `as, cast, count, countDistinct, eq, eq, instanceOf, ne, ne`

- - ### Method Detail

    - #### ifThen

          IfThenElseExpression<T> ifThen(BooleanExpression cond,
                                         Expression<T> thenValueExpr)

      Method to add an "IF (...) ..." clause. If called multiple times, will add extra "IF (...) ..." or "ELSE IF (...) ..."
      Parameters:
        `cond` - The if expression
        `thenValueExpr` - Expression to return when the if expression is met
      Returns:
        This expression

    - #### ifThen

          IfThenElseExpression<T> ifThen(BooleanExpression cond,
                                         T thenValue)

      Method to add an "IF (...) ..." clause. If called multiple times, will add extra "IF (...) ..." or "ELSE IF (...) ..."
      Parameters:
        `cond` - The if condition
        `thenValue` - Value to return when the if expression is met
      Returns:
        This expression

    - #### elseEnd

          IfThenElseExpression<T> elseEnd(Expression<T> elseValueExpr)

      Method to add the "ELSE ..." clause. If called multiple times will replace the previous else clause
      Parameters:
        `elseValueExpr` - Expression for value to return when the if expression is not met
      Returns:
        This expression

    - #### elseEnd

          IfThenElseExpression<T> elseEnd(T elseValue)

      Method to add the "ELSE ..." clause. If called multiple times will replace the previous else clause
      Parameters:
        `elseValue` - Value to return when the if expression is not met
      Returns:
        This expression

Copyright © 2005–2022 The Apache Software Foundation. All rights reserved.