Interface FederationBatchInfoRepository
-
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<FederationBatchInfo,String>
,org.springframework.data.repository.PagingAndSortingRepository<FederationBatchInfo,String>
,org.springframework.data.repository.Repository<FederationBatchInfo,String>
@Repository public interface FederationBatchInfoRepository extends org.springframework.data.repository.PagingAndSortingRepository<FederationBatchInfo,String>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
countForDate(LocalDate date)
int
countOlderThan(LocalDate date)
void
deleteForDate(LocalDate date)
void
deleteOlderThan(LocalDate date)
List<FederationBatchInfo>
findByStatus(String status)
void
saveDoNothingOnConflict(String batchTag, LocalDate date, String status)
void
saveDoUpdateStatusOnConflict(String batchTag, LocalDate date, String status)
-
-
-
Method Detail
-
saveDoNothingOnConflict
@Modifying @Query("INSERT INTO federation_batch_info (batch_tag, date, status) VALUES (:batchTag, :date, :status) ON CONFLICT DO NOTHING") void saveDoNothingOnConflict(@Param("batchTag") String batchTag, @Param("date") LocalDate date, @Param("status") String status)
-
saveDoUpdateStatusOnConflict
@Modifying @Query("INSERT INTO federation_batch_info (batch_tag, date, status) VALUES (:batchTag, :date, :status) ON CONFLICT (batch_tag) DO UPDATE SET status=:status") void saveDoUpdateStatusOnConflict(@Param("batchTag") String batchTag, @Param("date") LocalDate date, @Param("status") String status)
-
findByStatus
List<FederationBatchInfo> findByStatus(@Param("status") String status)
-
countOlderThan
@Query("SELECT COUNT(*) FROM federation_batch_info WHERE date<:threshold") int countOlderThan(@Param("threshold") LocalDate date)
-
deleteOlderThan
@Modifying @Query("DELETE FROM federation_batch_info WHERE date<:threshold") void deleteOlderThan(@Param("threshold") LocalDate date)
-
countForDate
@Query("SELECT COUNT(*) FROM federation_batch_info WHERE date=:date") int countForDate(@Param("date") LocalDate date)
-
deleteForDate
@Modifying @Query("DELETE FROM federation_batch_info WHERE date=:date") void deleteForDate(@Param("date") LocalDate date)
-
-