Package org.apache.commons.dbutils

Examples of org.apache.commons.dbutils.QueryRunner.update()


      QueryRunner run = new QueryRunner();
      // String propNames = "numericValue, stringvalue, type, date, processId";
      Object[] param = { order, value, type, datetime, processId };
      String sql = "INSERT INTO " + "history" + " (numericValue, stringvalue, type, date, processId) VALUES ( ?, ?, ?, ? ,?)";
      logger.trace("added history event " + sql + ", " + param);
      run.update(connection, sql, param);
    } finally {
      closeConnection(connection);
    }
  }
View Full Code Here


      QueryRunner run = new QueryRunner();
      StringBuilder sql = new StringBuilder();
      Object[] param = { value, processId };
      sql.append("UPDATE prozesse SET sortHelperStatus = ? WHERE ProzesseID = ?");
      logger.debug(sql.toString() + ", " + param);
      run.update(connection, sql.toString(), param);
    } finally {
      closeConnection(connection);
    }
  }
View Full Code Here

      QueryRunner run = new QueryRunner();
      StringBuilder sql = new StringBuilder();
      Object[] param = { numberOfFiles, processId };
      sql.append("UPDATE prozesse SET sortHelperImages = ? WHERE ProzesseID = ?");
      logger.debug(sql.toString() + ", " + param);
      run.update(connection, sql.toString(), param);
    } finally {
      closeConnection(connection);
    }
  }
 
View Full Code Here

      QueryRunner run = new QueryRunner();
      StringBuilder sql = new StringBuilder();
      Object[] param = { logValue, processId };
      sql.append("UPDATE prozesse SET wikifield = ? WHERE ProzesseID = ?");
      logger.debug(sql.toString() + ", " + param);
      run.update(connection, sql.toString(), param);
    } finally {
      closeConnection(connection);
    }
  }
View Full Code Here

      QueryRunner run = new QueryRunner();
      String propNames = "Titel, Wert, IstObligatorisch, DatentypenID, Auswahl, creationDate, BenutzerID";
      Object[] param = { "_filter", filterstring, false, 5, null, datetime, userId };
      String sql = "INSERT INTO " + "benutzereigenschaften" + " (" + propNames + ") VALUES ( ?, ?,? ,? ,? ,?,? )";
      logger.debug(sql.toString() + ", " + param);
      run.update(connection, sql, param);
    } finally {
      closeConnection(connection);
    }
  }
View Full Code Here

    try {
      QueryRunner run = new QueryRunner();
      Object[] param = { userId, filterstring };
      String sql = "DELETE FROM benutzereigenschaften WHERE Titel = '_filter' AND BenutzerID = ? AND Wert = ?";
      logger.debug(sql.toString() + ", " + param);
      run.update(connection, sql, param);
    } finally {
      closeConnection(connection);
    }
  }
View Full Code Here

      if (processId % 5000 == 0) {
        String values = propValues.toString();
        values = values.substring(0, values.length() - 1);
        String sql = "INSERT INTO " + "prozesse" + " (" + propNames + ") VALUES " + values + ";";
        run.update(connection, sql);
        propValues = new StringBuilder();
      }

    }
  }
View Full Code Here

      propValues.append("('title', '" + processId + "', false, 5, NULL, " + processId + ",'" + datetime + "',0" + "),");
      if (processId % 5000 == 0) {
        String values = propValues.toString();
        values = values.substring(0, values.length() - 1);
        String sql = "INSERT INTO " + "prozesseeigenschaften" + " (" + propNames + ") VALUES " + values + ";";
        run.update(connection, sql);
        propValues = new StringBuilder();
      }
    }
  }
View Full Code Here

          + processId + ", true, 'dummy', 0, false, false, false, false, false, false, false, false, false, false" + "),");
      if (processId % 5000 == 0) {
        String values = propValues.toString();
        values = values.substring(0, values.length() - 1);
        String sql = "INSERT INTO " + "schritte" + " (" + propNames + ") VALUES " + values + ";";
        run.update(connection, sql);
        propValues = new StringBuilder();

        String userValues = userProps.toString();
        userValues = userValues.substring(0, userValues.length() - 1);
        String userSql = "INSERT INTO " + "schritteberechtigtebenutzer" + " (" + userNames + ") VALUES " + userValues + ";";
View Full Code Here

        propValues = new StringBuilder();

        String userValues = userProps.toString();
        userValues = userValues.substring(0, userValues.length() - 1);
        String userSql = "INSERT INTO " + "schritteberechtigtebenutzer" + " (" + userNames + ") VALUES " + userValues + ";";
        run.update(connection, userSql);
        userProps = new StringBuilder();
      }
    }
  }
}
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.