dc9c1fca00ddebb032912c60a548022a9bb08bfa
[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 a flag indicating whether all or some enable fields should be ignored. If TRUE, all enable fields are ignored.
84 * If--in addition to this--enableFieldsToBeIgnored is set, only fields specified there are ignored. If FALSE, all
85 * enable fields are taken into account, regardless of the enableFieldsToBeIgnored setting.
86 *
87 * @param boolean $ignoreEnableFields
88 * @see setEnableFieldsToBeIgnored()
89 * @api
90 */
91 public function setIgnoreEnableFields($ignoreEnableFields);
92
93 /**
94 * The returned value indicates whether all or some enable fields should be ignored.
95 *
96 * If TRUE, all enable fields are ignored. If--in addition to this--enableFieldsToBeIgnored is set, only fields specified there are ignored.
97 * If FALSE, all enable fields are taken into account, regardless of the enableFieldsToBeIgnored setting.
98 *
99 * @return boolean
100 * @see getEnableFieldsToBeIgnored()
101 */
102 public function getIgnoreEnableFields();
103
104 /**
105 * An array of column names in the enable columns array (array keys in $GLOBALS['TCA'][$table]['ctrl']['enablecolumns']),
106 * to be ignored while building the query statement. Adding a column name here effectively switches off filtering
107 * by this column. This setting is only taken into account if $this->ignoreEnableFields = TRUE.
108 *
109 * @param array $enableFieldsToBeIgnored
110 * @return void
111 * @see setIgnoreEnableFields()
112 * @api
113 */
114 public function setEnableFieldsToBeIgnored($enableFieldsToBeIgnored);
115
116 /**
117 * An array of column names in the enable columns array (array keys in $GLOBALS['TCA'][$table]['ctrl']['enablecolumns']),
118 * to be ignored while building the query statement.
119 *
120 * @return array
121 * @see getIgnoreEnableFields()
122 */
123 public function getEnableFieldsToBeIgnored();
124
125 /**
126 * Sets the flag if the query should return objects that are deleted.
127 *
128 * @param boolean $includeDeleted
129 * @return void
130 * @api
131 */
132 public function setIncludeDeleted($includeDeleted);
133
134 /**
135 * Returns if the query should return objects that are deleted.
136 *
137 * @return boolean
138 */
139 public function getIncludeDeleted();
140
141 /**
142 * Sets the state, if the QueryResult should be returned unmapped.
143 *
144 * @param boolean $returnRawQueryResult TRUE, if the QueryResult should be returned unmapped; otherwise FALSE.
145 * @return void
146 */
147 public function setReturnRawQueryResult($returnRawQueryResult);
148
149 /**
150 * Returns the state, if the QueryResult should be returned unmapped.
151 *
152 * @return boolean TRUE, if the QueryResult should be returned unmapped; otherwise FALSE.
153 */
154 public function getReturnRawQueryResult();
155
156 }
157
158 ?>