Interface AdminJpaRepository<T extends org.springframework.data.domain.Persistable<?>,I,Q extends com.querydsl.core.types.EntityPath<?>>
- Type Parameters:
T- persistable entityI- key typeQ- 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 TypeMethodDescriptiondefault voidRetrieves 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, saveMethods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlushMethods inherited from interface org.springframework.data.repository.ListCrudRepository
findAll, findAllById, saveAllMethods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOneMethods inherited from interface org.springframework.data.querydsl.QuerydslPredicateExecutor
count, exists, findAll, findAll, findAll, findAll, findAll, findBy, findOne
-
Method Details
-
findFirstByOrderByIdAsc
Retrieves the first entity by id in database.- Returns:
- the first entity in database Optional#empty() if none found
- Throws:
IllegalArgumentException- ifidis null.
-
findFirstByOrderByIdDesc
Retrieves the last entity by id in database.- Returns:
- the first entity in database Optional#empty() if none found
- Throws:
IllegalArgumentException- ifidis null.
-
findFirstByIdGreaterThanOrderByIdAsc
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- ifidis null.
-
findFirstByIdLessThanOrderByIdDesc
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- ifidis null.
-
customize
- Specified by:
customizein interfaceorg.springframework.data.querydsl.binding.QuerydslBinderCustomizer<T extends org.springframework.data.domain.Persistable<?>>
-