Interface PendingActionRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<PendingAction,String>, org.springframework.data.jpa.repository.JpaRepository<PendingAction,String>, org.springframework.data.repository.PagingAndSortingRepository<PendingAction,String>, org.springframework.data.repository.query.QueryByExampleExecutor<PendingAction>, org.springframework.data.repository.Repository<PendingAction,String>

@Repository public interface PendingActionRepository extends org.springframework.data.jpa.repository.JpaRepository<PendingAction,String>
  • Method Details

    • findInsertOrUpdateOperations

      @Query(value="select * from pending_actions where execution_date is null and (upper(operation) = \'INSERT\' or upper(operation) = \'UPDATE\')", nativeQuery=true) List<PendingAction> findInsertOrUpdateOperations()
    • findDeleteOperations

      @Query(value="select * from pending_actions where execution_date is null and upper(operation) = \'DELETE\'", nativeQuery=true) List<PendingAction> findDeleteOperations()
    • deleteByCreationDateBefore

      void deleteByCreationDateBefore(LocalDateTime datatime)
    • resetAllExecutions

      @Modifying @Query(value="update pending_actions set execution_date = null", nativeQuery=true) void resetAllExecutions()
    • resetExecutionsForAllTypes

      @Modifying @Query(value="update pending_actions set execution_date = null where creation_date > ? and body::::jsonb->>\'collectedFromId\'::::text = ?", nativeQuery=true) void resetExecutionsForAllTypes(LocalDateTime dt, String dsId)
    • resetExecutionsForType

      @Modifying @Query(value="update pending_actions set execution_date = null where creation_date > ? and body::::jsonb->>\'collectedFromId\'::::text = ? and type = ?", nativeQuery=true) void resetExecutionsForType(LocalDateTime dt, String dsId, String type)
    • resetExecutionForId

      @Modifying @Query(value="update pending_actions set execution_date = null where id = ?", nativeQuery=true) void resetExecutionForId(String id)
    • countByExecutionDateIsNull

      long countByExecutionDateIsNull()
    • countByOperation

      long countByOperation(OperationType operation)
    • countByOperationAndExecutionDateIsNull

      long countByOperationAndExecutionDateIsNull(OperationType operation)
    • findMinCreationDate

      @Query(value="select min(creation_date) from pending_actions", nativeQuery=true) LocalDateTime findMinCreationDate()
    • findMaxCreationDate

      @Query(value="select max(creation_date) from pending_actions", nativeQuery=true) LocalDateTime findMaxCreationDate()
    • findMinExecutionDate

      @Query(value="select min(execution_date) from pending_actions", nativeQuery=true) LocalDateTime findMinExecutionDate()
    • findMaxExecutionDate

      @Query(value="select max(execution_date) from pending_actions", nativeQuery=true) LocalDateTime findMaxExecutionDate()
    • countByErrorIsNotNull

      long countByErrorIsNotNull()
    • deleteObsoleteRecords

      @Modifying @Query(value="delete from pending_actions where EXTRACT(DAY from now()-creation_date) > ?", nativeQuery=true) void deleteObsoleteRecords(int maxNumberOfDays)