SEBSERV-398 add transaction rollback to delete function
This commit is contained in:
parent
f191d59495
commit
a34cc8c667
1 changed files with 2 additions and 2 deletions
|
@ -265,7 +265,7 @@ public class ConfigurationNodeDAOImpl implements ConfigurationNodeDAO {
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public Result<Collection<EntityKey>> delete(final Set<EntityKey> all) {
|
public Result<Collection<EntityKey>> delete(final Set<EntityKey> all) {
|
||||||
return Result.tryCatch(() -> {
|
return Result.<Collection<EntityKey>>tryCatch(() -> {
|
||||||
|
|
||||||
final List<Long> ids = extractListOfPKs(all);
|
final List<Long> ids = extractListOfPKs(all);
|
||||||
|
|
||||||
|
@ -306,7 +306,7 @@ public class ConfigurationNodeDAOImpl implements ConfigurationNodeDAO {
|
||||||
return ids.stream()
|
return ids.stream()
|
||||||
.map(id -> new EntityKey(id, EntityType.CONFIGURATION_NODE))
|
.map(id -> new EntityKey(id, EntityType.CONFIGURATION_NODE))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
});
|
}).onError(TransactionHandler::rollback);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleConfigTemplateDeletion(final List<Long> configurationIds) {
|
private void handleConfigTemplateDeletion(final List<Long> configurationIds) {
|
||||||
|
|
Loading…
Reference in a new issue