Package com.vaadin.hilla.crud
Class JpaFilterConverter
java.lang.Object
com.vaadin.hilla.crud.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
PropertyStringFilterinstances, 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 entity- Parameters:
rawFilter- the filter to convertentity- the entity class- Returns:
- a JPA filter specification for the given filter
-