abstract Row getNext() throws SQLException;
// Returns the number of (data) rows that were output
- public int printTable(PrintWriter pw) throws SQLException {
+ public int printTable(PrintWriter pw, String noRowsMessage)
+ throws SQLException
+ {
int rowCount = 0;
Column[] cols = getCols();
RowBuffer rowBuf;
if (rowCount > 0) {
writeDivider(pw, colWidths);
+ // TODO: Implement a String table for i18n
+ pw.println("" + rowCount + " row(s) returned.");
+ }
+ else {
+ pw.println(noRowsMessage);
}
- // TODO: Implement a String table for i18n
- pw.println("" + rowCount + " row(s) returned.");
pw.flush();
return rowCount;
}
return Object.class;
}
-
+
String repChar(char chr, int times)
{
StringBuffer sb = new StringBuffer();