Interface JPASearchRepository<E>

All Superinterfaces:
org.springframework.data.jpa.repository.JpaSpecificationExecutor<E>

public interface JPASearchRepository<E> extends org.springframework.data.jpa.repository.JpaSpecificationExecutor<E>
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.springframework.data.jpa.repository.JpaSpecificationExecutor

    org.springframework.data.jpa.repository.JpaSpecificationExecutor.SpecificationFluentQuery<T extends Object>
  • Method Summary

    Modifier and Type
    Method
    Description
    default long
    count(JPASearchInput input, @NonNull Class<?> domainModelOrEntityType)
    Mode 2: Count
    default long
    count(JPASearchInput input, @NonNull Class<?> domainModelOrEntityType, Map<String,String> entityFieldMap)
    Mode 2: Count with a map of: key: domain object field name value: entity field name
    default long
    count(Map<String,String> filters, @NonNull Class<?> domainModelOrEntityType)
    Mode 1: Count
    default long
    count(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 name
    default List<E>
    findAll(@NonNull JPASearchInput input, @NonNull Class<?> domainModelOrEntityType)
    Mode 2: Search by filters without sorting and pagination
    default List<E>
    findAll(@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.
    default List<E>
    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 name
    default List<E>
    findAll(Map<String,String> filters, @NonNull Class<?> domainModelOrEntityType)
    Mode 1: Search by filters without sorting and pagination
    default List<E>
    findAll(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.
    default List<E>
    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 name
    default List<E>
    findAllSorted(@NonNull JPASearchInput input, @NonNull Class<?> domainModelOrEntityType)
    Mode 2: Search by filters with sorting and without pagination
    default List<E>
    findAllSorted(@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.
    default List<E>
    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 name
    default List<E>
    findAllSorted(Map<String,String> filters, @NonNull Class<?> domainModelOrEntityType)
    Mode 1: Search by filters with sorting and without pagination
    default List<E>
    findAllSorted(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.
    default List<E>
    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 name
    default org.springframework.data.domain.Page<E>
    findAllWithPaginationAndSorting(@NonNull JPASearchInput input, @NonNull Class<?> domainModelOrEntityType)
    Mode 2: Search by filters with sorting and pagination
    default 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 name
    default org.springframework.data.domain.Page<E>
    findAllWithPaginationAndSorting(Map<String,String> filters, @NonNull Class<?> domainModelOrEntityType)
    Mode 1: Search by filters with sorting and pagination
    default 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 name

    Methods inherited from interface org.springframework.data.jpa.repository.JpaSpecificationExecutor

    count, delete, exists, findAll, 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 filters
      domainModelOrEntityType - the type of the domain object or entity: i.e. the root object where you applied the Searchable and NestedSearchable annotations
      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 filters
      domainModelOrEntityType - the type of the domain object or entity: i.e. the root object where you applied the Searchable and NestedSearchable annotations
      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 filters
      domainModelOrEntityType - the type of the domain object or entity: i.e. the root object where you applied the Searchable and NestedSearchable annotations
      fetches - 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 filters
      domainModelOrEntityType - the type of the domain object or entity: i.e. the root object where you applied the Searchable and NestedSearchable annotations
      fetches - 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 filters
      domainModelOrEntityType - the type of the domain object or entity: i.e. the root object where you applied the Searchable and NestedSearchable annotations
      fetches - fetches joins
      entityFieldMap -
      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 filters
      domainModelOrEntityType - the type of the domain object or entity: i.e. the root object where you applied the Searchable and NestedSearchable annotations
      fetches - fetches joins
      entityFieldMap -
      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 filters
      domainModelOrEntityType - the type of the domain object or entity: i.e. the root object where you applied the Searchable and NestedSearchable annotations
      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 filters
      domainModelOrEntityType - the type of the domain object or entity: i.e. the root object where you applied the Searchable and NestedSearchable annotations
      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 filters
      domainModelOrEntityType - the type of the domain object or entity: i.e. the root object where you applied the Searchable and NestedSearchable annotations
      fetches - 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 filters
      domainModelOrEntityType - the type of the domain object or entity: i.e. the root object where you applied the Searchable and NestedSearchable annotations
      fetches - 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 filters
      domainModelOrEntityType - the type of the domain object or entity: i.e. the root object where you applied the Search and NestedSearchable annotations
      fetches - fetches joins
      entityFieldMap -
      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 filters
      domainModelOrEntityType - the type of the domain object or entity: i.e. the root object where you applied the Searchable and NestedSearchable annotations
      fetches - fetches joins
      entityFieldMap -
      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 filters
      domainModelOrEntityType - the type of the domain object or entity: i.e. the root object where you applied the Searchable and NestedSearchable annotations
      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 filters
      domainModelOrEntityType - the type of the domain object or entity: i.e. the root object where you applied the Searchable and NestedSearchable annotations
      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 filters
      domainModelOrEntityType - the type of the domain object or entity: i.e. the root object where you applied the Searchable and NestedSearchable annotations
      entityFieldMap -
      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 filters
      domainModelOrEntityType - the type of the domain object or entity: i.e. the root object where you applied the Searchable and NestedSearchable annotations
      entityFieldMap -
      Returns:
      list of entities of the searched page
    • count

      default long count(Map<String,String> filters, @NonNull @NonNull Class<?> domainModelOrEntityType)
      Mode 1: Count
      Parameters:
      filters - search filters
      domainModelOrEntityType - the type of the domain object or entity: i.e. the root object where you applied the Searchable and NestedSearchable annotations
      Returns:
      number of results
    • count

      default long count(JPASearchInput input, @NonNull @NonNull Class<?> domainModelOrEntityType)
      Mode 2: Count
      Parameters:
      input - search filters
      domainModelOrEntityType - the type of the domain object or entity: i.e. the root object where you applied the Searchable and NestedSearchable annotations
      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 filters
      domainModelOrEntityType - the type of the domain object or entity: i.e. the root object where you applied the Searchable and NestedSearchable annotations
      entityFieldMap -
      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 filters
      domainModelOrEntityType - the type of the domain object or entity: i.e. the root object where you applied the Searchable and NestedSearchable annotations
      entityFieldMap -
      Returns:
      number of results