Package app.tozzi.repository
Interface JPASearchRepository<E>
- All Superinterfaces:
org.springframework.data.jpa.repository.JpaSpecificationExecutor<E>
public interface JPASearchRepository<E>
extends org.springframework.data.jpa.repository.JpaSpecificationExecutor<E>
-
Method Summary
Modifier and TypeMethodDescriptiondefault longcount(JPASearchInput input, @NonNull Class<?> domainModelOrEntityType) Mode 2: Countdefault longcount(JPASearchInput input, @NonNull Class<?> domainModelOrEntityType, Map<String, String> entityFieldMap) Mode 2: Count with a map of: key: domain object field name value: entity field namedefault longMode 1: Countdefault longcount(Map<String, String> filters, @NonNull Class<?> domainModelOrEntityType, Map<String, String> entityFieldMap) Mode 1: Count with a map of: key: domain object field name value: entity field namefindAll(@NonNull JPASearchInput input, @NonNull Class<?> domainModelOrEntityType) Mode 2: Search by filters without sorting and paginationfindAll(@NonNull JPASearchInput input, @NonNull Class<?> domainModelOrEntityType, Map<String, jakarta.persistence.criteria.JoinType> fetches) Mode 2: Search by filters without sorting and pagination and with forced fetched Join.findAll(@NonNull JPASearchInput input, @NonNull Class<?> domainModelOrEntityType, Map<String, jakarta.persistence.criteria.JoinType> fetches, Map<String, String> entityFieldMap) Mode 2: Search by filters without sorting and pagination, with forced fetched Join and with a map of: key: domain object field name value: entity field nameMode 1: Search by filters without sorting and paginationfindAll(Map<String, String> filters, @NonNull Class<?> domainModelOrEntityType, Map<String, jakarta.persistence.criteria.JoinType> fetches) Mode 1: Search by filters without sorting and pagination and with forced fetched Join.findAll(Map<String, String> filters, @NonNull Class<?> domainModelOrEntityType, Map<String, jakarta.persistence.criteria.JoinType> fetches, Map<String, String> entityFieldMap) Mode 1: Search by filters without sorting and pagination, with forced fetched Join and with a map of: key: domain object field name value: entity field namefindAllSorted(@NonNull JPASearchInput input, @NonNull Class<?> domainModelOrEntityType) Mode 2: Search by filters with sorting and without paginationfindAllSorted(@NonNull JPASearchInput input, @NonNull Class<?> domainModelOrEntityType, Map<String, jakarta.persistence.criteria.JoinType> fetches) Mode 2: Search by filters with sorting, without pagination and with forced fetched Join.findAllSorted(@NonNull JPASearchInput input, @NonNull Class<?> domainModelOrEntityType, Map<String, jakarta.persistence.criteria.JoinType> fetches, Map<String, String> entityFieldMap) Mode 2: Search by filters with sorting, without pagination, with forced fetched Join and with a map of: key: domain object field name value: entity field namefindAllSorted(Map<String, String> filters, @NonNull Class<?> domainModelOrEntityType) Mode 1: Search by filters with sorting and without paginationfindAllSorted(Map<String, String> filters, @NonNull Class<?> domainModelOrEntityType, Map<String, jakarta.persistence.criteria.JoinType> fetches) Mode 1: Search by filters with sorting, without pagination and with forced fetched Join.findAllSorted(Map<String, String> filters, @NonNull Class<?> domainModelOrEntityType, Map<String, jakarta.persistence.criteria.JoinType> fetches, Map<String, String> entityFieldMap) Mode 1: Search by filters with sorting, without pagination, with forced fetched Join and with a map of: key: domain object field name value: entity field namedefault org.springframework.data.domain.Page<E>findAllWithPaginationAndSorting(@NonNull JPASearchInput input, @NonNull Class<?> domainModelOrEntityType) Mode 2: Search by filters with sorting and paginationdefault org.springframework.data.domain.Page<E>findAllWithPaginationAndSorting(@NonNull JPASearchInput input, @NonNull Class<?> domainModelOrEntityType, Map<String, String> entityFieldMap) Mode 2: Search by filters with sorting, pagination and with a map of: key: domain object field name value: entity field namedefault org.springframework.data.domain.Page<E>findAllWithPaginationAndSorting(Map<String, String> filters, @NonNull Class<?> domainModelOrEntityType) Mode 1: Search by filters with sorting and paginationdefault org.springframework.data.domain.Page<E>findAllWithPaginationAndSorting(Map<String, String> filters, @NonNull Class<?> domainModelOrEntityType, Map<String, String> entityFieldMap) Mode 1: Search by filters with sorting, pagination and with a map of: key: domain object field name value: entity field nameMethods inherited from interface org.springframework.data.jpa.repository.JpaSpecificationExecutor
count, delete, exists, findAll, findAll, findAll, findBy, findOne
-
Method Details
-
findAll
default List<E> findAll(Map<String, String> filters, @NonNull @NonNull Class<?> domainModelOrEntityType) Mode 1: Search by filters without sorting and pagination- Parameters:
filters- search filtersdomainModelOrEntityType- the type of the domain object or entity: i.e. the root object where you applied theSearchableandNestedSearchableannotations- Returns:
- list of entities
-
findAll
default List<E> findAll(@NonNull @NonNull JPASearchInput input, @NonNull @NonNull Class<?> domainModelOrEntityType) Mode 2: Search by filters without sorting and pagination- Parameters:
input- search filtersdomainModelOrEntityType- the type of the domain object or entity: i.e. the root object where you applied theSearchableandNestedSearchableannotations- Returns:
- list of entities
-
findAll
default List<E> findAll(Map<String, String> filters, @NonNull @NonNull Class<?> domainModelOrEntityType, Map<String, jakarta.persistence.criteria.JoinType> fetches) Mode 1: Search by filters without sorting and pagination and with forced fetched Join.- Parameters:
filters- search filtersdomainModelOrEntityType- the type of the domain object or entity: i.e. the root object where you applied theSearchableandNestedSearchableannotationsfetches- fetches joins- Returns:
- list of entities
-
findAll
default List<E> findAll(@NonNull @NonNull JPASearchInput input, @NonNull @NonNull Class<?> domainModelOrEntityType, Map<String, jakarta.persistence.criteria.JoinType> fetches) Mode 2: Search by filters without sorting and pagination and with forced fetched Join.- Parameters:
input- search filtersdomainModelOrEntityType- the type of the domain object or entity: i.e. the root object where you applied theSearchableandNestedSearchableannotationsfetches- fetches joins- Returns:
- list of entities
-
findAll
default List<E> findAll(Map<String, String> filters, @NonNull @NonNull Class<?> domainModelOrEntityType, Map<String, jakarta.persistence.criteria.JoinType> fetches, Map<String, String> entityFieldMap) Mode 1: Search by filters without sorting and pagination, with forced fetched Join and with a map of:- key: domain object field name
- value: entity field name
- Parameters:
filters- search filtersdomainModelOrEntityType- the type of the domain object or entity: i.e. the root object where you applied theSearchableandNestedSearchableannotationsfetches- fetches joinsentityFieldMap-- Returns:
- list of entities
-
findAll
default List<E> findAll(@NonNull @NonNull JPASearchInput input, @NonNull @NonNull Class<?> domainModelOrEntityType, Map<String, jakarta.persistence.criteria.JoinType> fetches, Map<String, String> entityFieldMap) Mode 2: Search by filters without sorting and pagination, with forced fetched Join and with a map of:- key: domain object field name
- value: entity field name
- Parameters:
input- search filtersdomainModelOrEntityType- the type of the domain object or entity: i.e. the root object where you applied theSearchableandNestedSearchableannotationsfetches- fetches joinsentityFieldMap-- Returns:
- list of entities
-
findAllSorted
default List<E> findAllSorted(Map<String, String> filters, @NonNull @NonNull Class<?> domainModelOrEntityType) Mode 1: Search by filters with sorting and without pagination- Parameters:
filters- search filtersdomainModelOrEntityType- the type of the domain object or entity: i.e. the root object where you applied theSearchableandNestedSearchableannotations- Returns:
- list of entities
-
findAllSorted
default List<E> findAllSorted(@NonNull @NonNull JPASearchInput input, @NonNull @NonNull Class<?> domainModelOrEntityType) Mode 2: Search by filters with sorting and without pagination- Parameters:
input- search filtersdomainModelOrEntityType- the type of the domain object or entity: i.e. the root object where you applied theSearchableandNestedSearchableannotations- Returns:
- list of entities
-
findAllSorted
default List<E> findAllSorted(Map<String, String> filters, @NonNull @NonNull Class<?> domainModelOrEntityType, Map<String, jakarta.persistence.criteria.JoinType> fetches) Mode 1: Search by filters with sorting, without pagination and with forced fetched Join.- Parameters:
filters- search filtersdomainModelOrEntityType- the type of the domain object or entity: i.e. the root object where you applied theSearchableandNestedSearchableannotationsfetches- fetches joins- Returns:
- list of entities
-
findAllSorted
default List<E> findAllSorted(@NonNull @NonNull JPASearchInput input, @NonNull @NonNull Class<?> domainModelOrEntityType, Map<String, jakarta.persistence.criteria.JoinType> fetches) Mode 2: Search by filters with sorting, without pagination and with forced fetched Join.- Parameters:
input- search filtersdomainModelOrEntityType- the type of the domain object or entity: i.e. the root object where you applied theSearchableandNestedSearchableannotationsfetches- fetches joins- Returns:
- list of entities
-
findAllSorted
default List<E> findAllSorted(Map<String, String> filters, @NonNull @NonNull Class<?> domainModelOrEntityType, Map<String, jakarta.persistence.criteria.JoinType> fetches, Map<String, String> entityFieldMap) Mode 1: Search by filters with sorting, without pagination, with forced fetched Join and with a map of:- key: domain object field name
- value: entity field name
- Parameters:
filters- search filtersdomainModelOrEntityType- the type of the domain object or entity: i.e. the root object where you applied the Search andNestedSearchableannotationsfetches- fetches joinsentityFieldMap-- Returns:
- list of entities
-
findAllSorted
default List<E> findAllSorted(@NonNull @NonNull JPASearchInput input, @NonNull @NonNull Class<?> domainModelOrEntityType, Map<String, jakarta.persistence.criteria.JoinType> fetches, Map<String, String> entityFieldMap) Mode 2: Search by filters with sorting, without pagination, with forced fetched Join and with a map of:- key: domain object field name
- value: entity field name
- Parameters:
input- search filtersdomainModelOrEntityType- the type of the domain object or entity: i.e. the root object where you applied theSearchableandNestedSearchableannotationsfetches- fetches joinsentityFieldMap-- Returns:
- list of entities
-
findAllWithPaginationAndSorting
default org.springframework.data.domain.Page<E> findAllWithPaginationAndSorting(Map<String, String> filters, @NonNull @NonNull Class<?> domainModelOrEntityType) Mode 1: Search by filters with sorting and pagination- Parameters:
filters- search filtersdomainModelOrEntityType- the type of the domain object or entity: i.e. the root object where you applied theSearchableandNestedSearchableannotations- Returns:
- list of entities of the searched page
-
findAllWithPaginationAndSorting
default org.springframework.data.domain.Page<E> findAllWithPaginationAndSorting(@NonNull @NonNull JPASearchInput input, @NonNull @NonNull Class<?> domainModelOrEntityType) Mode 2: Search by filters with sorting and pagination- Parameters:
input- search filtersdomainModelOrEntityType- the type of the domain object or entity: i.e. the root object where you applied theSearchableandNestedSearchableannotations- Returns:
- list of entities of the searched page
-
findAllWithPaginationAndSorting
default org.springframework.data.domain.Page<E> findAllWithPaginationAndSorting(Map<String, String> filters, @NonNull @NonNull Class<?> domainModelOrEntityType, Map<String, String> entityFieldMap) Mode 1: Search by filters with sorting, pagination and with a map of:- key: domain object field name
- value: entity field name
- Parameters:
filters- search filtersdomainModelOrEntityType- the type of the domain object or entity: i.e. the root object where you applied theSearchableandNestedSearchableannotationsentityFieldMap-- Returns:
- list of entities of the searched page
-
findAllWithPaginationAndSorting
default org.springframework.data.domain.Page<E> findAllWithPaginationAndSorting(@NonNull @NonNull JPASearchInput input, @NonNull @NonNull Class<?> domainModelOrEntityType, Map<String, String> entityFieldMap) Mode 2: Search by filters with sorting, pagination and with a map of:- key: domain object field name
- value: entity field name
- Parameters:
input- search filtersdomainModelOrEntityType- the type of the domain object or entity: i.e. the root object where you applied theSearchableandNestedSearchableannotationsentityFieldMap-- Returns:
- list of entities of the searched page
-
count
Mode 1: Count- Parameters:
filters- search filtersdomainModelOrEntityType- the type of the domain object or entity: i.e. the root object where you applied theSearchableandNestedSearchableannotations- Returns:
- number of results
-
count
Mode 2: Count- Parameters:
input- search filtersdomainModelOrEntityType- the type of the domain object or entity: i.e. the root object where you applied theSearchableandNestedSearchableannotations- Returns:
- number of results
-
count
default long count(Map<String, String> filters, @NonNull @NonNull Class<?> domainModelOrEntityType, Map<String, String> entityFieldMap) Mode 1: Count with a map of:- key: domain object field name
- value: entity field name
- Parameters:
filters- search filtersdomainModelOrEntityType- the type of the domain object or entity: i.e. the root object where you applied theSearchableandNestedSearchableannotationsentityFieldMap-- Returns:
- number of results
-
count
default long count(JPASearchInput input, @NonNull @NonNull Class<?> domainModelOrEntityType, Map<String, String> entityFieldMap) Mode 2: Count with a map of:- key: domain object field name
- value: entity field name
- Parameters:
input- search filtersdomainModelOrEntityType- the type of the domain object or entity: i.e. the root object where you applied theSearchableandNestedSearchableannotationsentityFieldMap-- Returns:
- number of results
-