//table.appendRow(1, new SimpleDumpData("cached"), new SimpleDumpData(isCached()?"Yes":"No"));
DumpTable recs=new DumpTable("query","#cc99cc","#ffccff","#000000");
recs.setTitle("Query");
if(dp.getMetainfo())recs.setComment(comment.toString());
recs.appendRow(new DumpRow(-1,heads));
// body
DumpData[] items;
int recordcount=query.getRecordcount();
int columncount=query.getColumnNames().length;
for(int i=0;i<recordcount;i++) {
items=new DumpData[columncount+1];
items[0]=new SimpleDumpData(i+1);
for(int y=0;y<keys.length;y++) {
try {
Object o=query.getAt(keys[y],i+1);
if(o instanceof String)items[y+1]=new SimpleDumpData(o.toString());
else if(o instanceof Number) items[y+1]=new SimpleDumpData(Caster.toString(((Number)o)));
else if(o instanceof Boolean) items[y+1]=new SimpleDumpData(((Boolean)o).booleanValue());
else if(o instanceof Date) items[y+1]=new SimpleDumpData(Caster.toString(o));
else if(o instanceof Clob) items[y+1]=new SimpleDumpData(Caster.toString(o));
else items[y+1]=DumpUtil.toDumpData(o, pageContext,maxlevel,dp);
} catch (PageException e) {
items[y+1]=new SimpleDumpData("[empty]");
}
}
recs.appendRow(new DumpRow(1,items));
if ( i == top - 1 )
break;
}
if(!dp.getMetainfo()) return recs;