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. *
  9. * A rowset object presents itself to a reader or writer as an instance
  10. * of RowSetInternal. The RowSetInternal interface contains additional
  11. * methods that let the reader or writer access and modify the internal
  12. * state of the rowset.
  13. *
  14. */
  15. public interface RowSetInternal {
  16. /**
  17. * Get the parameters that were set on the rowset.
  18. *
  19. * @return an array of parameters
  20. * @exception SQLException if a database-access error occurs.
  21. */
  22. Object[] getParams() throws SQLException;
  23. /**
  24. * Get the Connection passed to the rowset.
  25. *
  26. * @return the Connection passed to the rowset, or null if none
  27. * @exception SQLException if a database-access error occurs.
  28. */
  29. Connection getConnection() throws SQLException;
  30. /**
  31. * Set the rowset's metadata.
  32. *
  33. * @param a metadata object
  34. * @exception SQLException if a database-access error occurs.
  35. */
  36. void setMetaData(RowSetMetaData md) throws SQLException;
  37. /**
  38. * Returns a result set containing the original value of the rowset.
  39. * The cursor is positioned before the first row in the result set.
  40. * Only rows contained in the result set returned by getOriginal()
  41. * are said to have an original value.
  42. *
  43. * @return the original value of the rowset
  44. * @exception SQLException if a database-access error occurs.
  45. */
  46. public ResultSet getOriginal() throws SQLException;
  47. /**
  48. * Returns a result set containing the original value of the current
  49. * row only. If the current row has no original value an empty result set
  50. * is returned. If there is no current row an exception is thrown.
  51. *
  52. * @return the original value of the row
  53. * @exception SQLException if a database-access error occurs.
  54. */
  55. public ResultSet getOriginalRow() throws SQLException;
  56. }