Code sync from ship-simu code (all class config entries must end with _class!)
[mailer.git] / inc / classes / main / database / databases / class_LocalFileDatabase.php
index 151698c7f28b9410837921a480688c516dc4cf62..220ad14d2888bdb84e28054e84aff41e455f5d04 100644 (file)
@@ -8,7 +8,7 @@
  * @version            0.0.0
  * @copyright  Copyright(c) 2007, 2008 Roland Haeder, this is free software
  * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.ship-simu.org
+ * @link               http://www.ship-simu.org
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -26,8 +26,8 @@
 class LocalFileDatabase extends BaseDatabaseFrontend implements DatabaseFrontendInterface {
 
        // Constants for MySQL backward-compatiblity (PLEASE FIX THEM!)
-       const DB_CODE_TABLE_MISSING     = 0x000;
-       const DB_CODE_TABLE_UNWRITEABLE = 0x001;
+       const DB_CODE_TABLE_MISSING     = 0x010;
+       const DB_CODE_TABLE_UNWRITEABLE = 0x011;
 
        /**
         * Save path for "file database"
@@ -535,16 +535,10 @@ class LocalFileDatabase extends BaseDatabaseFrontend implements DatabaseFrontend
         * @throws      UnsupportedCriteriaException    If the criteria is unsupported
         * @throws      SqlException                                    If an "SQL error" occurs
         */
-       public function querySelect ($resultType, $tableName, Criteria $criteriaInstance) {
+       public function querySelect ($resultType, $tableName, LocalSearchCriteria $criteriaInstance) {
                // The result is null by any errors
                $resultData = null;
 
-               // Is this criteria supported?
-               if (!$criteriaInstance instanceof LocalSearchCriteria) {
-                       // Not supported by this database layer
-                       throw new UnsupportedCriteriaException(array($this, $criteriaInstance), self::EXCEPTION_REQUIRED_INTERFACE_MISSING);
-               }
-
                // Create full path name
                $pathName = $this->getSavePath() . $tableName . '/';
 
@@ -640,7 +634,7 @@ class LocalFileDatabase extends BaseDatabaseFrontend implements DatabaseFrontend
         * @return      void
         * @throws      SqlException    If an SQL error occurs
         */
-       public function insertDataSet (StoreableCriteria $dataSetInstance) {
+       public function queryInsertDataSet (StoreableCriteria $dataSetInstance) {
                // Create full path name
                $fqfn = sprintf("%s%s/%s.%s",
                        $this->getSavePath(),