Package org.openengsb.core.api.model

Examples of org.openengsb.core.api.model.QueryRequest.addParameter()


        commit.insert(v3);
        commit.insert(v4);
        commit.insert(v5);
        db.commit(commit);
        QueryRequest request = QueryRequest.create().orJoined();
        request.addParameter("Cow", "Milk");
        assertThat(db.query(request).size(), is(2));
        request.addParameter("Cow", "Steak");
        assertThat(db.query(request).size(), is(3));
        request.addParameter("Animal", "Dog");
        assertThat(db.query(request).size(), is(4));
View Full Code Here


        commit.insert(v5);
        db.commit(commit);
        QueryRequest request = QueryRequest.create().orJoined();
        request.addParameter("Cow", "Milk");
        assertThat(db.query(request).size(), is(2));
        request.addParameter("Cow", "Steak");
        assertThat(db.query(request).size(), is(3));
        request.addParameter("Animal", "Dog");
        assertThat(db.query(request).size(), is(4));
        request.removeParameter("Cow");
        assertThat(db.query(request).size(), is(3));
View Full Code Here

        QueryRequest request = QueryRequest.create().orJoined();
        request.addParameter("Cow", "Milk");
        assertThat(db.query(request).size(), is(2));
        request.addParameter("Cow", "Steak");
        assertThat(db.query(request).size(), is(3));
        request.addParameter("Animal", "Dog");
        assertThat(db.query(request).size(), is(4));
        request.removeParameter("Cow");
        assertThat(db.query(request).size(), is(3));
        request.addParameter("Cow", "Milk").addParameter("House", "Garden");
        assertThat(db.query(request).size(), is(5));
View Full Code Here

        assertThat(db.query(request).size(), is(3));
        request.addParameter("Animal", "Dog");
        assertThat(db.query(request).size(), is(4));
        request.removeParameter("Cow");
        assertThat(db.query(request).size(), is(3));
        request.addParameter("Cow", "Milk").addParameter("House", "Garden");
        assertThat(db.query(request).size(), is(5));
    }

    @Test
    public void testIfContextSpecificQueriesWork_shouldReturnCorrectObjects() throws Exception {
View Full Code Here

        commit = getEDBCommit();
        commit.insert(v3);
        commit.insert(v4);
        db.commit(commit);
        QueryRequest request = QueryRequest.create().orJoined();
        request.addParameter("Animal", "Dog");
        assertThat(db.query(request).size(), is(2));
        request.setContextId("/test");
        List<EDBObject> result = db.query(request);
        assertThat(result.size(), is(1));
        assertThat(result.get(0).getOID(), is("/test/query/15/2"));
View Full Code Here

        }
        JPACommit commit = dao.getJPACommit(revision.toString());
        QueryRequest request =
            QueryRequest.create().deleted().orJoined();
        for (String oid : commit.getDeletions()) {
            request.addParameter("oid", oid);
        }
        List<JPAObject> deletedObjects = dao.query(request);
        performDeleteLogic(commit, deletedObjects);
    }
}
View Full Code Here

        QueryRequest request = QueryRequest.create();
        for (String element : elements) {
            String[] parts = StringUtils.split(element, ":", 2);
            parts[0] = parts[0].replace("\\", "\\\\");
            parts[1] = parts[1].replace("\\", "\\\\");
            request.addParameter(parts[0], parts[1].substring(1, parts[1].length() - 1));
        }
        return request;
    }

    /**
 
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.