Interface RequestSnapshotRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<RequestSnapshot,,RequestSnapshotKey> org.springframework.data.jpa.repository.JpaRepository<RequestSnapshot,,RequestSnapshotKey> org.springframework.data.repository.PagingAndSortingRepository<RequestSnapshot,,RequestSnapshotKey> org.springframework.data.repository.query.QueryByExampleExecutor<RequestSnapshot>,org.springframework.data.repository.Repository<RequestSnapshot,RequestSnapshotKey>
public interface RequestSnapshotRepository
extends org.springframework.data.jpa.repository.JpaRepository<RequestSnapshot,RequestSnapshotKey>
-
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteAllBySessionIdAndRequestIdIn(UUID sessionId, List<UUID> requestId) voiddeleteBySessionIdAndRequestId(UUID sessionId, UUID requestId) findAllByCreatedWhenDifferenceGreaterThanReferenceDate(Date referenceDate, Long expirationPeriod) 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, findAll, findAll, findAllById, flush, getById, getOne, getReferenceById, saveAll, saveAllAndFlush, saveAndFlushMethods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOne
-
Method Details
-
findAllByCreatedWhenDifferenceGreaterThanReferenceDate
@Query(value="SELECT session_id FROM request_snapshots e WHERE ABS(EXTRACT(EPOCH FROM :referenceDate - e.created_when)) > :expirationPeriod", nativeQuery=true) List<RequestSnapshotKey> findAllByCreatedWhenDifferenceGreaterThanReferenceDate(@Param("referenceDate") Date referenceDate, @Param("expirationPeriod") Long expirationPeriod) -
deleteAllBySessionIdAndRequestIdIn
-
deleteBySessionIdAndRequestId
-