private void handleOperations(OUpdateExecutionPlan plan, OCommandContext ctx, List<OUpdateOperations> ops, boolean profilingEnabled) {
if (ops != null) {
for (OUpdateOperations op : ops) {
switch (op.getType()) {
case OUpdateOperations.TYPE_SET:
plan.chain(new UpdateSetStep(op.getUpdateItems(), ctx, profilingEnabled));
if(updateEdge){
plan.chain(new UpdateEdgePointersStep( ctx, profilingEnabled));
}
break;
case OUpdateOperations.TYPE_REMOVE:
plan.chain(new UpdateRemoveStep(op.getUpdateRemoveItems(), ctx, profilingEnabled));
break;
case OUpdateOperations.TYPE_MERGE:
plan.chain(new UpdateMergeStep(op.getJson(), ctx, profilingEnabled));
break;
case OUpdateOperations.TYPE_CONTENT:
plan.chain(new UpdateContentStep(op.getJson(), ctx, profilingEnabled));
break;
case OUpdateOperations.TYPE_PUT:
case OUpdateOperations.TYPE_INCREMENT:
case OUpdateOperations.TYPE_ADD:
throw new OCommandExecutionException("Cannot execute with UPDATE PUT/ADD/INCREMENT new executor: " + op);
}
}
}
}