Package eu.dnetlib.app.directindex.repo
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 Summary
Modifier and TypeMethodDescriptionlonglonglongcountByOperation(OperationType operation) longvoiddeleteByCreationDateBefore(LocalDateTime datatime) voidvoidresetExecution(String id) voidMethods 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
-
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
-
resetAllExecutions
@Modifying @Query(value="update pending_actions set execution_date = null", nativeQuery=true) void resetAllExecutions() -
resetExecutionsAfterCreationDate
@Modifying @Query(value="update pending_actions set execution_date = null where creation_date > ?1", nativeQuery=true) void resetExecutionsAfterCreationDate() -
resetExecution
@Modifying @Query(value="update pending_actions set execution_date = null where id = ?1", nativeQuery=true) void resetExecution(String id) -
countByExecutionDateIsNull
long countByExecutionDateIsNull() -
countByOperation
-
countByOperationAndExecutionDateIsNull
-
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()
-