public ResultSetMetaData getMetaData() throws SQLException {

        checkState();

        // It may be the case that JdbcRowSet might not have been
        // initialized with ResultSet handle and may be by PreparedStatement
        // internally when we set JdbcRowSet.setCommand().
        // We may require all the basic properties of setEscapeProcessing
        // setMaxFieldSize etc. which an application can use before we call
        // execute.
        try {
             checkState();
        } catch(SQLException sqle) {
             prepare();
             // will return ResultSetMetaData
             return ps.getMetaData();
        }
        return rs.getMetaData();
    }
Retrieves the  number, types and properties of
this rowset's <code>ResultSet</code> object's columns.

@return the description of this rowset's <code>ResultSet</code>
    object's columns
@throws SQLException if (1) a database access error occurs
    or (2) this rowset does not have a currently valid connection,
    prepared statement, and result set
src/main/java/org/replicadb/rowset/sun/rowset/JdbcRowSetImpl.java