code: public static String buildSqlDELETE(String tableName, String[] whereColumns,
              Object[] whereValues) {
          final String SQL_TEMPLATE_FULL = "DELETE FROM {0} WHERE {1}";
          final String SQL_TEMPLATE = "DELETE FROM {0}";
  
          final List<String> WHERE_CLAUSE = new ArrayList<String>();
          if (whereColumns != null && whereColumns.length > 0 && whereValues != null
                  && whereValues.length > 0) {
              if (whereColumns.length != whereValues.length) {
                  throw new IllegalArgumentException(
                          "Number of whereColumns must be equal to number of whereValues.");
              }
              for (int i = 0; i < whereColumns.length; i++) {
                  if (whereValues[i] instanceof ParamExpression) {
                      WHERE_CLAUSE.add("(" + whereColumns[i] + "="
                              + ((ParamExpression) whereValues[i]).getExpression() + ")");
                  } else {
                      WHERE_CLAUSE.add("(" + whereColumns[i] + "=?)");
                  }
              }
          }
  
          String SQL;
          if (WHERE_CLAUSE.size() > 0) {
              SQL = MessageFormat.format(SQL_TEMPLATE_FULL, tableName,
                      StringUtils.join(WHERE_CLAUSE, " AND "));
          } else {
              SQL = MessageFormat.format(SQL_TEMPLATE, tableName);
          }
          return SQL;
      }
docs: Builds a DELETE statement (used for {@link PreparedStatement}).
  
  @param tableName
  @param whereColumns
  @param whereValues
  @return