Package org.apache.metamodel

Examples of org.apache.metamodel.UpdateableDataContext.executeUpdate()


    final List<Object[]> values = source.getValues();

    assertEquals(3, values.size());

    intercepted.executeUpdate(new UpdateScript() {
      @Override
      public void run(UpdateCallback callback) {
        callback.insertInto("schema.table").value(0, 1).value(1, "2")
            .execute();
        callback.insertInto("schema.table").value(0, 3).value(1, "4")
View Full Code Here


        assertEquals(Integer.class, ds.getRow().getValue(0).getClass());
        assertEquals(3, ds.getRow().getValue(0));
        assertFalse(ds.next());
        ds.close();

        dc.executeUpdate(new UpdateScript() {
            @Override
            public void run(UpdateCallback callback) {
                callback.insertInto(table).value("foo", 4).value("bar", "mrrrrh").execute();
            }
        });
View Full Code Here

        assertEquals(2, ds.getRow().getValue(0));
        assertTrue(ds.next());
        assertEquals(3, ds.getRow().getValue(0));
        assertFalse(ds.next());

        dc.executeUpdate(new UpdateScript() {
            @Override
            public void run(UpdateCallback callback) {
                callback.insertInto(table).value("foo", 4).value("bar", "heidiho!").execute();
            }
        });
View Full Code Here

        assertEquals(4, physicalValuesList.size());
        for (Object[] physicalValues : physicalValuesList) {
            assertEquals("foo is expected to be string", String.class, physicalValues[0].getClass());
        }
       
        dc.executeUpdate(new UpdateScript() {
            @Override
            public void run(UpdateCallback callback) {
                callback.insertInto(table).value("foo", 5).value("bar", "hejsa...").execute();
                callback.update(table).where("foo").lessThan(3).value("foo", 100).execute();
            }
View Full Code Here

        final UpdateableDataContext delegate = (UpdateableDataContext) _delegate;

        if (_tableCreationInterceptors.isEmpty() && _tableDropInterceptors.isEmpty()
                && _rowInsertionInterceptors.isEmpty() && _rowUpdationInterceptors.isEmpty()
                && _rowDeletionInterceptors.isEmpty()) {
            delegate.executeUpdate(update);
            return;
        }

        UpdateScript interceptableUpdateScript = new InterceptableUpdateScript(this, update,
                _tableCreationInterceptors, _tableDropInterceptors, _rowInsertionInterceptors,
View Full Code Here

        }

        UpdateScript interceptableUpdateScript = new InterceptableUpdateScript(this, update,
                _tableCreationInterceptors, _tableDropInterceptors, _rowInsertionInterceptors,
                _rowUpdationInterceptors, _rowDeletionInterceptors);
        delegate.executeUpdate(interceptableUpdateScript);
    }

    @Override
    public Query parseQuery(String queryString) throws MetaModelException {
        return _delegate.parseQuery(queryString);
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.