Interface SpringDataJpaIdempotentProcessingRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<IdempotentProcessing,,IdempotentProcessingIdentity> org.springframework.data.jpa.repository.JpaRepository<IdempotentProcessing,,IdempotentProcessingIdentity> org.springframework.data.repository.ListCrudRepository<IdempotentProcessing,,IdempotentProcessingIdentity> org.springframework.data.repository.ListPagingAndSortingRepository<IdempotentProcessing,,IdempotentProcessingIdentity> org.springframework.data.repository.PagingAndSortingRepository<IdempotentProcessing,,IdempotentProcessingIdentity> org.springframework.data.repository.query.QueryByExampleExecutor<IdempotentProcessing>,org.springframework.data.repository.Repository<IdempotentProcessing,IdempotentProcessingIdentity>
@Repository
public interface SpringDataJpaIdempotentProcessingRepository
extends org.springframework.data.jpa.repository.JpaRepository<IdempotentProcessing,IdempotentProcessingIdentity>
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionintcountCreatedAtBefore(ZonedDateTime createdBefore) intcreateIfNotExists(String idempotenceId, String idempotenceIdContext, ZonedDateTime createdAt) voiddeleteByCreatedAtBefore(ZonedDateTime createdBefore) 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, findOne
-
Field Details
-
FROM_IDEMPOTENT_PROCESSING_WHERE_CREATED_AT_BEFORE
- See Also:
-
-
Method Details
-
createIfNotExists
@Transactional @Modifying @Query(nativeQuery=true, value="INSERT INTO idempotent_processing (idempotence_id, idempotence_id_context, created_at) SELECT ?1, ?2, ?3 WHERE NOT EXISTS (SELECT * FROM idempotent_processing WHERE idempotence_id = ?1 AND idempotence_id_context = ?2)") int createIfNotExists(String idempotenceId, String idempotenceIdContext, ZonedDateTime createdAt) -
deleteByCreatedAtBefore
@Transactional @Modifying @Query(nativeQuery=true, value="DELETE FROM idempotent_processing ip WHERE ip.created_at < :createdBefore") void deleteByCreatedAtBefore(@Param("createdBefore") ZonedDateTime createdBefore) -
countCreatedAtBefore
@Transactional(readOnly=true) @Query(nativeQuery=true, value="SELECT count(*) FROM idempotent_processing ip WHERE ip.created_at < :createdBefore") int countCreatedAtBefore(@Param("createdBefore") ZonedDateTime createdBefore)
-