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>, GeometryCollectionExpression<T>, GeometryExpression<T>, IfThenElseExpression<T>, LinearRingExpression<T>, LineStringExpression<T>, ListExpression<T,E>, LocalDateExpression, LocalDateTimeExpression, LocalTimeExpression, MapExpression<T,K,V>, MultiLineStringExpression<T>, MultiPointExpression<T>, MultiPolygonExpression<T>, NumericExpression<T>, ObjectExpression<T>, OptionalExpression<T>, PersistableExpression<T>, PointExpression<T>, PolygonExpression<T>, StringExpression, TimeExpression

public interface Expression<T>
Representation of an expression in a query.
  • Method Details

    • as

      Expression<T> as(String alias)
      Method to set the alias for this expression when used in the result clause.
      Parameters:
      alias - The alias
      Returns:
      This expression
    • eq

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

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

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

      Method returning whether this expression doesn't equal the literal.
      Parameters:
      t - literal
      Returns:
      Whether they are not equal
    • 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