Examples of executeUpdate()


Examples of org.hibernate.SQLQuery.executeUpdate()

      for(int i=0; i< params.length; i++){
        logger.debug("{}) : {} [{}]", new Object[]{i+1, params[i], types[i]});
        query.setParameter(i, params[i], types[i]);
      }
    }   
    return query.executeUpdate();
  }

  public void executeDDL(String queryString) {
    Session session = getSession();
    SQLQuery query = session.createSQLQuery(queryString);
View Full Code Here

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

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

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

                continue;
            }
            String value = ci.getProperty(setting);
            try {
                CommandInterface command = session.prepareLocal("SET " + Parser.quoteIdentifier(setting) + " " + value);
                command.executeUpdate();
            } catch (DbException e) {
                if (!ignoreUnknownSetting) {
                    session.close();
                    throw e;
                }
View Full Code Here

Examples of org.lealone.command.CommandRemote.executeUpdate()

            SessionRemote sr = null;
            CommandRemote cr = null;
            try {
                sr = SessionRemotePool.getMasterSessionRemote(session.getOriginalProperties());
                cr = SessionRemotePool.getCommandRemote(sr, sql, getParameters(), dc.getFetchSize());
                int updateCount = cr.executeUpdate();
                refreshMetaTable();
                return updateCount;
            } catch (Exception e) {
                throw DbException.convert(e);
            } finally {
View Full Code Here

Examples of org.lealone.command.FrontendBatchCommand.executeUpdate()

                if (batchCommands.isEmpty())
                    return new int[0];

                if (session instanceof SessionRemote) {
                    FrontendBatchCommand c = ((SessionRemote) session).getFrontendBatchCommand(batchCommands);
                    c.executeUpdate();
                    int[] result = c.getResult();
                    c.close();
                    return result;
                } else {
                    int size = batchCommands.size();
View Full Code Here

Examples of org.olat.core.commons.persistence.DBQuery.executeUpdate()

        DBQuery update = DBFactory.getInstance().createQuery(
            "update org.olat.core.logging.activity.LoggingObject set simpleDuration = :duration where log_id = :logid");
        update.setLong("duration", duration);
        update.setLong("logid", lastLogObj.getKey());
        // we have to do FlushMode.AUTO (which is the default anyway)
        update.executeUpdate(FlushMode.AUTO);
      }
    }
   
    // store the current logging object in the session - for duration calculation at next log
    session_.putEntry(USESS_KEY_USER_ACTIVITY_LOGGING_LAST_LOG, logObj);
View Full Code Here

Examples of realcix20.utils.DAO.executeUpdate()

            KeyPair key = keyGen.generateKeyPair();
            DAO dao = DAO.getInstance();
            dao.update(Resources.GENERATE_KEY_SQL);
            dao.setObject(1, (Object)key.getPublic());
            dao.setObject(2, (Object)key.getPrivate());
            dao.executeUpdate();
        } catch (Exception e) {
            e.printStackTrace();
        }              
       
    }
View Full Code Here

Examples of se.unlogic.standardutils.dao.querys.UpdateQuery.executeUpdate()

        insertQuery = new UpdateQuery(connection, false, linkTableInsertSQL);
       
        setQueryParameter(insertQuery, this.localColumn, bean, 1);
        setQueryParameter(insertQuery, this.remoteColumn, remoteBean, 2);
       
        insertQuery.executeUpdate();
      }
     
    } catch (IllegalArgumentException e) {

      throw new RuntimeException(e);
View Full Code Here
TOP
Copyright © 2015 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.