Class EqualIgnoreCase<T>

java.lang.Object
net.kaczmarzyk.spring.data.jpa.domain.PathSpecification<T>
net.kaczmarzyk.spring.data.jpa.domain.EqualIgnoreCase<T>
All Implemented Interfaces:
Serializable, LocaleAware, org.springframework.data.jpa.domain.Specification<T>

public class EqualIgnoreCase<T> extends PathSpecification<T> implements LocaleAware

Filters with equal where-clause (e.g. where firstName = "Homer").

Supports multiple field types: strings, numbers, booleans, enums, dates.

If the field type is string or enum, the where-clause is case insensitive

Author:
Ricardo Pardinho, Tomasz Kaczmarzyk
See Also:
  • Field Details

    • expectedValue

      protected String expectedValue
  • Constructor Details

  • Method Details

    • toPredicate

      public jakarta.persistence.criteria.Predicate toPredicate(jakarta.persistence.criteria.Root<T> root, jakarta.persistence.criteria.CriteriaQuery<?> query, jakarta.persistence.criteria.CriteriaBuilder cb)
      Specified by:
      toPredicate in interface org.springframework.data.jpa.domain.Specification<T>
    • setLocale

      public void setLocale(Locale locale)
      Specified by:
      setLocale in interface LocaleAware
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class PathSpecification<T>
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class PathSpecification<T>
    • toString

      public String toString()
      Overrides:
      toString in class Object