javax.jdo.query

## Interface Expression<T>

- Type Parameters:
    `T` - Java type being represented here
  All Known Subinterfaces:
    BooleanExpression, ByteExpression, CharacterExpression, CollectionExpression<T,E>, ComparableExpression<T>, DateExpression, DateTimeExpression, EnumExpression<T>, IfThenElseExpression<T>, ListExpression<T,E>, LocalDateExpression, LocalDateTimeExpression, LocalTimeExpression, MapExpression<T,K,V>, NumericExpression<T>, ObjectExpression<T>, OptionalExpression<T>, PersistableExpression<T>, StringExpression, TimeExpression

      public interface Expression<T>

  Representation of an expression in a query.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Expression` | `as(String alias)` Method to return an expression with the specified alias assigned to this expression.
    `Expression` | `cast(Class cls)` Return an expression where this expression is cast to the specified type.
    `NumericExpression<Long>` | `count()` Method to return a numeric expression representing the aggregated count of this expression.
    `NumericExpression<Long>` | `countDistinct()` Method to return a numeric expression representing the aggregated (distinct) count of this expression.
    `BooleanExpression` | `eq(Expression expr)` Method returning whether this expression equals the other expression.
    `BooleanExpression` | `eq(T t)` Method returning whether this expression equals the literal.
    `BooleanExpression` | `instanceOf(Class cls)` Return an expression for whether this expression is an instanceof the supplied class.
    `BooleanExpression` | `ne(Expression expr)` Method returning whether this expression doesn't equal the other expression.
    `BooleanExpression` | `ne(T t)` Method returning whether this expression doesn't equal the literal.

- - ### Method Detail

    - #### eq

          BooleanExpression eq(Expression expr)

      Method returning whether this expression equals the other expression.
      Parameters:
        `expr` - Other expression
      Returns:
        Whether they are equal

    - #### eq

          BooleanExpression eq(T t)

      Method returning whether this expression equals the literal.
      Parameters:
        `t` - Literal
      Returns:
        Whether they are equal

    - #### ne

          BooleanExpression ne(Expression expr)

      Method returning whether this expression doesn't equal the other expression.
      Parameters:
        `expr` - Other expression
      Returns:
        Whether they are not equal

    - #### ne

          BooleanExpression ne(T t)

      Method returning whether this expression doesn't equal the literal.
      Parameters:
        `t` - literal
      Returns:
        Whether they are not equal

    - #### count

          NumericExpression<Long> count()

      Method to return a numeric expression representing the aggregated count of this expression.
      Returns:
        Numeric expression for the count

    - #### countDistinct

          NumericExpression<Long> countDistinct()

      Method to return a numeric expression representing the aggregated (distinct) count of this expression.
      Returns:
        Numeric expression for the distinct count

    - #### instanceOf

          BooleanExpression instanceOf(Class cls)

      Return an expression for whether this expression is an instanceof the supplied class.
      Parameters:
        `cls` - Class to check against
      Returns:
        Whether it is an instanceof

    - #### cast

          Expression cast(Class cls)

      Return an expression where this expression is cast to the specified type.
      Parameters:
        `cls` - Class to cast to
      Returns:
        The cast expression

    - #### as

          Expression as(String alias)

      Method to return an expression with the specified alias assigned to this expression.
      Parameters:
        `alias` - the alias for this expression
      Returns:
        the expression with an alias

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