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