Examples of InsertOperation


Examples of ch.uzh.ifi.seal.changedistiller.treedifferencing.operation.InsertOperation

                // ii. Append INS((w, a, v(x)), z, k) to E, for a new identifier w.
                w = (Node) x.clone();
                w.enableMatched();
                x.enableMatched();
                TreeEditOperation insert = new InsertOperation(w, z, k);
                fEditScript.add(insert);

                // iii. Add (w, x) to M' and apply INS((w, a, v(x)), z, k) to T1
                addMatchToPrimes(x, w);
                insert.apply();

                // (c) else if x is not a root (x has a partner in M')
            } else if (!x.isRoot()) {
                // i.
                // Let w be the partner of x in M'
View Full Code Here

Examples of ch.uzh.ifi.seal.changedistiller.treedifferencing.operation.InsertOperation

        Node methodInvocation = addToRight(METHOD_INVOCATION, "foo.bar();");
        createEditScript();
        assertThat(fEditScript.size(), is(1));
        TreeEditOperation operation = fEditScript.get(0);
        assertThat(operation.getOperationType(), is(OperationType.INSERT));
        InsertOperation insert = (InsertOperation) operation;
        assertThat(insert.getParentNode(), is(fRootLeft));
        assertThat(insert.getNodeToInsert().getLabel(), is(methodInvocation.getLabel()));
        assertThat(insert.getNodeToInsert().getValue(), is(methodInvocation.getValue()));
    }
View Full Code Here

Examples of ch.uzh.ifi.seal.changedistiller.treedifferencing.operation.InsertOperation

    createEditScript();
   
    assertThat(fEditScript.size(), is(2));
    TreeEditOperation firstOperation = fEditScript.get(0);
    assertThat(firstOperation.getOperationType(), is(OperationType.INSERT));
    InsertOperation firstInsert = (InsertOperation) firstOperation;
    assertThat(firstInsert.getNodeToInsert().getLabel(), is(outerTryRight.getLabel()));
    assertThat(firstInsert.getNodeToInsert().getValue(), is(outerTryRight.getValue()));

    TreeEditOperation secondOperation = fEditScript.get(1);
    assertThat(secondOperation.getOperationType(), is(OperationType.INSERT));
    InsertOperation insert = (InsertOperation) secondOperation;
    assertThat(insert.getNodeToInsert().getLabel(), is(innerTryRight.getLabel()));
    assertThat(insert.getNodeToInsert().getValue(), is(innerTryRight.getValue()));
   
    assertThat(((Node)insert.getNodeToInsert().getParent()).getLabel(), is(innerTryRight.getLabel()));
    assertThat(((Node)insert.getNodeToInsert().getParent()).getValue(), is(innerTryRight.getValue()));
  }
View Full Code Here

Examples of de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.InsertOperation

        if ((replacedText.length() > 0) && (text.length() == 0)) {
            return new DeleteOperation(offset, replacedText);
        }
        // insert activityDataObject
        if ((replacedText.length() == 0) && (text.length() > 0)) {
            return new InsertOperation(offset, text);
        }
        // replace operation has to be split into delete and insert operation
        if ((replacedText.length() > 0) && (text.length() > 0)) {
            return new SplitOperation(
                new DeleteOperation(offset, replacedText), new InsertOperation(
                    offset, text));
        }

        // Cannot happen
        assert false;
View Full Code Here

Examples of de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.InsertOperation

            return new DeleteOperation(offset, replacedText);
        }

        // insert activityDataObject
        if ((replacedText.length() == 0) && (text.length() > 0)) {
            return new InsertOperation(offset, text);
        }

        // replace operation has to be split into delete and insert operation
        if ((replacedText.length() > 0) && (text.length() > 0)) {
            return new SplitOperation(
                new DeleteOperation(offset, replacedText), new InsertOperation(
                    offset, text));
        }

        // Cannot happen
        assert false;
View Full Code Here

Examples of org.eclipse.persistence.internal.xr.InsertOperation

                    Result result2 = new CollectionResult();
                    result2.setType(theInstanceType);
                    findAllOperation.setResult(result2);
                    findAllOperation.setQueryHandler(nqh2);
                    xrServiceModel.getOperations().put(findAllOperation.getName(), findAllOperation);
                    InsertOperation insertOperation = new InsertOperation();
                    insertOperation.setName(CREATE_OPERATION_NAME + "_" + tablenameAlias);
                    Parameter theInstance = new Parameter();
                    theInstance.setName(THE_INSTANCE_NAME);
                    theInstance.setType(theInstanceType);
                    insertOperation.getParameters().add(theInstance);
                    xrServiceModel.getOperations().put(insertOperation.getName(), insertOperation);
                    UpdateOperation updateOperation = new UpdateOperation();
                    updateOperation.setName(UPDATE_OPERATION_NAME + "_" + tablenameAlias);
                    updateOperation.getParameters().add(theInstance);
                    xrServiceModel.getOperations().put(updateOperation.getName(), updateOperation);
                    DeleteOperation deleteOperation = new DeleteOperation();
View Full Code Here

Examples of org.eclipse.persistence.internal.xr.InsertOperation

                    Result result2 = new CollectionResult();
                    result2.setType(theInstanceType);
                    findAllOperation.setResult(result2);
                    findAllOperation.setQueryHandler(nqh2);
                    xrServiceModel.getOperations().put(findAllOperation.getName(), findAllOperation);
                    InsertOperation insertOperation = new InsertOperation();
                    insertOperation.setName(CREATE_OPERATION_NAME + "_" + tablenameAlias);
                    Parameter theInstance = new Parameter();
                    theInstance.setName(THE_INSTANCE_NAME);
                    theInstance.setType(theInstanceType);
                    insertOperation.getParameters().add(theInstance);
                    xrServiceModel.getOperations().put(insertOperation.getName(), insertOperation);
                    UpdateOperation updateOperation = new UpdateOperation();
                    updateOperation.setName(UPDATE_OPERATION_NAME + "_" + tablenameAlias);
                    updateOperation.getParameters().add(theInstance);
                    xrServiceModel.getOperations().put(updateOperation.getName(), updateOperation);
                    DeleteOperation deleteOperation = new DeleteOperation();
View Full Code Here

Examples of org.eclipse.persistence.internal.xr.InsertOperation

                    Result result2 = new CollectionResult();
                    result2.setType(theInstanceType);
                    findAllOperation.setResult(result2);
                    findAllOperation.setQueryHandler(nqh2);
                    xrServiceModel.getOperations().put(findAllOperation.getName(), findAllOperation);
                    InsertOperation insertOperation = new InsertOperation();
                    insertOperation.setName(CREATE_OPERATION_NAME + "_" + tablenameAlias);
                    Parameter theInstance = new Parameter();
                    theInstance.setName(THE_INSTANCE_NAME);
                    theInstance.setType(theInstanceType);
                    insertOperation.getParameters().add(theInstance);
                    xrServiceModel.getOperations().put(insertOperation.getName(), insertOperation);
                    UpdateOperation updateOperation = new UpdateOperation();
                    updateOperation.setName(UPDATE_OPERATION_NAME + "_" + tablenameAlias);
                    updateOperation.getParameters().add(theInstance);
                    xrServiceModel.getOperations().put(updateOperation.getName(), updateOperation);
                    DeleteOperation deleteOperation = new DeleteOperation();
View Full Code Here

Examples of org.openengsb.core.edbi.jdbc.operation.InsertOperation

        List models = new ArrayList<>();

        models.add(new TestModel("A", 42));
        models.add(new TestModel("B", -42));

        InsertOperation operation = new InsertOperation(commit, testIndex, models);

        engine.execute(operation);

        try (ResultSet rs = connection.createStatement().executeQuery("SELECT * FROM HISTORY_TABLE")) {
            assertTrue(rs.next());
View Full Code Here

Examples of org.openengsb.core.edbi.jdbc.operation.InsertOperation

        List<OpenEngSBModel> list = new ArrayList<>();

        list.add((OpenEngSBModel) testModelA);
        list.add((OpenEngSBModel) testModelB);

        engine.execute(new InsertOperation(commit, testIndex, list));

        testModelB.setTestInteger(43);

        IndexCommit updateCommit = mock(IndexCommit.class);
        when(updateCommit.getTimestamp()).thenReturn(new Date(84));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.