com.vaadin.hilla.crud.
Class JpaFilterConverter
Utility class for converting Hilla Filter
specifications into JPA
filter specifications. This class can be used to implement filtering for
custom ListService
or CrudService
implementations that use
JPA as the data source.
-
Method Summary
-
Method Details
-
toSpec
public static <T> org.springframework.data.jpa.domain.Specification<T> toSpec(Filter rawFilter, Class<T> entity) Converts the given filter specification into a JPA filter specification for the specified entity class.
If the filter contains
PropertyStringFilter
instances, their properties, or nested property paths, need to match the structure of the entity class. Likewise, their filter values should be in a format that can be parsed into the type that the property is of.Type Parameters:
T
- the type of the entityParameters:
rawFilter
- the filter to convertentity
- the entity classReturns:
a JPA filter specification for the given filter
-