Class JpaSearchExecutor<T>

java.lang.Object
net.croz.nrich.search.repository.JpaSearchExecutor<T>
All Implemented Interfaces:
net.croz.nrich.search.api.repository.SearchExecutor<T>

@Transactional(readOnly=true) public class JpaSearchExecutor<T> extends Object implements net.croz.nrich.search.api.repository.SearchExecutor<T>
  • Constructor Summary

    Constructors
    Constructor
    Description
    JpaSearchExecutor(jakarta.persistence.EntityManager entityManager, org.springframework.data.jpa.repository.support.JpaEntityInformation<T,?> entityInformation)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <R, P> long
    count(R request, net.croz.nrich.search.api.model.SearchConfiguration<T,P,R> searchConfiguration)
     
    <R, P> boolean
    exists(R request, net.croz.nrich.search.api.model.SearchConfiguration<T,P,R> searchConfiguration)
     
    <R, P> List<P>
    findAll(R request, net.croz.nrich.search.api.model.SearchConfiguration<T,P,R> searchConfiguration)
     
    <R, P> org.springframework.data.domain.Page<P>
    findAll(R request, net.croz.nrich.search.api.model.SearchConfiguration<T,P,R> searchConfiguration, org.springframework.data.domain.Pageable pageable)
     
    <R, P> List<P>
    findAll(R request, net.croz.nrich.search.api.model.SearchConfiguration<T,P,R> searchConfiguration, org.springframework.data.domain.Sort sort)
     
    <R, P> Optional<P>
    findOne(R request, net.croz.nrich.search.api.model.SearchConfiguration<T,P,R> searchConfiguration)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JpaSearchExecutor

      public JpaSearchExecutor(jakarta.persistence.EntityManager entityManager, org.springframework.data.jpa.repository.support.JpaEntityInformation<T,?> entityInformation)
  • Method Details

    • findOne

      public <R, P> Optional<P> findOne(R request, net.croz.nrich.search.api.model.SearchConfiguration<T,P,R> searchConfiguration)
      Specified by:
      findOne in interface net.croz.nrich.search.api.repository.SearchExecutor<T>
    • findAll

      public <R, P> List<P> findAll(R request, net.croz.nrich.search.api.model.SearchConfiguration<T,P,R> searchConfiguration)
      Specified by:
      findAll in interface net.croz.nrich.search.api.repository.SearchExecutor<T>
    • findAll

      public <R, P> List<P> findAll(R request, net.croz.nrich.search.api.model.SearchConfiguration<T,P,R> searchConfiguration, org.springframework.data.domain.Sort sort)
      Specified by:
      findAll in interface net.croz.nrich.search.api.repository.SearchExecutor<T>
    • findAll

      public <R, P> org.springframework.data.domain.Page<P> findAll(R request, net.croz.nrich.search.api.model.SearchConfiguration<T,P,R> searchConfiguration, org.springframework.data.domain.Pageable pageable)
      Specified by:
      findAll in interface net.croz.nrich.search.api.repository.SearchExecutor<T>
    • count

      public <R, P> long count(R request, net.croz.nrich.search.api.model.SearchConfiguration<T,P,R> searchConfiguration)
      Specified by:
      count in interface net.croz.nrich.search.api.repository.SearchExecutor<T>
    • exists

      public <R, P> boolean exists(R request, net.croz.nrich.search.api.model.SearchConfiguration<T,P,R> searchConfiguration)
      Specified by:
      exists in interface net.croz.nrich.search.api.repository.SearchExecutor<T>