1. /*
  2. * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
  3. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  4. */
  5. package javax.sql;
  6. import java.sql.*;
  7. /**
  8. * <P>An object implementing the RowSetReader interface may be registered with
  9. * a RowSet object that supports the reader/writer paradigm. A RowSetReader object
  10. * is called by a rowset to produce a new set of rows which will become
  11. * the rowset's contents.
  12. */
  13. public interface RowSetReader {
  14. /**
  15. * <P>Read the new contents of a rowset. This method is invoked internally
  16. * by the RowSet.execute() method for rowsets that support the
  17. * reader/writer paradigm.
  18. *
  19. * <P>The readData() method uses the RowSet.insertRow() or RowSet.populate()
  20. * methods to add rows to the caller. In general, any of the caller's
  21. * methods may be called by the reader with one exception, calling
  22. * execute() will throw an SQLException since execute may not be called
  23. * recursively. Also, rowset events, such as RowSetChanged, etc. are not
  24. * generated by RowSet methods invoked by a reader.
  25. *
  26. * @param caller the rowset that called the reader
  27. * @exception SQLException if a database-access error occurs
  28. */
  29. void readData(RowSetInternal caller) throws SQLException;
  30. }