Fake class names added, insertDataSet() stub added, dataset criteria added
[shipsimu.git] / inc / classes / middleware / database / class_DatabaseConnection.php
index 4e81d30de06c0b6fe7905cb154c538db62f0616e..87e89f2753122d1d8bbc43f057cdab1fc09f536a 100644 (file)
@@ -98,10 +98,10 @@ class DatabaseConnection extends BaseMiddleware implements DatabaseConnector, Li
        /**
         * Save a whole object or parts of it to the database or local file
         *
-        * @param               $object The object we shall save
+        * @param       $object         The object we shall save
         * @return      void
         */
-       public function saveObject ($object) {
+       public function saveObject (FrameworkInterface $object) {
                // Connect to the database
                $this->dbLayer->connectToDatabase();
 
@@ -113,9 +113,9 @@ class DatabaseConnection extends BaseMiddleware implements DatabaseConnector, Li
         * Set a limitation for the saving process. This shall be done before
         * saveObject() is called else saveObject() shall save the whole object.
         *
-        * @param               $limitInstance  An instance of ObjectLimits which contains
-        *                                              elements we shall exclusivly include in
-        *                                              saving process
+        * @param       $limitInstance  An instance of ObjectLimits which contains
+        *                                                      elements we shall exclusivly include in
+        *                                                      saving process
         * @return      void
         */
        public function limitObject (ObjectLimits $limitInstance) {
@@ -199,6 +199,20 @@ class DatabaseConnection extends BaseMiddleware implements DatabaseConnector, Li
                $exceptionInstance = $this->dbLayer->getLastException();
                return $exceptionInstance;
        }
+
+       /**
+        * "Inserts" a data set instance into a local file database folder
+        *
+        * @param       $dataSetInstance        A storeable data set
+        * @return      void
+        */
+       public function insertDataSet (StoreableCriteria $dataSetInstance) {
+               // Connect to the database
+               $this->dbLayer->connectToDatabase();
+
+               // Ask the database layer
+               $this->dbLayer->insertDataSet($requestInstance);
+       }
 }
 
 // [EOF]