[BUGFIX] Typo3DbBackend language handling crashes in BE
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Classes / Persistence / Generic / QuerySettingsInterface.php
1 <?php
2 namespace TYPO3\CMS\Extbase\Persistence\Generic;
3
4 /***************************************************************
5 * Copyright notice
6 *
7 * (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
8 * All rights reserved
9 *
10 * This class is a backport of the corresponding class of FLOW3.
11 * All credits go to the v5 team.
12 *
13 * This script is part of the TYPO3 project. The TYPO3 project is
14 * free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
18 *
19 * The GNU General Public License can be found at
20 * http://www.gnu.org/copyleft/gpl.html.
21 *
22 * This script is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU General Public License for more details.
26 *
27 * This copyright notice MUST APPEAR in all copies of the script!
28 ***************************************************************/
29 /**
30 * A query settings interface. This interface is NOT part of the FLOW3 API.
31 */
32 interface QuerySettingsInterface
33 {
34 /**
35 * Sets the flag if the storage page should be respected for the query.
36 *
37 * @param boolean $respectStoragePage If TRUE the storage page ID will be determined and the statement will be extended accordingly.
38 * @return \TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface instance of $this to allow method chaining
39 * @api
40 */
41 public function setRespectStoragePage($respectStoragePage);
42
43 /**
44 * Returns the state, if the storage page should be respected for the query.
45 *
46 * @return boolean TRUE, if the storage page should be respected; otherwise FALSE.
47 */
48 public function getRespectStoragePage();
49
50 /**
51 * Sets the pid(s) of the storage page(s) that should be respected for the query.
52 *
53 * @param array $storagePageIds If TRUE the storage page ID will be determined and the statement will be extended accordingly.
54 * @return \TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface instance of $this to allow method chaining
55 * @api
56 */
57 public function setStoragePageIds(array $storagePageIds);
58
59 /**
60 * Returns the pid(s) of the storage page(s) that should be respected for the query.
61 *
62 * @return array list of integers that each represent a storage page id
63 */
64 public function getStoragePageIds();
65
66 /**
67 * Sets the flag if a and language overlay should be performed.
68 *
69 * @param boolean $respectSysLanguage TRUE if a and language overlay should be performed.
70 * @return \TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface instance of $this to allow method chaining
71 * @api
72 */
73 public function setRespectSysLanguage($respectSysLanguage);
74
75 /**
76 * Returns the state, if a and language overlay should be performed.
77 *
78 * @return boolean TRUE, if a and language overlay should be performed; otherwise FALSE.
79 */
80 public function getRespectSysLanguage();
81
82 /**
83 * Sets the language uid for the language overlay.
84 *
85 * @param integer $sysLanguageUid language uid for the language overlay
86 * @return \TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface instance of $this to allow method chaining
87 * @api
88 */
89 public function setSysLanguageUid($sysLanguageUid);
90
91 /**
92 * Returns the language uid for the language overlay
93 *
94 * @return integer language uid for the language overlay
95 */
96 public function getSysLanguageUid();
97
98 /**
99 * Sets a flag indicating whether all or some enable fields should be ignored. If TRUE, all enable fields are ignored.
100 * If--in addition to this--enableFieldsToBeIgnored is set, only fields specified there are ignored. If FALSE, all
101 * enable fields are taken into account, regardless of the enableFieldsToBeIgnored setting.
102 *
103 * @param boolean $ignoreEnableFields
104 * @see setEnableFieldsToBeIgnored()
105 * @api
106 */
107 public function setIgnoreEnableFields($ignoreEnableFields);
108
109 /**
110 * The returned value indicates whether all or some enable fields should be ignored.
111 *
112 * If TRUE, all enable fields are ignored. If--in addition to this--enableFieldsToBeIgnored is set, only fields specified there are ignored.
113 * If FALSE, all enable fields are taken into account, regardless of the enableFieldsToBeIgnored setting.
114 *
115 * @return boolean
116 * @see getEnableFieldsToBeIgnored()
117 */
118 public function getIgnoreEnableFields();
119
120 /**
121 * An array of column names in the enable columns array (array keys in $GLOBALS['TCA'][$table]['ctrl']['enablecolumns']),
122 * to be ignored while building the query statement. Adding a column name here effectively switches off filtering
123 * by this column. This setting is only taken into account if $this->ignoreEnableFields = TRUE.
124 *
125 * @param array $enableFieldsToBeIgnored
126 * @return void
127 * @see setIgnoreEnableFields()
128 * @api
129 */
130 public function setEnableFieldsToBeIgnored($enableFieldsToBeIgnored);
131
132 /**
133 * An array of column names in the enable columns array (array keys in $GLOBALS['TCA'][$table]['ctrl']['enablecolumns']),
134 * to be ignored while building the query statement.
135 *
136 * @return array
137 * @see getIgnoreEnableFields()
138 */
139 public function getEnableFieldsToBeIgnored();
140
141 /**
142 * Sets the flag if the query should return objects that are deleted.
143 *
144 * @param boolean $includeDeleted
145 * @return void
146 * @api
147 */
148 public function setIncludeDeleted($includeDeleted);
149
150 /**
151 * Returns if the query should return objects that are deleted.
152 *
153 * @return boolean
154 */
155 public function getIncludeDeleted();
156
157 /**
158 * Sets the state, if the QueryResult should be returned unmapped.
159 *
160 * @param boolean $returnRawQueryResult TRUE, if the QueryResult should be returned unmapped; otherwise FALSE.
161 * @return void
162 */
163 public function setReturnRawQueryResult($returnRawQueryResult);
164
165 /**
166 * Returns the state, if the QueryResult should be returned unmapped.
167 *
168 * @return boolean TRUE, if the QueryResult should be returned unmapped; otherwise FALSE.
169 */
170 public function getReturnRawQueryResult();
171
172 }
173
174 ?>