public interface ChangeOperationResult
IncrementOperation
AddToCollectionOperation
AddAllToCollectionOperation
RemoveFromCollectionOperation
PutInMapOperation
RemoveFromMapOperation
SetOperation
UnsetOperation
ChangeResult changeResult = gigaSpace.change(new SQLQuery(MyPojo.class,
"someField = 'someValue'),
new ChangeSet().increment("counterField",
1), ChangeModifiers.RETURN_DETAILED_RESULTS)
for (ChangedEntryDetails changeEntryDetails : changeResult.getResults()) {
List operations = changeEntryDetails.getChangeOperationsResults();
for(ChangeOperationResult operationResult : operations) {
if (IncrementOperation.represents(operationResult.getOperation()) {
String path = IncrementOperation.getPath(operationResult.getOperation());
Number delta = IncrementOperation.getDelta(operationResult.getOperation());
Number result = IncrementOperation.getNewValue(operationResult);
// ... do something with the result, path and delta
}
}
//...
}
Modifier and Type | Method and Description |
---|---|
ChangeOperation |
getOperation()
Returns this change operation
|
Serializable |
getResult()
Returns the result of this change operation an a specific entry
|
ChangeOperation getOperation()
Serializable getResult()
Copyright © GigaSpaces.