Module jakarta.data

Interface BooleanExpression<T>

Type Parameters:
T - entity type.
All Superinterfaces:
ComparableExpression<T,Boolean>, Expression<T,Boolean>
All Known Subinterfaces:
BooleanAttribute<T>, BooleanLiteral, BooleanPath<T,U>

public interface BooleanExpression<T> extends ComparableExpression<T,Boolean>

An expression that evaluates to a true or false value.

The entity and static metamodel for the code examples within this class are shown in the Attribute Javadoc.

Since:
1.1
  • Method Details

    • isFalse

      default Restriction<T> isFalse()

      Obtains a Restriction that requires that this expression evaluate to a false value.

      Example:

      
           newVehicles = cars.search(make,
                                     model,
                                     _Car.previouslyOwned.isFalse());
       
      Returns:
      the restriction.
    • isTrue

      default Restriction<T> isTrue()

      Obtains a Restriction that requires that this expression evaluate to a true value.

      Example:

      
           usedVehicles = cars.search(make,
                                      model,
                                      _Car.previouslyOwned.isTrue());
       
      Returns:
      the restriction.
    • type

      default Class<Boolean> type()
      Returns Boolean.class as the type of the boolean expression.
      Specified by:
      type in interface Expression<T,Boolean>
      Returns:
      Boolean.class.