Class IgnoreOnTypeMismatch<T>
java.lang.Object
net.kaczmarzyk.spring.data.jpa.domain.EmptyResultOnTypeMismatch<T>
net.kaczmarzyk.spring.data.jpa.domain.IgnoreOnTypeMismatch<T>
- All Implemented Interfaces:
Serializable,org.springframework.data.jpa.domain.Specification<T>
Wrapper that turns a Specification into a one that ignores wrapped specification containing mismatched parameter
(except spec = In.class - in this specification only mismatched parameter values are ignored).
Type mismatch - e.g. when type on path is Long and the value
from the HTTP parameter is not a numeric.
A spec will be wrapped with this decorator if onTypeMismatch property of @Spec
is explicitly set to OnTypeMismatch.IGNORE, i.e.: @Spec(path="id", onTypeMismatch=IGNORE).
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionIgnoreOnTypeMismatch(org.springframework.data.jpa.domain.Specification<T> wrappedSpec) -
Method Summary
Methods inherited from class net.kaczmarzyk.spring.data.jpa.domain.EmptyResultOnTypeMismatch
getWrappedSpecMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.data.jpa.domain.Specification
and, or
-
Constructor Details
-
IgnoreOnTypeMismatch
-
-
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:
toPredicatein interfaceorg.springframework.data.jpa.domain.Specification<T>- Overrides:
toPredicatein classEmptyResultOnTypeMismatch<T>
-
toString
- Overrides:
toStringin classEmptyResultOnTypeMismatch<T>
-
hashCode
public int hashCode()- Overrides:
hashCodein classEmptyResultOnTypeMismatch<T>
-
equals
- Overrides:
equalsin classEmptyResultOnTypeMismatch<T>
-