Interface AdminJpaRepository<T extends org.springframework.data.domain.Persistable<?>,I,Q extends com.querydsl.core.types.EntityPath<?>>

Type Parameters:
T - persistable entity
I - key type
Q - query dsl generated class corespondint to entity
All Superinterfaces:
org.springframework.data.repository.CrudRepository<T,I>, org.springframework.data.jpa.repository.JpaRepository<T,I>, org.springframework.data.repository.ListCrudRepository<T,I>, org.springframework.data.repository.ListPagingAndSortingRepository<T,I>, org.springframework.data.repository.PagingAndSortingRepository<T,I>, org.springframework.data.repository.query.QueryByExampleExecutor<T>, org.springframework.data.querydsl.binding.QuerydslBinderCustomizer<Q>, org.springframework.data.querydsl.QuerydslPredicateExecutor<T>, org.springframework.data.repository.Repository<T,I>

@NoRepositoryBean public interface AdminJpaRepository<T extends org.springframework.data.domain.Persistable<?>,I,Q extends com.querydsl.core.types.EntityPath<?>> extends org.springframework.data.jpa.repository.JpaRepository<T,I>, org.springframework.data.querydsl.QuerydslPredicateExecutor<T>, org.springframework.data.querydsl.binding.QuerydslBinderCustomizer<Q>
extended jpa repository interface with search and navigation functionality.
Author:
Manfred Tremmel
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    customize(org.springframework.data.querydsl.binding.QuerydslBindings bindings, Q root)
     
    Retrieves the next entity by its id.
    Retrieves the previous entity by its id.
    Retrieves the first entity by id in database.
    Retrieves the last entity by id in database.

    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, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush

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

    findAll, findAllById, saveAll

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

    findAll

    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

    Methods inherited from interface org.springframework.data.querydsl.QuerydslPredicateExecutor

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

    • findFirstByOrderByIdAsc

      Optional<T> findFirstByOrderByIdAsc()
      Retrieves the first entity by id in database.
      Returns:
      the first entity in database Optional#empty() if none found
      Throws:
      IllegalArgumentException - if id is null.
    • findFirstByOrderByIdDesc

      Optional<T> findFirstByOrderByIdDesc()
      Retrieves the last entity by id in database.
      Returns:
      the first entity in database Optional#empty() if none found
      Throws:
      IllegalArgumentException - if id is null.
    • findFirstByIdGreaterThanOrderByIdAsc

      Optional<T> findFirstByIdGreaterThanOrderByIdAsc(I id)
      Retrieves the next entity by its id.
      Parameters:
      id - must not be null.
      Returns:
      the entity with the lowest id which is higher then the given id or Optional#empty() if none found
      Throws:
      IllegalArgumentException - if id is null.
    • findFirstByIdLessThanOrderByIdDesc

      Optional<T> findFirstByIdLessThanOrderByIdDesc(I id)
      Retrieves the previous entity by its id.
      Parameters:
      id - must not be null.
      Returns:
      the entity with the highest id which is lower then the given id or Optional#empty() if none found
      Throws:
      IllegalArgumentException - if id is null.
    • customize

      default void customize(org.springframework.data.querydsl.binding.QuerydslBindings bindings, Q root)
      Specified by:
      customize in interface org.springframework.data.querydsl.binding.QuerydslBinderCustomizer<T extends org.springframework.data.domain.Persistable<?>>