Examples of executeUpdate()


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

Examples of org.apache.metamodel.jdbc.JdbcDataContext.executeUpdate()

        JdbcDataContext dc = new JdbcDataContext(connection);
        final Schema schema = dc.getSchemaByName("Person");
        assertEquals("Person", schema.getName());

        dc.executeUpdate(new UpdateScript() {
            @Override
            public void run(UpdateCallback cb) {
                Table table = cb.createTable(schema, "test_table").withColumn("id").asPrimaryKey()
                        .ofType(ColumnType.INTEGER).withColumn("birthdate").ofType(ColumnType.DATE).execute();
View Full Code Here

Examples of org.apache.olio.workload.loader.framework.ThreadConnection.executeUpdate()

             logger.fine("before updating socialEventID");            
            
             c.prepareStatement("INSERT INTO ID_GEN " +
                    "(GEN_KEY, GEN_VALUE) " +
                    "VALUES ('SOCIAL_EVENT_ID', "+ ScaleFactors.events +1 + ")");
             c.executeUpdate();                         
            
            /*
             c.prepareStatement("update ID_GEN set GEN_VALUE = " +
                    "(select count(*) +1 from SOCIALEVENT) " +
                    "where GEN_KEY='SOCIAL_EVENT_ID'");
View Full Code Here

Examples of org.apache.oozie.service.JPAService.executeUpdate()

    @Override
    public int executeUpdate(SLARegQuery namedQuery, SLARegistrationBean jobBean) throws JPAExecutorException {
        JPAService jpaService = Services.get().get(JPAService.class);
        EntityManager em = jpaService.getEntityManager();
        Query query = getUpdateQuery(namedQuery, jobBean, em);
        int ret = jpaService.executeUpdate(namedQuery.name(), query, em);
        return ret;
    }

    @Override
    public SLARegistrationBean get(SLARegQuery namedQuery, Object... parameters) throws JPAExecutorException {
View Full Code Here

Examples of org.apache.openjpa.persistence.OpenJPAQuery.executeUpdate()

            OpenJPAEntityManager pm = getPM();
            startTx(pm);
            String delete =
                "DELETE FROM RuntimeTest1 r WHERE r.stringField = \'testSimple2\'";
            OpenJPAQuery deleteQuery = pm.createQuery(delete);
            int deleted = deleteQuery.executeUpdate();
            endTx(pm);
            endEm(pm);

            pm = getPM();
            startTx(pm);
View Full Code Here

Examples of org.apache.tapestry.contrib.jdbc.IStatement.executeUpdate()

        {
            connection = getConnection();

            statement = assembly.createStatement(connection);

            statement.executeUpdate();

            statement.close();
            statement = null;

            connection.close();
View Full Code Here

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

          parentFile.mkdirs();
        }
        dataContext = new CsvDataContext(file, getConfiguration(separatorChar, quoteChar));

        final Schema schema = dataContext.getDefaultSchema();
        dataContext.executeUpdate(new UpdateScript() {
          @Override
          public void run(UpdateCallback callback) {
            TableCreationBuilder tableBuilder = callback.createTable(schema, "table");
            for (String header : headers) {
              tableBuilder.withColumn(header);
View Full Code Here

Examples of org.g4studio.core.orm.xibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate()

        resetKeyValueOnFailure = true;
      }

      StatementScope statementScope = beginStatementScope(sessionScope, ms);
      try {
        ms.executeUpdate(statementScope, trans, param);
      } catch (SQLException e) {
        // uh-oh, the insert failed, so if we set the reset flag
        // earlier, we'll put the old value
        // back...
        if (resetKeyValueOnFailure)
View Full Code Here

Examples of org.h2.command.Command.executeUpdate()

    private void closeSession() {
        if (session != null) {
            try {
                Command rollback = session.prepareLocal("ROLLBACK");
                rollback.executeUpdate();
            } catch (Exception e) {
                server.traceError(e);
            }
            try {
                session.close();
View Full Code Here

Examples of org.h2.command.CommandInterface.executeUpdate()

            if (isDebugEnabled()) {
                debugCodeAssign("Savepoint", TraceObject.SAVEPOINT, id, "setSavepoint()");
            }
            checkClosed();
            CommandInterface set = prepareCommand("SAVEPOINT " + JdbcSavepoint.getName(null, savepointId), Integer.MAX_VALUE);
            set.executeUpdate();
            JdbcSavepoint savepoint = new JdbcSavepoint(this, savepointId, null, trace, id);
            savepointId++;
            return savepoint;
        } catch (Exception e) {
            throw logAndConvert(e);
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.