コード例 #1
0
 private String toString(SeQueryInfo qInfo) {
   StringBuffer sb = new StringBuffer("SeQueryInfo[\n\tcolumns=");
   try {
     SeSqlConstruct sql = qInfo.getConstruct();
     String[] tables = sql.getTables();
     String[] cols = qInfo.getColumns();
     String by = null;
     try {
       by = qInfo.getByClause();
     } catch (NullPointerException npe) {
       // no-op
     }
     String where = sql.getWhere();
     for (int i = 0; cols != null && i < cols.length; i++) {
       sb.append(cols[i]);
       if (i < cols.length - 1) sb.append(", ");
     }
     sb.append("\n\tTables=");
     for (int i = 0; i < tables.length; i++) {
       sb.append(tables[i]);
       if (i < tables.length - 1) sb.append(", ");
     }
     sb.append("\n\tWhere=");
     sb.append(where);
     sb.append("\n\tOrderBy=");
     sb.append(by);
   } catch (SeException e) {
     sb.append("Exception retrieving query info properties: " + e.getMessage());
   }
   sb.append("]");
   return sb.toString();
 }