Class PredicateSupport

java.lang.Object
org.hibernate.dialect.sql.ast.spi.PredicateSupport

@SPI({USE,SUPPLY}) public final class PredicateSupport extends Object

Immutable description of a Dialect's native predicate syntax and predicate placement support.

Providers supply a stable profile through Dialect#getPredicateSupport(). A present case-insensitive-like operator selects native rendering; an absent operator selects lowercase-expression emulation. The remaining capabilities independently select scalar distinct from, truthness predicates, and use of predicates in value-expression contexts.

Since:
8.0
See Also:
  • Field Details

    • NONE

      public static final PredicateSupport NONE
      No native predicate syntax or predicate expression placement.
    • STANDARD

      public static final PredicateSupport STANDARD
      The standard base-Dialect profile, supporting predicate expression placement but no native case-insensitive-like, scalar distinct from, or truthness syntax.
  • Method Details

    • builder

      public static PredicateSupport.Builder builder()
      Create a builder initialized from STANDARD.
    • builder

      public static PredicateSupport.Builder builder(PredicateSupport base)
      Create a builder initialized with every value from the given profile.
      Parameters:
      base - the non-null profile to copy
    • getCaseInsensitiveLikeOperator

      public Optional<String> getCaseInsensitiveLikeOperator()
      The native case-insensitive-like operator, or an empty value when lowercase-expression emulation is required.
    • getCapabilities

      public Set<PredicateSupport.Capability> getCapabilities()
      The immutable set of supported predicate capabilities.
    • supports

      public boolean supports(PredicateSupport.Capability capability)
      Whether the given predicate capability is supported.