Class QueryDslSearchRepositoryImpl<T,​ID extends Serializable>

  • Type Parameters:
    T - the domain class
    ID - the type of the Id of the domain class
    All Implemented Interfaces:
    SearchRepository<T,​ID>, org.springframework.data.jpa.repository.JpaRepository<T,​ID>, org.springframework.data.jpa.repository.JpaSpecificationExecutor<T>, org.springframework.data.jpa.repository.support.JpaRepositoryImplementation<T,​ID>, org.springframework.data.querydsl.QuerydslPredicateExecutor<T>, org.springframework.data.repository.CrudRepository<T,​ID>, org.springframework.data.repository.PagingAndSortingRepository<T,​ID>, org.springframework.data.repository.query.QueryByExampleExecutor<T>, org.springframework.data.repository.Repository<T,​ID>

    public class QueryDslSearchRepositoryImpl<T,​ID extends Serializable>
    extends SearchRepositoryImpl<T,​ID>
    implements org.springframework.data.querydsl.QuerydslPredicateExecutor<T>
    Default QueryDslSearchRepository implementation.
    Use this class as the base class for your QueryDslSearchRepository implementations:
     <repositories base-class="org.appng.persistence.repository.QueryDslSearchRepositoryImpl">
     
    See 4.6.2. Adding custom behavior to all repositories from the reference Documentation for further details.
    Author:
    Matthias Müller
    • Constructor Summary

      Constructors 
      Constructor Description
      QueryDslSearchRepositoryImpl​(Class<T> domainType, javax.persistence.EntityManager entityManager)  
      QueryDslSearchRepositoryImpl​(org.springframework.data.jpa.repository.support.JpaEntityInformation<T,​ID> entityInformation, javax.persistence.EntityManager entityManager)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long count​(com.querydsl.core.types.Predicate predicate)  
      boolean exists​(com.querydsl.core.types.Predicate predicate)  
      Iterable<T> findAll​(com.querydsl.core.types.OrderSpecifier<?>... orders)  
      Iterable<T> findAll​(com.querydsl.core.types.Predicate predicate)  
      Iterable<T> findAll​(com.querydsl.core.types.Predicate predicate, com.querydsl.core.types.OrderSpecifier<?>... orders)  
      org.springframework.data.domain.Page<T> findAll​(com.querydsl.core.types.Predicate predicate, org.springframework.data.domain.Pageable pageable)  
      Iterable<T> findAll​(com.querydsl.core.types.Predicate predicate, org.springframework.data.domain.Sort sort)  
      <S extends T,​R>
      R
      findBy​(com.querydsl.core.types.Predicate predicate, Function<org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<S>,​R> queryFunction)  
      Optional<T> findOne​(com.querydsl.core.types.Predicate predicate)  
      • Methods inherited from class org.springframework.data.jpa.repository.support.SimpleJpaRepository

        count, count, count, delete, deleteAll, deleteAll, deleteAllById, deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteById, exists, exists, existsById, findAll, findAll, findAll, findAll, findAll, findAll, findAll, findAll, findAllById, findBy, findById, findOne, findOne, flush, getById, getCountQuery, getCountQuery, getDomainClass, getQuery, getQuery, getQuery, getQuery, getQueryHints, getReferenceById, getRepositoryMethodMetadata, readPage, readPage, save, saveAll, saveAllAndFlush, saveAndFlush, setEscapeCharacter, setRepositoryMethodMetadata
      • Methods inherited from interface org.springframework.data.repository.CrudRepository

        count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save
      • Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

        deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getById, getReferenceById, saveAll, saveAllAndFlush, saveAndFlush
      • Methods inherited from interface org.springframework.data.jpa.repository.JpaSpecificationExecutor

        count, exists, findAll, findAll, findAll, findOne
      • Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

        count, exists, findAll, findBy, findOne
    • Constructor Detail

      • QueryDslSearchRepositoryImpl

        public QueryDslSearchRepositoryImpl​(org.springframework.data.jpa.repository.support.JpaEntityInformation<T,​ID> entityInformation,
                                            javax.persistence.EntityManager entityManager)
      • QueryDslSearchRepositoryImpl

        public QueryDslSearchRepositoryImpl​(Class<T> domainType,
                                            javax.persistence.EntityManager entityManager)
    • Method Detail

      • findOne

        public Optional<T> findOne​(com.querydsl.core.types.Predicate predicate)
        Specified by:
        findOne in interface org.springframework.data.querydsl.QuerydslPredicateExecutor<T>
      • findAll

        public Iterable<T> findAll​(com.querydsl.core.types.Predicate predicate)
        Specified by:
        findAll in interface org.springframework.data.querydsl.QuerydslPredicateExecutor<T>
      • findAll

        public Iterable<T> findAll​(com.querydsl.core.types.Predicate predicate,
                                   com.querydsl.core.types.OrderSpecifier<?>... orders)
        Specified by:
        findAll in interface org.springframework.data.querydsl.QuerydslPredicateExecutor<T>
      • findAll

        public org.springframework.data.domain.Page<T> findAll​(com.querydsl.core.types.Predicate predicate,
                                                               org.springframework.data.domain.Pageable pageable)
        Specified by:
        findAll in interface org.springframework.data.querydsl.QuerydslPredicateExecutor<T>
      • count

        public long count​(com.querydsl.core.types.Predicate predicate)
        Specified by:
        count in interface org.springframework.data.querydsl.QuerydslPredicateExecutor<T>
      • findAll

        public Iterable<T> findAll​(com.querydsl.core.types.Predicate predicate,
                                   org.springframework.data.domain.Sort sort)
        Specified by:
        findAll in interface org.springframework.data.querydsl.QuerydslPredicateExecutor<T>
      • findAll

        public Iterable<T> findAll​(com.querydsl.core.types.OrderSpecifier<?>... orders)
        Specified by:
        findAll in interface org.springframework.data.querydsl.QuerydslPredicateExecutor<T>
      • exists

        public boolean exists​(com.querydsl.core.types.Predicate predicate)
        Specified by:
        exists in interface org.springframework.data.querydsl.QuerydslPredicateExecutor<T>
      • findBy

        public <S extends T,​R> R findBy​(com.querydsl.core.types.Predicate predicate,
                                              Function<org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<S>,​R> queryFunction)
        Specified by:
        findBy in interface org.springframework.data.querydsl.QuerydslPredicateExecutor<T>