[New] implemented a TransactionResult

This allows reflecting on actual changes performed by the transaction if
this is needed by the caller. One use case would be to perform observer
updates after a transaction was completed.
This commit is contained in:
Robert von Burg 2013-11-14 21:29:45 +01:00
parent 2665aa31b6
commit 23d8a1e0ce
2 changed files with 8 additions and 7 deletions

View File

@ -1,5 +1,6 @@
package ch.eitchnet.xmlpers.api;
import java.util.ArrayList;
import java.util.List;
public class ModificationResult {
@ -9,6 +10,13 @@ public class ModificationResult {
private final List<?> updated;
private final List<?> deleted;
public ModificationResult(String key) {
this.key = key;
this.created = new ArrayList<>();
this.updated = new ArrayList<>();
this.deleted = new ArrayList<>();
}
public ModificationResult(String key, List<?> created, List<?> updated, List<?> deleted) {
this.key = key;
this.created = created;

View File

@ -108,13 +108,6 @@ public class TransactionResult {
this.closeDuration = closeDuration;
}
/**
* @return the modificationByKey
*/
public Map<String, ModificationResult> getModificationByKey() {
return this.modificationByKey;
}
/**
* @param modificationByKey
* the modificationByKey to set