Interface ChangeOperationResult


public interface ChangeOperationResult
A single change result which was applied on an object. See the following operations to obtain the relevant constant values in order to extract the data from the change operation
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
    }
  }
  //...
}

Since:
9.7
Author:
eitany
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns this change operation
    Returns the result of this change operation an a specific entry
  • Method Details

    • getOperation

      ChangeOperation getOperation()
      Returns this change operation
    • getResult

      Serializable getResult()
      Returns the result of this change operation an a specific entry