01: /*
02: * Copyright 2004-2008 H2 Group. Licensed under the H2 License, Version 1.0
03: * (http://h2database.com/html/license.html).
04: * Initial Developer: H2 Group
05: */
06: package org.h2.tools;
07:
08: import java.sql.SQLException;
09:
10: /**
11: * This interface is for classes that create rows on demand.
12: * It is used together with SimpleResultSet to create a dynamic result set.
13: */
14: public interface SimpleRowSource {
15:
16: /**
17: * Get the next row. Must return null if no more rows are available.
18: *
19: * @return the row or null
20: * @throws SQLException
21: */
22: Object[] readRow() throws SQLException;
23:
24: /**
25: * Close the row source.
26: */
27: void close();
28:
29: /**
30: * Reset the position (before the first row).
31: *
32: * @throws SQLException if this operation is not supported
33: */
34: void reset() throws SQLException;
35: }
|