Class EntityGraphQuerydslRepository<T,ID>
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
FieldsModifier and TypeFieldDescriptionprotected final org.springframework.data.querydsl.QuerydslPredicateExecutor<T> -
Constructor Summary
ConstructorsConstructorDescriptionEntityGraphQuerydslRepository(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 TypeMethodDescriptionlongcount(com.querydsl.core.types.Predicate predicate) booleanexists(com.querydsl.core.types.Predicate predicate) findAll(EntityGraph entityGraph, com.querydsl.core.types.OrderSpecifier<?>... orders) Returns all entities ordered by the givenOrderSpecifiers.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 givenPredicate.findAll(com.querydsl.core.types.Predicate predicate, EntityGraph entityGraph, com.querydsl.core.types.OrderSpecifier<?>... orders) Returns all entities matching the givenPredicateapplying the givenOrderSpecifiers.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 aPageof entities matching the givenPredicate.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 givenPredicateapplying the givenSort.<S extends T,R>
RfindBy(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 givenPredicateor 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, findOneMethods 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, setRepositoryMethodMetadataMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, saveMethods inherited from interface com.cosium.spring.data.jpa.entity.graph.repository.EntityGraphRepository
defaultEntityGraphMethods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getById, getOne, getReferenceById, saveAll, saveAllAndFlush, saveAndFlushMethods inherited from interface org.springframework.data.jpa.repository.JpaSpecificationExecutor
count, exists, findAll, findAll, findAll, findOneMethods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAllMethods 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
Description copied from interface:EntityGraphQuerydslPredicateExecutorReturns a single entity matching the givenPredicateor null if none was found.- Specified by:
findOnein interfaceEntityGraphQuerydslPredicateExecutor<T>- Parameters:
predicate- can be null.entityGraph- can be null.- Returns:
- a single entity matching the given
Predicateor null if none was found.
-
findAll
Description copied from interface:EntityGraphQuerydslPredicateExecutorReturns all entities matching the givenPredicate. In case no match could be found an emptyIterableis returned.- Specified by:
findAllin interfaceEntityGraphQuerydslPredicateExecutor<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:EntityGraphQuerydslPredicateExecutorReturns all entities matching the givenPredicateapplying the givenSort. In case no match could be found an emptyIterableis returned.- Specified by:
findAllin interfaceEntityGraphQuerydslPredicateExecutor<T>- Parameters:
predicate- can be null.sort- theSortspecification 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:EntityGraphQuerydslPredicateExecutorReturns all entities matching the givenPredicateapplying the givenOrderSpecifiers. In case no match could be found an emptyIterableis returned.- Specified by:
findAllin interfaceEntityGraphQuerydslPredicateExecutor<T>- Parameters:
predicate- can be null.entityGraph- can be null.orders- theOrderSpecifiers to sort the results by- Returns:
- all entities matching the given
Predicateapplying the givenOrderSpecifiers.
-
findAll
public Iterable<T> findAll(EntityGraph entityGraph, com.querydsl.core.types.OrderSpecifier<?>... orders) Description copied from interface:EntityGraphQuerydslPredicateExecutorReturns all entities ordered by the givenOrderSpecifiers.- Specified by:
findAllin interfaceEntityGraphQuerydslPredicateExecutor<T>- Parameters:
entityGraph- can be null.orders- theOrderSpecifiers 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:EntityGraphQuerydslPredicateExecutorReturns aPageof entities matching the givenPredicate. In case no match could be found, an emptyPageis returned.- Specified by:
findAllin interfaceEntityGraphQuerydslPredicateExecutor<T>- Parameters:
predicate- can be null.pageable- can be null.entityGraph- can be null.- Returns:
- a
Pageof entities matching the givenPredicate.
-
findOne
- Specified by:
findOnein interfaceorg.springframework.data.querydsl.QuerydslPredicateExecutor<T>
-
findAll
- Specified by:
findAllin interfaceorg.springframework.data.querydsl.QuerydslPredicateExecutor<T>
-
findAll
public Iterable<T> findAll(com.querydsl.core.types.Predicate predicate, org.springframework.data.domain.Sort sort) - Specified by:
findAllin interfaceorg.springframework.data.querydsl.QuerydslPredicateExecutor<T>
-
findAll
public Iterable<T> findAll(com.querydsl.core.types.Predicate predicate, com.querydsl.core.types.OrderSpecifier<?>... orders) - Specified by:
findAllin interfaceorg.springframework.data.querydsl.QuerydslPredicateExecutor<T>
-
findAll
- Specified by:
findAllin interfaceorg.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:
findAllin interfaceorg.springframework.data.querydsl.QuerydslPredicateExecutor<T>
-
count
public long count(com.querydsl.core.types.Predicate predicate) - Specified by:
countin interfaceorg.springframework.data.querydsl.QuerydslPredicateExecutor<T>
-
exists
public boolean exists(com.querydsl.core.types.Predicate predicate) - Specified by:
existsin interfaceorg.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:
findByin interfaceorg.springframework.data.querydsl.QuerydslPredicateExecutor<T>
-