[TASK] Namespace classes
[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 * @package Extbase
33 * @subpackage Persistence
34 * @version $Id$
35 */
36 interface QuerySettingsInterface
37 {
38 /**
39 * Sets the flag if the storage page should be respected for the query.
40 *
41 * @param boolean $respectStoragePage If TRUE the storage page ID will be determined and the statement will be extended accordingly.
42 * @return \TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface instance of $this to allow method chaining
43 * @api
44 */
45 public function setRespectStoragePage($respectStoragePage);
46
47 /**
48 * Returns the state, if the storage page should be respected for the query.
49 *
50 * @return boolean TRUE, if the storage page should be respected; otherwise FALSE.
51 */
52 public function getRespectStoragePage();
53
54 /**
55 * Sets the pid(s) of the storage page(s) that should be respected for the query.
56 *
57 * @param array $respectStoragePage If TRUE the storage page ID will be determined and the statement will be extended accordingly.
58 * @return \TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface instance of $this to allow method chaining
59 * @api
60 */
61 public function setStoragePageIds(array $storagePageIds);
62
63 /**
64 * Returns the pid(s) of the storage page(s) that should be respected for the query.
65 *
66 * @return array list of integers that each represent a storage page id
67 */
68 public function getStoragePageIds();
69
70 /**
71 * Sets the flag if a and language overlay should be performed.
72 *
73 * @param boolean $respectEnableFields TRUE if a and language overlay should be performed.
74 * @return \TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface instance of $this to allow method chaining
75 * @api
76 */
77 public function setRespectSysLanguage($respectSysLanguage);
78
79 /**
80 * Returns the state, if a and language overlay should be performed.
81 *
82 * @return boolean TRUE, if a and language overlay should be performed; otherwise FALSE.
83 */
84 public function getRespectSysLanguage();
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 /**
146 * Sets the state, if the QueryResult should be returned unmapped.
147 *
148 * @var boolean $returnRawQueryResult TRUE, if the QueryResult should be returned unmapped; otherwise FALSE.
149 * @return void
150 */
151 public function setReturnRawQueryResult($returnRawQueryResult);
152
153 /**
154 * Returns the state, if the QueryResult should be returned unmapped.
155 *
156 * @return boolean TRUE, if the QueryResult should be returned unmapped; otherwise FALSE.
157 */
158 public function getReturnRawQueryResult();
159
160 }
161
162 ?>