Пример #1
0
  public String toString() {
    StringBuffer buf = new StringBuffer("update " + table_);
    if (alias_ != null) buf.append(" " + alias_);
    buf.append(" set ");

    Enumeration e;
    if (columns_ != null) e = columns_.elements();
    else e = set_.keys();
    boolean first = true;
    while (e.hasMoreElements()) {
      String key = e.nextElement().toString();
      if (!first) buf.append(", ");
      buf.append(key + "=" + set_.get(key).toString());
      first = false;
    }

    if (where_ != null) buf.append(" where " + where_.toString());
    return buf.toString();
  }