Class Like<T>

java.lang.Object
net.kaczmarzyk.spring.data.jpa.domain.PathSpecification<T>
net.kaczmarzyk.spring.data.jpa.domain.Like<T>
All Implemented Interfaces:
Serializable, WithoutTypeConversion, org.springframework.data.jpa.domain.Specification<T>
Direct Known Subclasses:
EndingWith, LikeIgnoreCase, StartingWith

public class Like<T> extends PathSpecification<T> implements WithoutTypeConversion
Filters with path like %pattern% where-clause.
Author:
Tomasz Kaczmarzyk
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected String
     

    Fields inherited from class net.kaczmarzyk.spring.data.jpa.domain.PathSpecification

    path
  • Constructor Summary

    Constructors
    Constructor
    Description
    Like(QueryContext queryContext, String path, String... args)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
     
    jakarta.persistence.criteria.Predicate
    toPredicate(jakarta.persistence.criteria.Root<T> root, jakarta.persistence.criteria.CriteriaQuery<?> query, jakarta.persistence.criteria.CriteriaBuilder builder)
     
     

    Methods inherited from class net.kaczmarzyk.spring.data.jpa.domain.PathSpecification

    path

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.springframework.data.jpa.domain.Specification

    and, or
  • Field Details

    • pattern

      protected String pattern
  • 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 builder)
      Specified by:
      toPredicate in interface org.springframework.data.jpa.domain.Specification<T>
    • hashCode

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

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

      public String toString()
      Overrides:
      toString in class Object