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
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    int
    createIfNotExists(String idempotenceId, String idempotenceIdContext, ZonedDateTime createdAt)
     
    void
     

    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
  • Field Details

    • FROM_IDEMPOTENT_PROCESSING_WHERE_CREATED_AT_BEFORE

      static final String 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)