Class EntityAttributeSpecificationProvider
- java.lang.Object
-
- de.adorsys.psd2.consent.repository.specification.EntityAttributeSpecificationProvider
-
public class EntityAttributeSpecificationProvider extends Object
This is a class for providing Spring Data Jpa Specification for different entities attributes
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> org.springframework.data.jpa.domain.Specification<T>provideSpecificationForEntityAttribute(String attribute, String value)Provides specification for the attribute in some entity.static <T> org.springframework.data.jpa.domain.Specification<T>provideSpecificationForEntityAttributeInList(String attribute, List<String> values)static <T> org.springframework.data.jpa.domain.Specification<T>provideSpecificationForJoinedEntityAttribute(@NotNull javax.persistence.criteria.Join<T,?> join, @NotNull String attribute, @Nullable Object value)Provides specification for the attribute in a joined entity.static <T> org.springframework.data.jpa.domain.Specification<T>provideSpecificationForJoinedEntityAttribute(@NotNull javax.persistence.criteria.Join<T,?> join, @NotNull String attribute, @Nullable String value)Provides specification for the attribute in a joined entity.
-
-
-
Method Detail
-
provideSpecificationForEntityAttribute
public static <T> org.springframework.data.jpa.domain.Specification<T> provideSpecificationForEntityAttribute(String attribute, String value)
Provides specification for the attribute in some entity.- Type Parameters:
T- type of the entity, for which this specification will be created- Parameters:
attribute- name of the attribute in entityvalue- optional value of the attribute- Returns:
- resulting specification, or
nullif the attribute's value was omitted
-
provideSpecificationForEntityAttributeInList
public static <T> org.springframework.data.jpa.domain.Specification<T> provideSpecificationForEntityAttributeInList(String attribute, List<String> values)
-
provideSpecificationForJoinedEntityAttribute
public static <T> org.springframework.data.jpa.domain.Specification<T> provideSpecificationForJoinedEntityAttribute(@NotNull @NotNull javax.persistence.criteria.Join<T,?> join, @NotNull @NotNull String attribute, @Nullable @Nullable String value)Provides specification for the attribute in a joined entity.- Type Parameters:
T- type of the entity, for which this specification will be created- Parameters:
join- join to an entityattribute- name of the attribute in joined entityvalue- optional value of the attribute- Returns:
- resulting specification, or
nullif the attribute's value was omitted
-
provideSpecificationForJoinedEntityAttribute
public static <T> org.springframework.data.jpa.domain.Specification<T> provideSpecificationForJoinedEntityAttribute(@NotNull @NotNull javax.persistence.criteria.Join<T,?> join, @NotNull @NotNull String attribute, @Nullable @Nullable Object value)Provides specification for the attribute in a joined entity.- Type Parameters:
T- type of the entity, for which this specification will be created- Parameters:
join- join to an entityattribute- name of the attribute in joined entityvalue- optional value of the attribute as Object- Returns:
- resulting specification, or
nullif the attribute's value was omitted
-
-