Package com.goodow.realtime.operation.list.json

Examples of com.goodow.realtime.operation.list.json.JsonInsertComponent


    String id = generateObjectId();
    beginCreationCompoundOperation();
    bridge.consumeAndSubmit(new CreateComponent(id, CreateComponent.LIST));
    if (opt_initialValue != null && opt_initialValue.length() > 0) {
      JsonArray values = JsonSerializer.serializeObjects(opt_initialValue);
      JsonInsertComponent op = new JsonInsertComponent(id, 0, values);
      bridge.consumeAndSubmit(op);
    }
    endCompoundOperation();
    return getObject(id);
  }
View Full Code Here


    checkIndex(index, true);
    if (values.length() == 0) {
      return;
    } else {
      JsonArray array = JsonSerializer.serializeObjects(values);
      JsonInsertComponent op = new JsonInsertComponent(id, index, array);
      consumeAndSubmit(op);
    }
  }
View Full Code Here

  OperationComponent<?>[] toInitialization() {
    int length = length();
    OperationComponent<?>[] toRtn = new OperationComponent[1 + (length == 0 ? 0 : 1)];
    toRtn[0] = new CreateComponent(id, CreateComponent.LIST);
    if (length != 0) {
      toRtn[1] = new JsonInsertComponent(id, 0, subValues(0, length));
    }
    return toRtn;
  }
View Full Code Here

TOP

Related Classes of com.goodow.realtime.operation.list.json.JsonInsertComponent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.