Continued:
authorRoland Häder <roland@mxchange.org>
Tue, 16 Jan 2018 23:20:58 +0000 (00:20 +0100)
committerRoland Häder <roland@mxchange.org>
Tue, 16 Jan 2018 23:20:58 +0000 (00:20 +0100)
- removed Requestable instance from parameter list, this can now be done easier
  with FrameworkBootstrap::getInstance() rather than handling the instance
  around in many places (see inter-mezzo)

Signed-off-by: Roland Häder <roland@mxchange.org>
framework/main/classes/database/frontend/class_UserDatabaseWrapper.php
framework/main/classes/database/frontend/class_UserPointsDatabaseWrapper.php
framework/main/classes/database/result/class_CachedDatabaseResult.php
framework/main/classes/points/class_UserPoints.php
framework/main/interfaces/criteria/extended/class_AddableCriteria.php

index 3852df5..9ed1673 100644 (file)
@@ -87,7 +87,7 @@ class UserDatabaseWrapper extends BaseDatabaseWrapper implements ManageableAccou
                $dataSetInstance->setUniqueKey(self::DB_COLUMN_USERNAME);
 
                // Add registration elements to the dataset
                $dataSetInstance->setUniqueKey(self::DB_COLUMN_USERNAME);
 
                // Add registration elements to the dataset
-               $registrationInstance->addElementsToDataSet($dataSetInstance, NULL);
+               $registrationInstance->addElementsToDataSet($dataSetInstance);
 
                // "Insert" this request instance completely into the database
                $this->queryInsertDataSet($dataSetInstance);
 
                // "Insert" this request instance completely into the database
                $this->queryInsertDataSet($dataSetInstance);
@@ -135,7 +135,7 @@ class UserDatabaseWrapper extends BaseDatabaseWrapper implements ManageableAccou
                $dataSetInstance->setUniqueKey(self::DB_COLUMN_USERNAME);
 
                // Add all update criteria to the database set
                $dataSetInstance->setUniqueKey(self::DB_COLUMN_USERNAME);
 
                // Add all update criteria to the database set
-               $resultInstance->addElementsToDataSet($dataSetInstance, NULL);
+               $resultInstance->addElementsToDataSet($dataSetInstance);
 
                // "Update" this request with the database
                $this->getDatabaseInstance()->queryUpdateDataSet($dataSetInstance);
 
                // "Update" this request with the database
                $this->getDatabaseInstance()->queryUpdateDataSet($dataSetInstance);
index 34aa6d4..d9242d8 100644 (file)
@@ -86,7 +86,7 @@ class UserPointsDatabaseWrapper extends BaseDatabaseWrapper implements BookableP
                $dataSetInstance->setUniqueKey(self::DB_COLUMN_POINTS_UID);
 
                // Add registration elements to the dataset
                $dataSetInstance->setUniqueKey(self::DB_COLUMN_POINTS_UID);
 
                // Add registration elements to the dataset
-               $pointsInstance->addElementsToDataSet($dataSetInstance, NULL);
+               $pointsInstance->addElementsToDataSet($dataSetInstance);
 
                // "Insert" this request instance completely into the database
                $this->queryInsertDataSet($dataSetInstance);
 
                // "Insert" this request instance completely into the database
                $this->queryInsertDataSet($dataSetInstance);
@@ -103,7 +103,7 @@ class UserPointsDatabaseWrapper extends BaseDatabaseWrapper implements BookableP
                $dataSetInstance = ObjectFactory::createObjectByConfiguredName('dataset_criteria_class', array(self::DB_TABLE_USER_POINTS));
 
                // Add all update criteria to the database set
                $dataSetInstance = ObjectFactory::createObjectByConfiguredName('dataset_criteria_class', array(self::DB_TABLE_USER_POINTS));
 
                // Add all update criteria to the database set
-               $resultInstance->addElementsToDataSet($dataSetInstance, NULL);
+               $resultInstance->addElementsToDataSet($dataSetInstance);
 
                // Add seach criteria
                $dataSetInstance->setSearchInstance($resultInstance->getUpdateInstance()->getSearchInstance());
 
                // Add seach criteria
                $dataSetInstance->setSearchInstance($resultInstance->getUpdateInstance()->getSearchInstance());
index ab2ea47..6c36cdc 100644 (file)
@@ -8,7 +8,6 @@ use Org\Mxchange\CoreFramework\Criteria\Local\LocalUpdateCriteria;
 use Org\Mxchange\CoreFramework\Criteria\Storing\StoreableCriteria;
 use Org\Mxchange\CoreFramework\Database\Frontend\DatabaseWrapper;
 use Org\Mxchange\CoreFramework\Database\Backend\BaseDatabaseBackend;
 use Org\Mxchange\CoreFramework\Criteria\Storing\StoreableCriteria;
 use Org\Mxchange\CoreFramework\Database\Frontend\DatabaseWrapper;
 use Org\Mxchange\CoreFramework\Database\Backend\BaseDatabaseBackend;
-use Org\Mxchange\CoreFramework\Request\Requestable;
 use Org\Mxchange\CoreFramework\Result\Search\SearchableResult;
 use Org\Mxchange\CoreFramework\Result\Update\UpdateableResult;
 
 use Org\Mxchange\CoreFramework\Result\Search\SearchableResult;
 use Org\Mxchange\CoreFramework\Result\Update\UpdateableResult;
 
@@ -350,10 +349,9 @@ class CachedDatabaseResult extends BaseDatabaseResult implements SearchableResul
         * Adds registration elements to a given dataset instance
         *
         * @param       $criteriaInstance       An instance of a StoreableCriteria class
         * Adds registration elements to a given dataset instance
         *
         * @param       $criteriaInstance       An instance of a StoreableCriteria class
-        * @param       $requestInstance        An instance of a Requestable class
         * @return      void
         */
         * @return      void
         */
-       public function addElementsToDataSet (StoreableCriteria $criteriaInstance, Requestable $requestInstance = NULL) {
+       public function addElementsToDataSet (StoreableCriteria $criteriaInstance) {
                // Walk only through out-dated columns
                foreach ($this->outDated as $key => $dummy) {
                        // Does this key exist?
                // Walk only through out-dated columns
                foreach ($this->outDated as $key => $dummy) {
                        // Does this key exist?
index b23a6f9..786446c 100644 (file)
@@ -8,7 +8,6 @@ use Org\Mxchange\CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory;
 use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
 use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
 use Org\Mxchange\CoreFramework\Registry\Registerable;
 use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
 use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
 use Org\Mxchange\CoreFramework\Registry\Registerable;
-use Org\Mxchange\CoreFramework\Request\Requestable;
 use Org\Mxchange\CoreFramework\User\ManageableAccount;
 
 /**
 use Org\Mxchange\CoreFramework\User\ManageableAccount;
 
 /**
@@ -179,11 +178,10 @@ class UserPoints extends BaseFrameworkSystem implements Registerable, BookablePo
         * Adds registration elements to a given dataset instance
         *
         * @param       $criteriaInstance       An instance of a StoreableCriteria class
         * Adds registration elements to a given dataset instance
         *
         * @param       $criteriaInstance       An instance of a StoreableCriteria class
-        * @param       $requestInstance        An instance of a Requestable class
         * @return      void
         * @todo        $requestInstance is currently unused
         */
         * @return      void
         * @todo        $requestInstance is currently unused
         */
-       public function addElementsToDataSet (StoreableCriteria $criteriaInstance, Requestable $requestInstance = NULL) {
+       public function addElementsToDataSet (StoreableCriteria $criteriaInstance) {
                // Add user id
                $criteriaInstance->addCriteria(UserPointsDatabaseWrapper::DB_COLUMN_POINTS_UID, $this->getUserInstance()->getUserId());
 
                // Add user id
                $criteriaInstance->addCriteria(UserPointsDatabaseWrapper::DB_COLUMN_POINTS_UID, $this->getUserInstance()->getUserId());
 
index c965cc1..df52c7e 100644 (file)
@@ -5,7 +5,6 @@ namespace Org\Mxchange\CoreFramework\Criteria\Add;
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Criteria\Storing\StoreableCriteria;
 use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Criteria\Storing\StoreableCriteria;
 use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
-use Org\Mxchange\CoreFramework\Request\Requestable;
 
 /**
  * An interface for classes which are allowed to add criteria
 
 /**
  * An interface for classes which are allowed to add criteria
@@ -34,9 +33,8 @@ interface AddableCriteria extends FrameworkInterface {
         * Adds registration elements to a given dataset instance
         *
         * @param       $criteriaInstance       An instance of a StoreableCriteria class
         * Adds registration elements to a given dataset instance
         *
         * @param       $criteriaInstance       An instance of a StoreableCriteria class
-        * @param       $requestInstance        An instance of a Requestable class
         * @return      void
         */
         * @return      void
         */
-       function addElementsToDataSet (StoreableCriteria $criteriaInstance, Requestable $requestInstance = NULL);
+       function addElementsToDataSet (StoreableCriteria $criteriaInstance);
 
 }
 
 }