Interface TestDataUploadRepository
-
- All Superinterfaces:
org.springframework.data.repository.Repository<FederationUploadKey,Long>
@Repository @Profile("testdata") public interface TestDataUploadRepository extends org.springframework.data.repository.Repository<FederationUploadKey,Long>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
applyRetentionToTestKeys(int retention)
Integer
countPendingKeys()
void
storeUploadKey(byte[] keyData, int rollingStartIntervalNumber, int rollingPeriod, long submissionTimestamp, int transmissionRisk, String originCountry, String[] visitedCountries, String reportType, int daysSinceOnsetOfSymptoms, boolean consentToFederation)
-
-
-
Method Detail
-
storeUploadKey
@Modifying @Query("INSERT INTO federation_upload_key (key_data, rolling_start_interval_number, rolling_period, submission_timestamp, transmission_risk_level, origin_country, visited_countries, report_type, days_since_onset_of_symptoms, consent_to_federation) VALUES (:keyData, :rollingStartIntervalNumber, :rollingPeriod, :submissionTimestamp, :transmissionRisk, :origin_country, :visited_countries, :report_type, :days_since_onset_of_symptoms, :consent_to_federation) ON CONFLICT DO NOTHING") void storeUploadKey(@Param("keyData") byte[] keyData, @Param("rollingStartIntervalNumber") int rollingStartIntervalNumber, @Param("rollingPeriod") int rollingPeriod, @Param("submissionTimestamp") long submissionTimestamp, @Param("transmissionRisk") int transmissionRisk, @Param("origin_country") String originCountry, @Param("visited_countries") String[] visitedCountries, @Param("report_type") String reportType, @Param("days_since_onset_of_symptoms") int daysSinceOnsetOfSymptoms, @Param("consent_to_federation") boolean consentToFederation)
-
countPendingKeys
@Query("SELECT COUNT(*) FROM federation_upload_key WHERE batch_tag IS NULL") Integer countPendingKeys()
-
applyRetentionToTestKeys
@Modifying @Query("DELETE FROM federation_upload_key WHERE rolling_start_interval_number<=:retention") void applyRetentionToTestKeys(@Param("retention") int retention)
-
-