X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Fcriteria%2Fdataset%2Fclass_DataSetCriteria.php;h=d423fb5daf7f1e1451a4f5dec2c08f597fcef45a;hb=66e68715d3d5a5e7fd5a3046471914ef3f9dd4b4;hp=cf4fdc96647fa0c20c9067d748cd903342541f5a;hpb=4b88c118b615335d06bd74e444173d21aef4406c;p=core.git diff --git a/inc/classes/main/criteria/dataset/class_DataSetCriteria.php b/inc/classes/main/criteria/dataset/class_DataSetCriteria.php index cf4fdc96..d423fb5d 100644 --- a/inc/classes/main/criteria/dataset/class_DataSetCriteria.php +++ b/inc/classes/main/criteria/dataset/class_DataSetCriteria.php @@ -2,12 +2,11 @@ /** * A set of data storeable in databases * - * @see DatabaseFrontendInterface - An interface for database frontends (front-end to the application) - * @author Roland Haeder + * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team * @license GNU GPL 3.0 or any newer version - * @link http://www.ship-simu.org + * @link http://www.shipsimu.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 @@ -28,11 +27,6 @@ class DataSetCriteria extends BaseCriteria implements StoreableCriteria { */ private $tableName = ''; - /** - * Table columns (criteria) to store - */ - private $tableColumns = array(); - /** * Unique key */ @@ -70,30 +64,6 @@ class DataSetCriteria extends BaseCriteria implements StoreableCriteria { return $criteriaInstance; } - /** - * Add criteria - * - * @param $criteriaKey Criteria key - * @param $criteriaValue Criteria value - * @return void - */ - public function addCriteria ($criteriaKey, $criteriaValue) { - $this->tableColumns[(string) $criteriaKey] = $criteriaValue; - } - - /** - * Add configured criteria - * - * @param $criteriaKey Criteria key - * @param $configEntry Configuration entry - * @return void - */ - public function addConfiguredCriteria ($criteriaKey, $configEntry) { - // Add configuration entry as criteria - $value = $this->getConfigInstance()->getConfigEntry($configEntry); - $this->addCriteria($criteriaKey, $value); - } - /** * Setter for table name * @@ -138,16 +108,7 @@ class DataSetCriteria extends BaseCriteria implements StoreableCriteria { * @return $uniqueValue Value of the unique key */ public final function getUniqueValue () { - return $this->tableColumns[$this->getUniqueKey()]; - } - - /** - * Getter for criteria array - * - * @return $tableColumns - */ - public final function getCriteriaArray () { - return $this->tableColumns; + return $this->getCriteriaElemnent($this->getUniqueKey()); } /**