java.lang.Object
org.springframework.data.jpa.repository.support.SimpleJpaRepository<T,ID>
com.cosium.spring.data.jpa.entity.graph.repository.support.EntityGraphSimpleJpaRepository<T,ID>
com.cosium.spring.data.jpa.entity.graph.repository.support.EntityGraphQuerydslRepository<T,ID>
All Implemented Interfaces:
EntityGraphCrudRepository<T,ID>, EntityGraphJpaRepository<T,ID>, EntityGraphJpaSpecificationExecutor<T>, EntityGraphPagingAndSortingRepository<T,ID>, EntityGraphQueryByExampleExecutor<T>, EntityGraphQuerydslPredicateExecutor<T>, EntityGraphRepository<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 EntityGraphQuerydslRepository<T,ID> extends EntityGraphSimpleJpaRepository<T,ID> implements EntityGraphQuerydslPredicateExecutor<T>
A QuerydslPredicateExecutor that supports EntityGraph passed through method arguments.
Author:
Reda.Housni-Alaoui
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final org.springframework.data.querydsl.QuerydslPredicateExecutor<T>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    EntityGraphQuerydslRepository(org.springframework.data.jpa.repository.support.JpaEntityInformation<T,?> entityInformation, javax.persistence.EntityManager entityManager)
     
    EntityGraphQuerydslRepository(org.springframework.data.jpa.repository.support.JpaEntityInformation<T,?> entityInformation, javax.persistence.EntityManager entityManager, org.springframework.data.querydsl.EntityPathResolver resolver, org.springframework.data.jpa.repository.support.CrudMethodMetadata metadata)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    count(com.querydsl.core.types.Predicate predicate)
     
    boolean
    exists(com.querydsl.core.types.Predicate predicate)
     
    findAll(EntityGraph entityGraph, com.querydsl.core.types.OrderSpecifier<?>... orders)
    Returns all entities ordered by the given OrderSpecifiers.
    findAll(com.querydsl.core.types.OrderSpecifier<?>... orders)
     
    findAll(com.querydsl.core.types.Predicate predicate)
     
    findAll(com.querydsl.core.types.Predicate predicate, EntityGraph entityGraph)
    Returns all entities matching the given Predicate.
    findAll(com.querydsl.core.types.Predicate predicate, EntityGraph entityGraph, com.querydsl.core.types.OrderSpecifier<?>... orders)
    Returns all entities matching the given Predicate applying the given OrderSpecifiers.
    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)
     
    org.springframework.data.domain.Page<T>
    findAll(com.querydsl.core.types.Predicate predicate, org.springframework.data.domain.Pageable pageable, EntityGraph entityGraph)
    Returns a Page of entities matching the given Predicate.
    findAll(com.querydsl.core.types.Predicate predicate, org.springframework.data.domain.Sort sort)
     
    findAll(com.querydsl.core.types.Predicate predicate, org.springframework.data.domain.Sort sort, EntityGraph entityGraph)
    Returns all entities matching the given Predicate applying the given Sort.
    <S extends T, R>
    R
    findBy(com.querydsl.core.types.Predicate predicate, Function<org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<S>,R> queryFunction)
     
    findOne(com.querydsl.core.types.Predicate predicate)
     
    findOne(com.querydsl.core.types.Predicate predicate, EntityGraph entityGraph)
    Returns a single entity matching the given Predicate or null if none was found.

    Methods inherited from class com.cosium.spring.data.jpa.entity.graph.repository.support.EntityGraphSimpleJpaRepository

    findAll, findAll, findAll, findAll, findAll, findAll, findAll, findAll, findAll, findAllById, findById, findOne, findOne

    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, findAll, findAllById, findBy, findById, findOne, findOne, flush, getById, getCountQuery, getCountQuery, getDomainClass, getOne, getQuery, getQuery, getQuery, getQuery, getQueryHints, getReferenceById, getRepositoryMethodMetadata, readPage, readPage, save, saveAll, saveAllAndFlush, saveAndFlush, setEscapeCharacter, setRepositoryMethodMetadata

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.springframework.data.repository.CrudRepository

    count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save

    Methods inherited from interface com.cosium.spring.data.jpa.entity.graph.repository.EntityGraphRepository

    defaultEntityGraph

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

    deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getById, getOne, 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.PagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

    count, exists, findAll, findBy, findOne
  • Field Details

    • querydslJpaRepositoryDelegate

      protected final org.springframework.data.querydsl.QuerydslPredicateExecutor<T> querydslJpaRepositoryDelegate
  • Constructor Details

    • EntityGraphQuerydslRepository

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

      public EntityGraphQuerydslRepository(org.springframework.data.jpa.repository.support.JpaEntityInformation<T,?> entityInformation, javax.persistence.EntityManager entityManager, org.springframework.data.querydsl.EntityPathResolver resolver, @Nullable org.springframework.data.jpa.repository.support.CrudMethodMetadata metadata)
  • Method Details

    • findOne

      public Optional<T> findOne(com.querydsl.core.types.Predicate predicate, EntityGraph entityGraph)
      Description copied from interface: EntityGraphQuerydslPredicateExecutor
      Returns a single entity matching the given Predicate or null if none was found.
      Specified by:
      findOne in interface EntityGraphQuerydslPredicateExecutor<T>
      Parameters:
      predicate - can be null.
      entityGraph - can be null.
      Returns:
      a single entity matching the given Predicate or null if none was found.
    • findAll

      public Iterable<T> findAll(com.querydsl.core.types.Predicate predicate, EntityGraph entityGraph)
      Description copied from interface: EntityGraphQuerydslPredicateExecutor
      Returns all entities matching the given Predicate. In case no match could be found an empty Iterable is returned.
      Specified by:
      findAll in interface EntityGraphQuerydslPredicateExecutor<T>
      Parameters:
      predicate - can be null.
      entityGraph - can be null.
      Returns:
      all entities matching the given Predicate.
    • findAll

      public Iterable<T> findAll(com.querydsl.core.types.Predicate predicate, org.springframework.data.domain.Sort sort, EntityGraph entityGraph)
      Description copied from interface: EntityGraphQuerydslPredicateExecutor
      Returns all entities matching the given Predicate applying the given Sort. In case no match could be found an empty Iterable is returned.
      Specified by:
      findAll in interface EntityGraphQuerydslPredicateExecutor<T>
      Parameters:
      predicate - can be null.
      sort - the Sort specification to sort the results by, must not be null.
      entityGraph - can be null.
      Returns:
      all entities matching the given Predicate.
    • findAll

      public Iterable<T> findAll(com.querydsl.core.types.Predicate predicate, EntityGraph entityGraph, com.querydsl.core.types.OrderSpecifier<?>... orders)
      Description copied from interface: EntityGraphQuerydslPredicateExecutor
      Returns all entities matching the given Predicate applying the given OrderSpecifiers. In case no match could be found an empty Iterable is returned.
      Specified by:
      findAll in interface EntityGraphQuerydslPredicateExecutor<T>
      Parameters:
      predicate - can be null.
      entityGraph - can be null.
      orders - the OrderSpecifiers to sort the results by
      Returns:
      all entities matching the given Predicate applying the given OrderSpecifiers.
    • findAll

      public Iterable<T> findAll(EntityGraph entityGraph, com.querydsl.core.types.OrderSpecifier<?>... orders)
      Description copied from interface: EntityGraphQuerydslPredicateExecutor
      Returns all entities ordered by the given OrderSpecifiers.
      Specified by:
      findAll in interface EntityGraphQuerydslPredicateExecutor<T>
      Parameters:
      entityGraph - can be null.
      orders - the OrderSpecifiers to sort the results by.
      Returns:
      all entities ordered by the given OrderSpecifiers.
    • findAll

      public org.springframework.data.domain.Page<T> findAll(com.querydsl.core.types.Predicate predicate, org.springframework.data.domain.Pageable pageable, EntityGraph entityGraph)
      Description copied from interface: EntityGraphQuerydslPredicateExecutor
      Returns a Page of entities matching the given Predicate. In case no match could be found, an empty Page is returned.
      Specified by:
      findAll in interface EntityGraphQuerydslPredicateExecutor<T>
      Parameters:
      predicate - can be null.
      pageable - can be null.
      entityGraph - can be null.
      Returns:
      a Page of entities matching the given Predicate.
    • 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, 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.Predicate predicate, com.querydsl.core.types.OrderSpecifier<?>... orders)
      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>
    • 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>
    • 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>