069d59892cebf6c9a2994d5b88a84a7e86556cac
[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) 2010-2013 Extbase Team (http://forge.typo3.org/projects/typo3v4-mvc)
8 * Extbase is a backport of TYPO3 Flow. All credits go to the TYPO3 Flow team.
9 * All rights reserved
10 *
11 * This script is part of the TYPO3 project. The TYPO3 project is
12 * free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 *
17 * The GNU General Public License can be found at
18 * http://www.gnu.org/copyleft/gpl.html.
19 * A copy is found in the textfile GPL.txt and important notices to the license
20 * from the author is found in LICENSE.txt distributed with these scripts.
21 *
22 *
23 * This script 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.
27 *
28 * This copyright notice MUST APPEAR in all copies of the script!
29 ***************************************************************/
30 /**
31 * A query settings interface. This interface is NOT part of the FLOW3 API.
32 */
33 interface QuerySettingsInterface {
34
35 /**
36 * Sets the flag if the storage page should be respected for the query.
37 *
38 * @param boolean $respectStoragePage If TRUE the storage page ID will be determined and the statement will be extended accordingly.
39 * @return \TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface instance of $this to allow method chaining
40 * @api
41 */
42 public function setRespectStoragePage($respectStoragePage);
43
44 /**
45 * Returns the state, if the storage page should be respected for the query.
46 *
47 * @return boolean TRUE, if the storage page should be respected; otherwise FALSE.
48 */
49 public function getRespectStoragePage();
50
51 /**
52 * Sets the pid(s) of the storage page(s) that should be respected for the query.
53 *
54 * @param array $storagePageIds If TRUE the storage page ID will be determined and the statement will be extended accordingly.
55 * @return \TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface instance of $this to allow method chaining
56 * @api
57 */
58 public function setStoragePageIds(array $storagePageIds);
59
60 /**
61 * Returns the pid(s) of the storage page(s) that should be respected for the query.
62 *
63 * @return array list of integers that each represent a storage page id
64 */
65 public function getStoragePageIds();
66
67 /**
68 * Sets the flag if a and language overlay should be performed.
69 *
70 * @param boolean $respectSysLanguage TRUE if a and language overlay should be performed.
71 * @return \TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface instance of $this to allow method chaining
72 * @api
73 */
74 public function setRespectSysLanguage($respectSysLanguage);
75
76 /**
77 * Returns the state, if a and language overlay should be performed.
78 *
79 * @return boolean TRUE, if a and language overlay should be performed; otherwise FALSE.
80 */
81 public function getRespectSysLanguage();
82
83 /**
84 * @param mixed $languageOverlayMode TRUE, FALSE or "hideNonTranslated"
85 * @return \TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface instance of $this to allow method chaining
86 * @api
87 */
88 public function setLanguageOverlayMode($languageOverlayMode);
89
90 /**
91 * @return mixed TRUE, FALSE or "hideNonTranslated"
92 */
93 public function getLanguageOverlayMode();
94
95 /**
96 * @param string $languageMode NULL, "content_fallback", "strict" or "ignore"
97 * @return \TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface instance of $this to allow method chaining
98 * @api
99 */
100 public function setLanguageMode($languageMode);
101
102 /**
103 * @return string NULL, "content_fallback", "strict" or "ignore"
104 */
105 public function getLanguageMode();
106
107 /**
108 * @param integer $languageUid
109 * @return \TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface instance of $this to allow method chaining
110 * @api
111 */
112 public function setLanguageUid($languageUid);
113
114 /**
115 * @return integer
116 */
117 public function getLanguageUid();
118
119 /**
120 * Sets a flag indicating whether all or some enable fields should be ignored. If TRUE, all enable fields are ignored.
121 * If--in addition to this--enableFieldsToBeIgnored is set, only fields specified there are ignored. If FALSE, all
122 * enable fields are taken into account, regardless of the enableFieldsToBeIgnored setting.
123 *
124 * @param boolean $ignoreEnableFields
125 * @return \TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface instance of $this to allow method chaining
126 * @see setEnableFieldsToBeIgnored()
127 * @api
128 */
129 public function setIgnoreEnableFields($ignoreEnableFields);
130
131 /**
132 * The returned value indicates whether all or some enable fields should be ignored.
133 *
134 * If TRUE, all enable fields are ignored. If--in addition to this--enableFieldsToBeIgnored is set, only fields specified there are ignored.
135 * If FALSE, all enable fields are taken into account, regardless of the enableFieldsToBeIgnored setting.
136 *
137 * @return boolean
138 * @see getEnableFieldsToBeIgnored()
139 */
140 public function getIgnoreEnableFields();
141
142 /**
143 * An array of column names in the enable columns array (array keys in $GLOBALS['TCA'][$table]['ctrl']['enablecolumns']),
144 * to be ignored while building the query statement. Adding a column name here effectively switches off filtering
145 * by this column. This setting is only taken into account if $this->ignoreEnableFields = TRUE.
146 *
147 * @param array $enableFieldsToBeIgnored
148 * @return \TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface instance of $this to allow method chaining
149 * @see setIgnoreEnableFields()
150 * @api
151 */
152 public function setEnableFieldsToBeIgnored($enableFieldsToBeIgnored);
153
154 /**
155 * An array of column names in the enable columns array (array keys in $GLOBALS['TCA'][$table]['ctrl']['enablecolumns']),
156 * to be ignored while building the query statement.
157 *
158 * @return array
159 * @see getIgnoreEnableFields()
160 */
161 public function getEnableFieldsToBeIgnored();
162
163 /**
164 * Sets the flag if the query should return objects that are deleted.
165 *
166 * @param boolean $includeDeleted
167 * @return \TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface instance of $this to allow method chaining
168 * @api
169 */
170 public function setIncludeDeleted($includeDeleted);
171
172 /**
173 * Returns if the query should return objects that are deleted.
174 *
175 * @return boolean
176 */
177 public function getIncludeDeleted();
178
179 /**
180 * Sets the state, if the QueryResult should be returned unmapped.
181 *
182 * @param boolean $returnRawQueryResult TRUE, if the QueryResult should be returned unmapped; otherwise FALSE.
183 * @return void
184 */
185 public function setReturnRawQueryResult($returnRawQueryResult);
186
187 /**
188 * Returns the state, if the QueryResult should be returned unmapped.
189 *
190 * @return boolean TRUE, if the QueryResult should be returned unmapped; otherwise FALSE.
191 */
192 public function getReturnRawQueryResult();
193 }