RED-6777: Reordered parameters for consistency
This commit is contained in:
parent
d1b250f450
commit
ca6f3f54f2
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user