RED-6777: Reordered parameters for consistency

This commit is contained in:
Viktor Seifert 2023-05-22 16:12:35 +02:00
parent d1b250f450
commit ca6f3f54f2
8 changed files with 13 additions and 13 deletions

View File

@ -38,9 +38,9 @@ public class EntryPersistenceService {
public void deleteEntries(String typeId, Set<String> values, long version, DictionaryEntryType dictionaryEntryType) {
switch (dictionaryEntryType) {
case ENTRY -> entryRepository.deleteAllByTypeIdAndVersionAndValueIn(typeId, version, values);
case FALSE_POSITIVE -> falsePositiveEntryRepository.deleteAllByTypeIdAndVersionAndValueIn(typeId, version, values);
case FALSE_RECOMMENDATION -> falseRecommendationEntryRepository.deleteAllByTypeIdAndVersionAndValueIn(typeId, version, values);
case ENTRY -> entryRepository.deleteAllByTypeIdAndVersionAndValueIn(typeId, values, version);
case FALSE_POSITIVE -> falsePositiveEntryRepository.deleteAllByTypeIdAndVersionAndValueIn(typeId, values, version);
case FALSE_RECOMMENDATION -> falseRecommendationEntryRepository.deleteAllByTypeIdAndVersionAndValueIn(typeId, values, version);
}
}

View File

@ -8,6 +8,6 @@ public interface EntryRepositoryCustom {
List<String> undeleteEntries(String typeId, Set<String> entries, long version);
void deleteAllByTypeIdAndVersionAndValueIn(String typeId, long version, Set<String> entries);
void deleteAllByTypeIdAndVersionAndValueIn(String typeId, Set<String> entries, long version);
}

View File

@ -27,9 +27,9 @@ public class EntryRepositoryImpl implements EntryRepositoryCustom {
@Override
public void deleteAllByTypeIdAndVersionAndValueIn(String typeId, long version, Set<String> entries) {
public void deleteAllByTypeIdAndVersionAndValueIn(String typeId, Set<String> entries, long version) {
queryExecutor.runDeleteQueryInBatches(typeId, version, entries, TABLE_NAME);
queryExecutor.runDeleteQueryInBatches(typeId, entries, version, TABLE_NAME);
}
}

View File

@ -8,6 +8,6 @@ public interface FalsePositiveEntryRepositoryCustom {
List<String> undeleteEntries(String typeId, Set<String> entries, long version);
void deleteAllByTypeIdAndVersionAndValueIn(String typeId, long version, Set<String> entries);
void deleteAllByTypeIdAndVersionAndValueIn(String typeId, Set<String> entries, long version);
}

View File

@ -27,9 +27,9 @@ class FalsePositiveEntryRepositoryImpl implements FalsePositiveEntryRepositoryCu
@Override
public void deleteAllByTypeIdAndVersionAndValueIn(String typeId, long version, Set<String> entries) {
public void deleteAllByTypeIdAndVersionAndValueIn(String typeId, Set<String> entries, long version) {
queryExecutor.runDeleteQueryInBatches(typeId, version, entries, TABLE_NAME);
queryExecutor.runDeleteQueryInBatches(typeId, entries, version, TABLE_NAME);
}
}

View File

@ -8,6 +8,6 @@ public interface FalseRecommendationEntryRepositoryCustom {
List<String> undeleteEntries(String typeId, Set<String> entries, long version);
void deleteAllByTypeIdAndVersionAndValueIn(String typeId, long version, Set<String> entries);
void deleteAllByTypeIdAndVersionAndValueIn(String typeId, Set<String> entries, long version);
}

View File

@ -27,9 +27,9 @@ class FalseRecommendationEntryRepositoryImpl implements FalseRecommendationEntry
@Override
public void deleteAllByTypeIdAndVersionAndValueIn(String typeId, long version, Set<String> entries) {
public void deleteAllByTypeIdAndVersionAndValueIn(String typeId, Set<String> entries, long version) {
queryExecutor.runDeleteQueryInBatches(typeId, version, entries, TABLE_NAME);
queryExecutor.runDeleteQueryInBatches(typeId, entries, version, TABLE_NAME);
}
}

View File

@ -116,7 +116,7 @@ class QueryExecutor {
@Transactional
public void runDeleteQueryInBatches(String typeId, long version, Set<String> entries, String tableName) {
public void runDeleteQueryInBatches(String typeId, Set<String> entries, long version, String tableName) {
runUpdateQueryInBatches(typeId, entries, version, tableName, true, false);
}