Source for file OracleGenericQueryResult.class.php

Documentation is available at OracleGenericQueryResult.class.php

  1. <?php
  2. /**
  3. * @package harmoni.dbc.oracle
  4. *
  5. * @copyright Copyright &copy; 2005, Middlebury College
  6. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  7. *
  8. * @version $Id: OracleGenericQueryResult.class.php,v 1.9 2007/09/04 20:25:19 adamfranco Exp $
  9. */
  10. require_once(HARMONI."DBHandler/GenericQueryResult.interface.php");
  11.  
  12. /**
  13. * The GenericQueryResult interface provides methods for accessing the results of
  14. * a generic query. These results can be returned as if they were one of the other
  15. * query types, or the resource links can be returned and accessed directly.
  16. *
  17. *
  18. * @package harmoni.dbc.oracle
  19. *
  20. * @copyright Copyright &copy; 2005, Middlebury College
  21. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  22. *
  23. * @version $Id: OracleGenericQueryResult.class.php,v 1.9 2007/09/04 20:25:19 adamfranco Exp $
  24. */
  25. class OracleGenericQueryResult
  26. extends GenericQueryResultInterface
  27. {
  28. /**
  29. * The resource id for this SELECT query.
  30. * The resource id for this SELECT query.
  31. * @var integer $_resourceId The resource id for this SELECT query.
  32. * @access private
  33. */
  34. var $_resourceId;
  35.  
  36.  
  37. /**
  38. * The link identifier for the database connection.
  39. * The link identifier for the database connection.
  40. * @param integer $_linkId The link identifier for the database connection.
  41. * @access private
  42. */
  43. var $_linkId;
  44. /**
  45. * Constructor
  46. *
  47. * @param integer $resourceId The resource id for this SELECT query.
  48. * @param integer $linkId The link identifier for the database connection.
  49. * @access public
  50. * @since 7/2/04
  51. */
  52. function OracleGenericQueryResult ($resourceId, $linkId) {
  53. // ** parameter validation
  54. $resourceRule = ResourceValidatorRule::getRule();
  55. if (!is_bool($resourceId)) {
  56. ArgumentValidator::validate($resourceId, $resourceRule, true);
  57. }
  58. ArgumentValidator::validate($linkId, $resourceRule, true);
  59. // ** end of parameter validation
  60.  
  61. $this->_resourceId = $resourceId;
  62. $this->_linkId = $linkId;
  63. }
  64.  
  65. /**
  66. * Returns the resource id for this SELECT query.
  67. * Returns the resource id for this SELECT query. The resource id is returned
  68. * by the Oracle_query() function.
  69. * @access public
  70. * @return integer The resource id for this SELECT query.
  71. ***/
  72. function getResourceId() {
  73. return $this->_resourceId;
  74. }
  75. /**
  76. * Returns the result of the query as a SelectQueryResult.
  77. *
  78. * @return object SelectQueryResult
  79. * @access public
  80. * @since 7/1/04
  81. */
  82. function returnAsSelectQueryResult () {
  83. $obj = new OracleSelectQueryResult($this->_resourceId, $this->_linkId);
  84. return $obj;
  85. }
  86. /**
  87. * Returns the result of the query as an InsertQueryResult.
  88. *
  89. * @return object InsertQueryResult
  90. * @access public
  91. * @since 7/1/04
  92. */
  93. function returnAsInsertQueryResult () {
  94. $obj = new OracleInsertQueryResult($this->_linkId);
  95. return $obj;
  96. }
  97. /**
  98. * Returns the result of the query as a UpdateQueryResult.
  99. *
  100. * @return object UpdateQueryResult
  101. * @access public
  102. * @since 7/1/04
  103. */
  104. function returnAsUpdateQueryResult () {
  105. $obj = new OracleUpdateQueryResult($this->_linkId);
  106. return $obj;
  107. }
  108. /**
  109. * Returns the result of the query as a DeleteQueryResult.
  110. *
  111. * @return object DeleteQueryResult
  112. * @access public
  113. * @since 7/1/04
  114. */
  115. function returnAsDeleteQueryResult () {
  116. $obj = new OracleDeleteQueryResult($this->_linkId);
  117. return $obj;
  118. }
  119. }
  120.  
  121. ?>

Documentation generated on Wed, 19 Sep 2007 10:25:19 -0400 by phpDocumentor 1.3.0RC3