01: package net.sourceforge.squirrel_sql.fw.datasetviewer;
02:
03: import net.sourceforge.squirrel_sql.fw.util.IMessageHandler;
04:
05: public class EmptyDataSet implements IDataSet {
06:
07: public int getColumnCount() throws DataSetException {
08: return 0;
09: }
10:
11: public DataSetDefinition getDataSetDefinition()
12: throws DataSetException {
13: return new DataSetDefinition(new ColumnDisplayDefinition[0]);
14: }
15:
16: public boolean next(IMessageHandler msgHandler)
17: throws DataSetException {
18: return false;
19: }
20:
21: public Object get(int columnIndex) throws DataSetException {
22: throw new IndexOutOfBoundsException(
23: "An EmptyDataSet does not have colums");
24: }
25: }
|