Package org.openengsb.core.ekb.api

Examples of org.openengsb.core.ekb.api.EKBCommit


        child11.setSubModel(leaf.getModel());
        child1.setChildren(child1Children);
        root.setChildren(rootChildren);

        EKBCommit commit = getTestEKBCommit().addInsert(root.getModel());
        persist.commit(commit);

        // test
        commit = getTestEKBCommit().addDelete(root.getModel());
        persist.commit(commit);
View Full Code Here


    public void testModelTailIsLoaded_shouldLoadModelTail() throws Exception {
        TestModelDecorator model = getTestModelDecorator();
        model.setEdbId("modeltailtest/1");
        model.setName("blub");

        EKBCommit commit = getTestEKBCommit().addInsert(model.getModel());
        persist.commit(commit);

        ModelWrapper result = ModelWrapper.wrap(query.getModel(getTestModel(), getModelOid("modeltailtest/1")));
        Boolean versionPresent = result.retrieveInternalModelVersion() != null;
        assertThat(versionPresent, is(true));
View Full Code Here

    public void testIfModelMetaDataRetrievingWorks_shouldWork() throws Exception {
        TestModelDecorator model = getTestModelDecorator();
        model.setName("blub");
        model.setEdbId("modelmetatest/1");

        EKBCommit commit = getTestEKBCommit().addInsert(model.getModel());
        persist.commit(commit);
        ModelWrapper wrapper = ModelWrapper.wrap(query.getModel(getTestModel(), getModelOid("modelmetatest/1")));
        assertThat(wrapper.toOpenEngSBModelEntries(), notNullValue());
        assertThat(wrapper.retrieveInternalModelId(), notNullValue());
        assertThat(wrapper.retrieveInternalModelVersion(), notNullValue());
View Full Code Here

        SubModelDecorator sub = getSubModelDecorator();
        sub.setName("test");
        sub.setEdbId("submodeltest/1/1");
        model.setSubModel(sub.getModel());

        EKBCommit commit = getTestEKBCommit().addInsert(model.getModel());
        persist.commit(commit);
        model = loadTestModel("submodeltest/1");
        assertThat(model.getModel(), notNullValue());
        sub = new SubModelDecorator(model.getSubModel());
        assertThat(sub.getModel(), notNullValue());
View Full Code Here

        sub.setName("test2");
        sub.setEdbId("submodeltest/2/2");
        subs.add(sub.getModel());
        model.setSubs(subs);

        EKBCommit commit = getTestEKBCommit().addInsert(model.getModel());
        persist.commit(commit);
        model = loadTestModel("submodeltest/2");
        assertThat(model.getModel(), notNullValue());
        assertThat(model.getSubs(), notNullValue());
        assertThat(model.getSubs().get(0), notNullValue());
View Full Code Here

        SubModelDecorator sub = getSubModelDecorator();
        sub.setName("test");
        sub.setEdbId("submodeltest/3/1");
        model.setSubModel(sub.getModel());

        EKBCommit commit = getTestEKBCommit().addInsert(model.getModel());
        persist.commit(commit);

        sub.setName("updated");
        commit = getTestEKBCommit().addUpdate(model.getModel());
        persist.commit(commit);
View Full Code Here

        sub.setName("test2");
        sub.setEdbId("submodeltest/4/2");
        subs.add(sub.getModel());
        model.setSubs(subs);

        EKBCommit commit = getTestEKBCommit().addInsert(model.getModel());
        persist.commit(commit);

        subs.clear();
        sub = getSubModelDecorator();
        sub.setName("updatedtest1");
View Full Code Here

        SubModelDecorator sub = getSubModelDecorator();
        sub.setName("test");
        sub.setEdbId("submodeltest/5/1");
        model.setSubModel(sub.getModel());

        EKBCommit commit = getTestEKBCommit().addInsert(model.getModel());
        persist.commit(commit);
        commit = getTestEKBCommit().addDelete(model.getModel());
        persist.commit(commit);

        EDBObject testModel = edbService.getObject(getModelOid("submodeltest/5"));
View Full Code Here

        sub.setName("test2");
        sub.setEdbId("submodeltest/6/2");
        subs.add(sub.getModel());
        model.setSubs(subs);

        EKBCommit commit = getTestEKBCommit().addInsert(model.getModel());
        persist.commit(commit);
        commit = getTestEKBCommit().addDelete(model.getModel());
        persist.commit(commit);

        EDBObject testModel = edbService.getObject(getModelOid("submodeltest/6"));
View Full Code Here

        SubModelDecorator sub = getSubModelDecorator();
        sub.setName("test");
        sub.setEdbId("submodeltest/7/1");
        model.setSubModel(sub.getModel());

        EKBCommit commit = getTestEKBCommit().addInsert(model.getModel());
        persist.commit(commit);
        Thread.sleep(5);

        sub.setName("test2");
        commit = getTestEKBCommit().addUpdate(sub.getModel());
View Full Code Here

TOP

Related Classes of org.openengsb.core.ekb.api.EKBCommit

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.