Module jakarta.data

Interface CompositeRestriction<T>

Type Parameters:
T - entity type.
All Superinterfaces:
Restriction<T>

public interface CompositeRestriction<T> extends Restriction<T>

A Jakarta Data provider's view of a restriction that combines other restrictions.

This class is used by the Jakarta Data provider to interpret a restriction that is supplied by the application. The application should use the Restrict.all(Restriction...) and Restrict.any(Restriction...) methods to obtain composite restrictions.

Since:
1.1
  • Method Details

    • isNegated

      boolean isNegated()

      Indicates if the collective combination of restrictions() should be negated. The combination of restrictions is evaluated first, according to its type(), after which negation is applied to the evaluated result.

      Returns:
      true if negated, otherwise false.
    • restrictions

      List<Restriction<? super T>> restrictions()

      An ordered list of restrictions. The order must match the order that is specified by the application.

      The elements can be BasicRestriction or CompositeRestriction and must not be null.

      Any negation that is indicated by the isNegated() method has not been applied to the restrictions in the list because the negation instead applies to the entire combination.

      Returns:
      the ordered list of restriction.
    • type

      Indicates how to combine the list of restrictions().

      Returns:
      how to combine the list of restrictions.