3 namespace Org\Mxchange\CoreFramework\Criteria\Storing;
5 // Import framework stuff
6 use Org\Mxchange\CoreFramework\Criteria\Criteria;
7 use Org\Mxchange\CoreFramework\Criteria\Local\LocalSearchCriteria;
10 * An interface for storeable data sets
12 * @author Roland Haeder <webmaster@shipsimu.org>
14 * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2023 Core Developer Team
15 * @license GNU GPL 3.0 or any newer version
16 * @link http://www.shipsimu.org
18 * This program is free software: you can redistribute it and/or modify
19 * it under the terms of the GNU General Public License as published by
20 * the Free Software Foundation, either version 3 of the License, or
21 * (at your option) any later version.
23 * This program is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU General Public License for more details.
28 * You should have received a copy of the GNU General Public License
29 * along with this program. If not, see <http://www.gnu.org/licenses/>.
31 interface StoreableCriteria extends Criteria {
33 * Setter for table name
35 * @param $tableName Name of the table to set
38 function setTableName (string $tableName);
41 * Getter for table name
43 * @return $tableName Name of the table to set
45 function getTableName ();
48 * Setter for unique key
50 * @param $uniqueKey Column to use as unique key
53 function setUniqueKey (string $uniqueKey);
56 * Getter for unique key
58 * @return $uniqueKey Column to use as unique key
60 function getUniqueKey ();
63 * Setter for primary key
65 * @param $primaryKey Primary key to set
68 function setPrimaryKey (string $primaryKey);
71 * Setter for primary key array
73 * @param $primaryKeys Primary key array to set
76 public function setPrimaryKeyCombined (array $primaryKeys);
79 * Getter for primary keys
81 * @return $primaryKeys Primary key array
83 function getPrimaryKeys ();
86 * Setter for search instance
88 * @param $searchInstance Searchable criteria instance
91 function setSearchInstance (LocalSearchCriteria $searchInstance);
94 * Getter for search instance
96 * @return $searchInstance Searchable criteria instance
98 function getSearchInstance ();
101 * Getter for unique key value
103 * @return $uniqueValue Value of the unique key
105 function getUniqueValue ();
108 * Getter for primary key or unique key if not set
110 * @return $primaryKey Primary key or unique key if not set
112 function getPrimaryKey ();