Continued:
[core.git] / framework / main / classes / database / class_BaseDatabaseResult.php
index e0f9a950992580f575663c07f012cdb43c7ce4fa..69cf36b2fefe18f81eb43b3706af834b4ad88645 100644 (file)
@@ -3,6 +3,7 @@
 namespace Org\Mxchange\CoreFramework\Result\Database;
 
 // Import framework stuff
+use Org\Mxchange\CoreFramework\Criteria\Local\LocalUpdateCriteria;
 use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
 
 /**
@@ -11,7 +12,7 @@ use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
  * @see                        DatabaseBackend - An interface for database backends
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2023 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
@@ -29,14 +30,43 @@ use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 abstract class BaseDatabaseResult extends BaseFrameworkSystem {
+       // Result array names
+       const RESULT_NAME_ROWS      = 'rows';
+       const RESULT_NAME_STATUS    = 'status';
+       const RESULT_NAME_EXCEPTION = 'exception';
+
+       /**
+        * Update criteria instance
+        */
+       private $updateInstance = NULL;
+
        /**
         * Protected constructor
         *
         * @return      void
         */
-       protected function __construct($class = __CLASS__) {
+       protected function __construct (string $className) {
                // Call parent constructor
-               parent::__construct($class);
+               parent::__construct($className);
+       }
+
+       /**
+        * Setter for update instance
+        *
+        * @param       $updateInstance         An instance of a LocalUpdateCriteria clase
+        * @return      void
+        */
+       public final function setUpdateInstance (LocalUpdateCriteria $updateInstance) {
+               $this->updateInstance = $updateInstance;
+       }
+
+       /**
+        * Getter for update instance
+        *
+        * @return      $updateInstance         Updateable criteria instance
+        */
+       public final function getUpdateInstance () {
+               return $this->updateInstance;
        }
 
 }