Package app.tozzi.repository
Class JPAProjectionRepositoryImpl<E>
java.lang.Object
app.tozzi.repository.JPAProjectionRepositoryImpl<E>
- All Implemented Interfaces:
JPAProjectionRepository<E>
@Component
public class JPAProjectionRepositoryImpl<E>
extends Object
implements JPAProjectionRepository<E>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprojection(@NonNull JPASearchInput input, @NonNull Class<?> domainModelOrEntityType, @NonNull Class<?> entityClass, Map<String, jakarta.persistence.criteria.JoinType> fetches) Mode 2: Projected search by filters without sorting and pagination and with forced fetched Joinprojection(@NonNull JPASearchInput input, @NonNull Class<?> domainModelOrEntityType, @NonNull Class<?> entityClass, Map<String, jakarta.persistence.criteria.JoinType> fetches, Map<String, String> entityFieldMap) Mode 2: Projected search by filters without sorting and pagination, with forced fetched Join and with a map of: key: domain object field name value: entity field nameprojection(@NonNull JPASearchInput input, @NonNull Class<?> domainModelOrEntityType, @NonNull Class<E> entityClass) Mode 2: Projected search by filters without sorting and paginationprojection(@NonNull Map<String, String> filters, @NonNull Class<?> domainModelOrEntityType, @NonNull Class<?> entityClass, Map<String, jakarta.persistence.criteria.JoinType> fetches) Mode 1: Projected search by filters without sorting and pagination and with forced fetched Joinprojection(@NonNull Map<String, String> filters, @NonNull Class<?> domainModelOrEntityType, @NonNull Class<?> entityClass, Map<String, jakarta.persistence.criteria.JoinType> fetches, Map<String, String> entityFieldMap) Mode 1: Projected search by filters without sorting and pagination, with forced fetched Join and with a map of: key: domain object field name value: entity field nameprojection(@NonNull Map<String, String> filters, @NonNull Class<?> domainModelOrEntityType, @NonNull Class<E> entityClass) Mode 1: Projected search by filters without sorting and paginationprojectionClassic(@NonNull JPASearchInput input, @NonNull Class<?> domainModelOrEntityType, @NonNull Class<?> entityClass, Map<String, jakarta.persistence.criteria.JoinType> fetches, Map<String, jakarta.persistence.criteria.JoinType> overrideJoinTypes) Mode 2: Projected search by filters without sorting and pagination and with forced fetched JoinprojectionClassic(@NonNull JPASearchInput input, @NonNull Class<?> domainModelOrEntityType, @NonNull Class<?> entityClass, Map<String, jakarta.persistence.criteria.JoinType> fetches, Map<String, String> entityFieldMap, Map<String, jakarta.persistence.criteria.JoinType> overrideJoinTypes) Mode 2: Projected search by filters without sorting and pagination, with forced fetched Join and with a map of: key: domain object field name value: entity field nameprojectionClassic(@NonNull JPASearchInput input, @NonNull Class<?> domainModelOrEntityType, @NonNull Class<E> entityClass, Map<String, jakarta.persistence.criteria.JoinType> overrideJoinTypes) Mode 2: Projected search by filters without sorting and paginationprojectionClassic(@NonNull Map<String, String> filters, @NonNull Class<?> domainModelOrEntityType, @NonNull Class<?> entityClass, Map<String, jakarta.persistence.criteria.JoinType> fetches, Map<String, jakarta.persistence.criteria.JoinType> overrideJoinTypes) Mode 1: Projected search by filters without sorting and pagination and with forced fetched JoinprojectionClassic(@NonNull Map<String, String> filters, @NonNull Class<?> domainModelOrEntityType, @NonNull Class<?> entityClass, Map<String, jakarta.persistence.criteria.JoinType> fetches, Map<String, String> entityFieldMap, Map<String, jakarta.persistence.criteria.JoinType> overrideJoinTypes) Mode 1: Projected search by filters without sorting and pagination, with forced fetched Join and with a map of: key: domain object field name value: entity field nameprojectionClassic(@NonNull Map<String, String> filters, @NonNull Class<?> domainModelOrEntityType, @NonNull Class<E> entityClass, Map<String, jakarta.persistence.criteria.JoinType> overrideJoinTypes) Mode 1: Projected search by filters without sorting and paginationprojectionWithSorting(@NonNull JPASearchInput input, @NonNull Class<?> domainModelOrEntityType, @NonNull Class<E> entityClass) Mode 2: Projected search by filters with sorting and without paginationprojectionWithSorting(@NonNull Map<String, String> filters, @NonNull Class<?> domainModelOrEntityType, @NonNull Class<E> entityClass) Mode 1: Projected search by filters with sorting and without paginationprojectionWithSortingClassic(@NonNull JPASearchInput input, @NonNull Class<?> domainModelOrEntityType, @NonNull Class<E> entityClass, Map<String, jakarta.persistence.criteria.JoinType> overrideJoinTypes) Mode 2: Projected search by filters with sorting and without paginationprojectionWithSortingClassic(@NonNull Map<String, String> filters, @NonNull Class<?> domainModelOrEntityType, @NonNull Class<E> entityClass, Map<String, jakarta.persistence.criteria.JoinType> overrideJoinTypes) Mode 1: Projected search by filters with sorting and without pagination
-
Constructor Details
-
JPAProjectionRepositoryImpl
public JPAProjectionRepositoryImpl()
-
-
Method Details
-
projection
public List<Map<String,Object>> projection(@NonNull @NonNull Map<String, String> filters, @NonNull @NonNull Class<?> domainModelOrEntityType, @NonNull @NonNull Class<E> entityClass) Description copied from interface:JPAProjectionRepositoryMode 1: Projected search by filters without sorting and pagination- Specified by:
projectionin interfaceJPAProjectionRepository<E>- Parameters:
filters- search filtersdomainModelOrEntityType- the type of the domain object or entity: i.e. the root object where you applied theProjectableandNestedProjectableannotationsentityClass- entity type- Returns:
- list of results in map format whose keys correspond to the values of the entity fields
-
projection
public List<Map<String,Object>> projection(@NonNull @NonNull JPASearchInput input, @NonNull @NonNull Class<?> domainModelOrEntityType, @NonNull @NonNull Class<E> entityClass) Description copied from interface:JPAProjectionRepositoryMode 2: Projected search by filters without sorting and pagination- Specified by:
projectionin interfaceJPAProjectionRepository<E>- Parameters:
input- search filtersdomainModelOrEntityType- the type of the domain object or entity: i.e. the root object where you applied theProjectableandNestedProjectableannotationsentityClass- entity type- Returns:
- list of results in map format whose keys correspond to the values of the entity fields
-
projection
public List<Map<String,Object>> projection(@NonNull @NonNull Map<String, String> filters, @NonNull @NonNull Class<?> domainModelOrEntityType, @NonNull @NonNull Class<?> entityClass, Map<String, jakarta.persistence.criteria.JoinType> fetches) Description copied from interface:JPAProjectionRepositoryMode 1: Projected search by filters without sorting and pagination and with forced fetched Join- Specified by:
projectionin interfaceJPAProjectionRepository<E>- Parameters:
filters- search filtersdomainModelOrEntityType- the type of the domain object or entity: i.e. the root object where you applied theProjectableandNestedProjectableannotationsentityClass- entity typefetches- fetches joins- Returns:
- list of results in map format whose keys correspond to the values of the entity fields
-
projection
public List<Map<String,Object>> projection(@NonNull @NonNull JPASearchInput input, @NonNull @NonNull Class<?> domainModelOrEntityType, @NonNull @NonNull Class<?> entityClass, Map<String, jakarta.persistence.criteria.JoinType> fetches) Description copied from interface:JPAProjectionRepositoryMode 2: Projected search by filters without sorting and pagination and with forced fetched Join- Specified by:
projectionin interfaceJPAProjectionRepository<E>- Parameters:
input- search filtersdomainModelOrEntityType- the type of the domain object or entity: i.e. the root object where you applied theProjectableandNestedProjectableannotationsentityClass- entity typefetches- fetches joins- Returns:
- list of results in map format whose keys correspond to the values of the entity fields
-
projection
public List<Map<String,Object>> projection(@NonNull @NonNull Map<String, String> filters, @NonNull @NonNull Class<?> domainModelOrEntityType, @NonNull @NonNull Class<?> entityClass, Map<String, jakarta.persistence.criteria.JoinType> fetches, Map<String, String> entityFieldMap) Description copied from interface:JPAProjectionRepositoryMode 1: Projected 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
- Specified by:
projectionin interfaceJPAProjectionRepository<E>- Parameters:
filters- search filtersdomainModelOrEntityType- the type of the domain object or entity: i.e. the root object where you applied theProjectableandNestedProjectableannotationsentityClass- entity typefetches- fetches joins- Returns:
- list of results in map format whose keys correspond to the values of the entity fields
-
projection
public List<Map<String,Object>> projection(@NonNull @NonNull JPASearchInput input, @NonNull @NonNull Class<?> domainModelOrEntityType, @NonNull @NonNull Class<?> entityClass, Map<String, jakarta.persistence.criteria.JoinType> fetches, Map<String, String> entityFieldMap) Description copied from interface:JPAProjectionRepositoryMode 2: Projected 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
- Specified by:
projectionin interfaceJPAProjectionRepository<E>- Parameters:
input- search filtersdomainModelOrEntityType- the type of the domain object or entity: i.e. the root object where you applied theProjectableandNestedProjectableannotationsentityClass- entity typefetches- fetches joins- Returns:
- list of results in map format whose keys correspond to the values of the entity fields
-
projectionWithSorting
public List<Map<String,Object>> projectionWithSorting(@NonNull @NonNull Map<String, String> filters, @NonNull @NonNull Class<?> domainModelOrEntityType, @NonNull @NonNull Class<E> entityClass) Description copied from interface:JPAProjectionRepositoryMode 1: Projected search by filters with sorting and without pagination- Specified by:
projectionWithSortingin interfaceJPAProjectionRepository<E>- Parameters:
filters- search filtersdomainModelOrEntityType- the type of the domain object or entity: i.e. the root object where you applied theProjectableandNestedProjectableannotationsentityClass- entity type- Returns:
- list of results in map format whose keys correspond to the values of the entity fields
-
projectionWithSorting
public List<Map<String,Object>> projectionWithSorting(@NonNull @NonNull JPASearchInput input, @NonNull @NonNull Class<?> domainModelOrEntityType, @NonNull @NonNull Class<E> entityClass) Description copied from interface:JPAProjectionRepositoryMode 2: Projected search by filters with sorting and without pagination- Specified by:
projectionWithSortingin interfaceJPAProjectionRepository<E>- Parameters:
input- search filtersdomainModelOrEntityType- the type of the domain object or entity: i.e. the root object where you applied theProjectableandNestedProjectableannotationsentityClass- entity type- Returns:
- list of results in map format whose keys correspond to the values of the entity fields
-
projectionClassic
public List<Map<String,Object>> projectionClassic(@NonNull @NonNull Map<String, String> filters, @NonNull @NonNull Class<?> domainModelOrEntityType, @NonNull @NonNull Class<E> entityClass, Map<String, jakarta.persistence.criteria.JoinType> overrideJoinTypes) Description copied from interface:JPAProjectionRepositoryMode 1: Projected search by filters without sorting and pagination- Specified by:
projectionClassicin interfaceJPAProjectionRepository<E>- Parameters:
filters- search filtersdomainModelOrEntityType- the type of the domain object or entity: i.e. the root object where you applied theProjectableandNestedProjectableannotationsentityClass- entity typeoverrideJoinTypes- the only relationships for which you want to change the Join type- Returns:
- list of results in map format whose keys correspond to the values of the entity fields
-
projectionClassic
public List<Map<String,Object>> projectionClassic(@NonNull @NonNull JPASearchInput input, @NonNull @NonNull Class<?> domainModelOrEntityType, @NonNull @NonNull Class<E> entityClass, Map<String, jakarta.persistence.criteria.JoinType> overrideJoinTypes) Description copied from interface:JPAProjectionRepositoryMode 2: Projected search by filters without sorting and pagination- Specified by:
projectionClassicin interfaceJPAProjectionRepository<E>- Parameters:
input- search filtersdomainModelOrEntityType- the type of the domain object or entity: i.e. the root object where you applied theProjectableandNestedProjectableannotationsentityClass- entity typeoverrideJoinTypes- the only relationships for which you want to change the Join type- Returns:
- list of results in map format whose keys correspond to the values of the entity fields
-
projectionClassic
public List<Map<String,Object>> projectionClassic(@NonNull @NonNull Map<String, String> filters, @NonNull @NonNull Class<?> domainModelOrEntityType, @NonNull @NonNull Class<?> entityClass, Map<String, jakarta.persistence.criteria.JoinType> fetches, Map<String, jakarta.persistence.criteria.JoinType> overrideJoinTypes) Description copied from interface:JPAProjectionRepositoryMode 1: Projected search by filters without sorting and pagination and with forced fetched Join- Specified by:
projectionClassicin interfaceJPAProjectionRepository<E>- Parameters:
filters- search filtersdomainModelOrEntityType- the type of the domain object or entity: i.e. the root object where you applied theProjectableandNestedProjectableannotationsentityClass- entity typefetches- fetches joinsoverrideJoinTypes- the only relationships for which you want to change the Join type- Returns:
- list of results in map format whose keys correspond to the values of the entity fields
-
projectionClassic
public List<Map<String,Object>> projectionClassic(@NonNull @NonNull JPASearchInput input, @NonNull @NonNull Class<?> domainModelOrEntityType, @NonNull @NonNull Class<?> entityClass, Map<String, jakarta.persistence.criteria.JoinType> fetches, Map<String, jakarta.persistence.criteria.JoinType> overrideJoinTypes) Description copied from interface:JPAProjectionRepositoryMode 2: Projected search by filters without sorting and pagination and with forced fetched Join- Specified by:
projectionClassicin interfaceJPAProjectionRepository<E>- Parameters:
input- search filtersdomainModelOrEntityType- the type of the domain object or entity: i.e. the root object where you applied theProjectableandNestedProjectableannotationsentityClass- entity typefetches- fetches joinsoverrideJoinTypes- the only relationships for which you want to change the Join type- Returns:
- list of results in map format whose keys correspond to the values of the entity fields
-
projectionClassic
public List<Map<String,Object>> projectionClassic(@NonNull @NonNull Map<String, String> filters, @NonNull @NonNull Class<?> domainModelOrEntityType, @NonNull @NonNull Class<?> entityClass, Map<String, jakarta.persistence.criteria.JoinType> fetches, Map<String, String> entityFieldMap, Map<String, jakarta.persistence.criteria.JoinType> overrideJoinTypes) Description copied from interface:JPAProjectionRepositoryMode 1: Projected 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
- Specified by:
projectionClassicin interfaceJPAProjectionRepository<E>- Parameters:
filters- search filtersdomainModelOrEntityType- the type of the domain object or entity: i.e. the root object where you applied theProjectableandNestedProjectableannotationsentityClass- entity typefetches- fetches joinsoverrideJoinTypes- the only relationships for which you want to change the Join type- Returns:
- list of results in map format whose keys correspond to the values of the entity fields
-
projectionClassic
public List<Map<String,Object>> projectionClassic(@NonNull @NonNull JPASearchInput input, @NonNull @NonNull Class<?> domainModelOrEntityType, @NonNull @NonNull Class<?> entityClass, Map<String, jakarta.persistence.criteria.JoinType> fetches, Map<String, String> entityFieldMap, Map<String, jakarta.persistence.criteria.JoinType> overrideJoinTypes) Description copied from interface:JPAProjectionRepositoryMode 2: Projected 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
- Specified by:
projectionClassicin interfaceJPAProjectionRepository<E>- Parameters:
input- search filtersdomainModelOrEntityType- the type of the domain object or entity: i.e. the root object where you applied theProjectableandNestedProjectableannotationsentityClass- entity typefetches- fetches joinsoverrideJoinTypes- the only relationships for which you want to change the Join type- Returns:
- list of results in map format whose keys correspond to the values of the entity fields
-
projectionWithSortingClassic
public List<Map<String,Object>> projectionWithSortingClassic(@NonNull @NonNull Map<String, String> filters, @NonNull @NonNull Class<?> domainModelOrEntityType, @NonNull @NonNull Class<E> entityClass, Map<String, jakarta.persistence.criteria.JoinType> overrideJoinTypes) Description copied from interface:JPAProjectionRepositoryMode 1: Projected search by filters with sorting and without pagination- Specified by:
projectionWithSortingClassicin interfaceJPAProjectionRepository<E>- Parameters:
filters- search filtersdomainModelOrEntityType- the type of the domain object or entity: i.e. the root object where you applied theProjectableandNestedProjectableannotationsentityClass- entity typeoverrideJoinTypes- the only relationships for which you want to change the Join type- Returns:
- list of results in map format whose keys correspond to the values of the entity fields
-
projectionWithSortingClassic
public List<Map<String,Object>> projectionWithSortingClassic(@NonNull @NonNull JPASearchInput input, @NonNull @NonNull Class<?> domainModelOrEntityType, @NonNull @NonNull Class<E> entityClass, Map<String, jakarta.persistence.criteria.JoinType> overrideJoinTypes) Description copied from interface:JPAProjectionRepositoryMode 2: Projected search by filters with sorting and without pagination- Specified by:
projectionWithSortingClassicin interfaceJPAProjectionRepository<E>- Parameters:
input- search filtersdomainModelOrEntityType- the type of the domain object or entity: i.e. the root object where you applied theProjectableandNestedProjectableannotationsentityClass- entity typeoverrideJoinTypes- the only relationships for which you want to change the Join type- Returns:
- list of results in map format whose keys correspond to the values of the entity fields
-