code: public int updateSqlStatement(String query, Map<String, String> replacer, List<Object> params) throws SQLException {
  
          String queryToExecute = query;
          // Check if a map of replacements is given
          if (replacer != null) {
              queryToExecute = replaceTokens(query, replacer);
          }
  
          int result;
          PreparedStatement stmt = null;
          stmt = m_con.prepareStatement(queryToExecute);
          try {
              // Check the params
              if (params != null) {
                  for (int i = 0; i < params.size(); i++) {
                      Object item = params.get(i);
  
                      // Check if the parameter is a string
                      if (item instanceof String) {
                          stmt.setString(i + 1, (String)item);
                      }
                      if (item instanceof Integer) {
                          Integer number = (Integer)item;
                          stmt.setInt(i + 1, number.intValue());
                      }
                      if (item instanceof Long) {
                          Long longNumber = (Long)item;
                          stmt.setLong(i + 1, longNumber.longValue());
                      }
  
                      // If item is none of types above set the statement to use the bytes
                      if (!(item instanceof Integer) && !(item instanceof String) && !(item instanceof Long)) {
                          try {
                              stmt.setBytes(i + 1, CmsDataTypeUtil.dataSerialize(item));
                          } catch (IOException e) {
                              e.printStackTrace();
                          }
                      }
                  }
              }
  
              if (!queryToExecute.startsWith("UPDATE CMS_ONLINE_STRUCTURE SET STRUCTURE_VERSION")
                  && !queryToExecute.startsWith("UPDATE CMS_OFFLINE_STRUCTURE SET STRUCTURE_VERSION")) {
                  System.out.println("executing query: " + queryToExecute);
                  if ((params != null) && !params.isEmpty()) {
                      System.out.println("params: " + params);
                  }
              }
              result = stmt.executeUpdate();
          } finally {
              stmt.close();
          }
  
          return result;
      }
docs: Creates and executes a database statment from a String.<p>
  
  @param query the query to execute
  @param replacer the replacements to perform in the script
  @param params the list of parameters for the statement
  
  @return the result set of the query
  
  @throws SQLException if something goes wrong