1. /*
  2. * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
  3. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  4. */
  5. package javax.resource.cci;
  6. import javax.resource.ResourceException;
  7. /** The interface <code>javax.resource.cci.ResultSetInfo</code> provides
  8. * information on the support provided for ResultSet by a connected
  9. * EIS instance. A component calls the method
  10. * <code>Connection.getResultInfo</code> to get the ResultSetInfo instance.
  11. *
  12. * <p>A CCI implementation is not required to support
  13. * <code>javax.resource.cci.ResultSetInfo</code> interface. The
  14. * implementation of this interface is provided only if the CCI
  15. * supports the ResultSet facility.
  16. *
  17. * @version 0.9
  18. * @author Rahul Sharma
  19. * @see javax.resource.cci.Connection
  20. * @see java.sql.ResultSet
  21. * @see javax.resource.cci.ConnectionMetaData
  22. **/
  23. public interface ResultSetInfo {
  24. /** Indicates whether or not a visible row update can be detected
  25. * by calling the method <code>ResultSet.rowUpdated</code>.
  26. *
  27. * @param type type of the ResultSet i.e. ResultSet.TYPE_XXX
  28. * @return true if changes are detected by the result set
  29. * type; false otherwise
  30. * @see java.sql.ResultSet#rowUpdated
  31. * @throws ResourceException Failed to get the information
  32. **/
  33. public
  34. boolean updatesAreDetected(int type) throws ResourceException;
  35. /** Indicates whether or not a visible row insert can be detected
  36. * by calling ResultSet.rowInserted.
  37. *
  38. * @param type type of the ResultSet i.e. ResultSet.TYPE_XXX
  39. * @return true if changes are detected by the result set
  40. * type; false otherwise
  41. * @see java.sql.ResultSet#rowInserted
  42. * @throws ResourceException Failed to get the information
  43. **/
  44. public
  45. boolean insertsAreDetected(int type) throws ResourceException;
  46. /* Indicates whether or not a visible row delete can be detected by
  47. * calling ResultSet.rowDeleted. If deletesAreDetected
  48. * returns false, then deleted rows are removed from the ResultSet.
  49. *
  50. * @param type type of the ResultSet i.e. ResultSet.TYPE_XXX
  51. * @return true if changes are detected by the result set
  52. * type; false otherwise
  53. * @see java.sql.ResultSet#rowDeleted
  54. * @throws ResourceException Failed to get the information
  55. **/
  56. public
  57. boolean deletesAreDetected(int type) throws ResourceException;
  58. /** Indicates whether or not a resource adapter supports a type
  59. * of ResultSet.
  60. *
  61. * @param type type of the ResultSet i.e. ResultSet.TYPE_XXX
  62. * @return true if ResultSet type supported; false otherwise
  63. * @throws ResourceException Failed to get the information
  64. **/
  65. public
  66. boolean supportsResultSetType(int type) throws ResourceException;
  67. /** Indicates whether or not a resource adapter supports the
  68. * concurrency type in combination with the given ResultSet type/
  69. *
  70. * @param type type of the ResultSet i.e. ResultSet.TYPE_XXX
  71. * @param concurrency ResultSet concurrency type defined in
  72. * java.sql.ResultSet
  73. * @return true if the specified combination supported; false otherwise
  74. * @throws ResourceException Failed to get the information
  75. **/
  76. public
  77. boolean supportsResultTypeConcurrency(int type,
  78. int concurrency)
  79. throws ResourceException;
  80. /** Indicates whether updates made by others are visible.
  81. *
  82. * @param type type of the ResultSet i.e. ResultSet.TYPE_XXX
  83. * @return true if updates by others are visible for the
  84. * ResultSet type; false otherwise
  85. * @throws ResourceException Failed to get the information
  86. */
  87. public
  88. boolean othersUpdatesAreVisible(int type) throws ResourceException;
  89. /**
  90. * Indicates whether deletes made by others are visible.
  91. *
  92. * @param type type of the ResultSet i.e. ResultSet.TYPE_XXX
  93. * @return true if deletes by others are visible for the
  94. * ResultSet type; false otherwise
  95. * @throws ResourceException Failed to get the information
  96. */
  97. public
  98. boolean othersDeletesAreVisible(int type) throws ResourceException;
  99. /**
  100. * Indicates whether inserts made by others are visible.
  101. *
  102. * @param type type of the ResultSet i.e. ResultSet.TYPE_XXX
  103. * @return true if inserts by others are visible for the
  104. * ResultSet type; false otherwise
  105. * @throws ResourceException Failed to get the information
  106. */
  107. public
  108. boolean othersInsertsAreVisible(int type) throws ResourceException;
  109. /* Indicates whether a ResultSet's own updates are visible.
  110. *
  111. * @param type type of the ResultSet i.e. ResultSet.TYPE_XXX
  112. * @return true if updates are visible for the ResultSet
  113. * type; false otherwise
  114. * @throws ResourceException Failed to get the information
  115. **/
  116. public
  117. boolean ownUpdatesAreVisible(int type) throws ResourceException;
  118. /* Indicates whether a ResultSet's own inserts are visible.
  119. *
  120. * @param type type of the ResultSet i.e. ResultSet.TYPE_XXX
  121. * @return true if inserts are visible for the ResultSet
  122. * type; false otherwise
  123. * @throws ResourceException Failed to get the information
  124. **/
  125. public
  126. boolean ownInsertsAreVisible(int type) throws ResourceException;
  127. /* Indicates whether a ResultSet's own deletes are visible.
  128. *
  129. * @param type type of the ResultSet i.e. ResultSet.TYPE_XXX
  130. * @return true if inserts are visible for the ResultSet
  131. * type; false otherwise
  132. * @throws ResourceException Failed to get the information
  133. **/
  134. public
  135. boolean ownDeletesAreVisible(int type) throws ResourceException;
  136. }