Add Extbase 1.0.1 to TYPO3core. Do NOT make changes inside! See misc/core_svn_rules...
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Classes / Persistence / QOM / QueryObjectModelFactory.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 * The Query Object Model Factory
30 *
31 * @package Extbase
32 * @subpackage Persistence\QOM
33 * @version $Id: QueryObjectModelFactory.php 1729 2009-11-25 21:37:20Z stucki $
34 * @scope prototype
35 */
36 class Tx_Extbase_Persistence_QOM_QueryObjectModelFactory implements Tx_Extbase_Persistence_QOM_QueryObjectModelFactoryInterface {
37 // SK: Needs to be cleaned up (methods might need to be removed, and comments fixed)
38 /**
39 * @var Tx_Extbase_Persistence_Storage_BackendInterface
40 */
41 protected $storageBackend;
42
43 /**
44 * Constructs the Component Factory
45 *
46 * @param Tx_Extbase_Persistence_Storage_BackendInterfasce $storageBackend
47 * @param Tx_Extbase_Persistence_Mapper_DataMapper $dataMapper
48 */
49 public function __construct(Tx_Extbase_Persistence_Storage_BackendInterface $storageBackend, Tx_Extbase_Persistence_Mapper_DataMapper $dataMapper) {
50 $this->storageBackend = $storageBackend;
51 $this->dataMapper = $dataMapper;
52 }
53
54 /**
55 * Creates a query with one or more selectors.
56 * If source is a selector, that selector is the default selector of the
57 * query. Otherwise the query does not have a default selector.
58 *
59 * If the query is invalid, this method throws an InvalidQueryException.
60 * See the individual QOM factory methods for the validity criteria of each
61 * query element.
62 *
63 * @param mixed $source the Selector or the node-tuple Source; non-null
64 * @param Tx_Extbase_Persistence_QOM_ConstraintInterface $constraint the constraint, or null if none
65 * @param array $orderings zero or more orderings; null is equivalent to a zero-length array
66 * @param array $columns the columns; null is equivalent to a zero-length array
67 * @return Tx_Extbase_Persistence_QOM_QueryObjectModelInterface the query; non-null
68 * @throws \F3\PHPCR\Query\InvalidQueryException if a particular validity test is possible on this method, the implemention chooses to perform that test and the parameters given fail that test. See the individual QOM factory methods for the validity criteria of each query element.
69 * @throws Tx_Extbase_Persistence_Exception_RepositoryException if another error occurs.
70 */
71 public function createQuery(Tx_Extbase_Persistence_QOM_SourceInterface $selectorOrSource, $constraint, array $orderings, array $columns) {
72 $query = new Tx_Extbase_Persistence_QOM_QueryObjectModel($selectorOrSource, $constraint, $orderings, $columns);
73 $query->injectStorageBackend($this->storageBackend);
74 $query->injectDataMapper($this->dataMapper);
75 return $query;
76 }
77
78 /**
79 * Selects a subset of the nodes in the repository based on node type.
80 *
81 * @param string $nodeTypeName the name of the required node type; non-null
82 * @param string $selectorName the selector name; optional
83 * @return Tx_Extbase_Persistence_QOM_SelectorInterface the selector
84 * @throws \F3\PHPCR\Query\InvalidQueryException if the query is invalid
85 * @throws Tx_Extbase_Persistence_Exception_RepositoryException if the operation otherwise fails
86 */
87 public function selector($nodeTypeName, $selectorName = '') {
88 if ($selectorName === '') {
89 $selectorName = $nodeTypeName;
90 }
91 return t3lib_div::makeInstance('Tx_Extbase_Persistence_QOM_Selector', $selectorName, $nodeTypeName);
92 }
93
94 /**
95 * Sets a statement as constraint. This is not part of the JCR 2.0 Specification!
96 *
97 * @param string $statement The statement
98 * @param object $language The language of the statement. Must be a supported languanguage defined as Tx_Extbase_Persistence_QOM_QueryObjectModelInterface::JCR_* or Tx_Extbase_Persistence_QOM_QueryObjectModelInterface::TYPO3_* or
99 * @return Tx_Extbase_Persistence_QOM_StatementInterface
100 */
101 public function statement($statement, $boundVariables, $language) {
102 return t3lib_div::makeInstance('Tx_Extbase_Persistence_QOM_Statement', $statement, $boundVariables, $language);
103 }
104
105 /**
106 * Performs a join between two node-tuple sources.
107 *
108 * @param Tx_Extbase_Persistence_QOM_SourceInterface $left the left node-tuple source; non-null
109 * @param Tx_Extbase_Persistence_QOM_SourceInterface $right the right node-tuple source; non-null
110 * @param string $joinType one of QueryObjectModelConstants.JCR_JOIN_TYPE_*
111 * @param Tx_Extbase_Persistence_QOM_JoinConditionInterface $join Condition the join condition; non-null
112 * @return Tx_Extbase_Persistence_QOM_JoinInterface the join; non-null
113 * @throws \F3\PHPCR\Query\InvalidQueryException if the query is invalid
114 * @throws Tx_Extbase_Persistence_Exception_RepositoryException if the operation otherwise fails
115 */
116 public function join(Tx_Extbase_Persistence_QOM_SourceInterface $left, Tx_Extbase_Persistence_QOM_SourceInterface $right, $joinType, Tx_Extbase_Persistence_QOM_JoinConditionInterface $joinCondition) {
117 return t3lib_div::makeInstance('Tx_Extbase_Persistence_QOM_Join', $left, $right, $joinType, $joinCondition);
118 }
119
120 /**
121 * Tests whether the value of a property in a first selector is equal to the value of a property in a second selector.
122 *
123 * @param string $selector1Name the name of the first selector; non-null
124 * @param string $property1Name the property name in the first selector; non-null
125 * @param string $selector2Name the name of the second selector; non-null
126 * @param string $property2Name the property name in the second selector; non-null
127 * @return Tx_Extbase_Persistence_QOM_EquiJoinConditionInterface the constraint; non-null
128 * @throws \F3\PHPCR\Query\InvalidQueryException if the query is invalid
129 * @throws Tx_Extbase_Persistence_Exception_RepositoryException if the operation otherwise fails
130 */
131 public function equiJoinCondition($selector1Name, $property1Name, $selector2Name, $property2Name) {
132 return t3lib_div::makeInstance('Tx_Extbase_Persistence_QOM_EquiJoinCondition', $selector1Name, $property1Name, $selector2Name, $property2Name);
133 }
134
135 /**
136 * Tests whether a first selector's node is the same as a node identified by relative path from a second selector's node.
137 *
138 * @param string $selector1Name the name of the first selector; non-null
139 * @param string $selector2Name the name of the second selector; non-null
140 * @param string $selector2Path the path relative to the second selector; non-null
141 * @return Tx_Extbase_Persistence_QOM_SameNodeJoinConditionInterface the constraint; non-null
142 * @throws \F3\PHPCR\Query\InvalidQueryException if the query is invalid
143 * @throws Tx_Extbase_Persistence_Exception_RepositoryException if the operation otherwise fails
144 */
145 public function sameNodeJoinCondition($selector1Name, $selector2Name, $selector2Path = NULL) {
146 throw new Tx_Extbase_Persistence_Exception('Method not yet implemented, sorry!', 1217058190);
147 }
148
149 /**
150 * Tests whether a first selector's node is a child of a second selector's node.
151 *
152 * @param string $childSelectorName the name of the child selector; non-null
153 * @param string $parentSelectorName the name of the parent selector; non-null
154 * @return Tx_Extbase_Persistence_QOM_ChildNodeJoinConditionInterface the constraint; non-null
155 * @throws \F3\PHPCR\Query\InvalidQueryException if the query is invalid
156 * @throws Tx_Extbase_Persistence_Exception_RepositoryException if the operation otherwise fails
157 */
158 public function childNodeJoinCondition($childSelectorName, $parentSelectorName) {
159 throw new Tx_Extbase_Persistence_Exception('Method not yet implemented, sorry!', 1217058190);
160 }
161
162 /**
163 * Tests whether a first selector's node is a descendant of a second selector's node.
164 *
165 * @param string $descendantSelectorName the name of the descendant selector; non-null
166 * @param string $ancestorSelectorName the name of the ancestor selector; non-null
167 * @return Tx_Extbase_Persistence_QOM_DescendantNodeJoinConditionInterface the constraint; non-null
168 * @throws \F3\PHPCR\Query\InvalidQueryException if the query is invalid
169 * @throws Tx_Extbase_Persistence_Exception_RepositoryException if the operation otherwise fails
170 */
171 public function descendantNodeJoinCondition($descendantSelectorName, $ancestorSelectorName) {
172 throw new Tx_Extbase_Persistence_Exception('Method not yet implemented, sorry!', 1217058192);
173 }
174
175 /**
176 * Performs a logical conjunction of two other constraints.
177 *
178 * @param Tx_Extbase_Persistence_QOM_ConstraintInterface $constraint1 the first constraint; non-null
179 * @param Tx_Extbase_Persistence_QOM_ConstraintInterface $constraint2 the second constraint; non-null
180 * @return Tx_Extbase_Persistence_QOM_AndInterface the And constraint; non-null
181 * @throws \F3\PHPCR\Query\InvalidQueryException if the query is invalid
182 * @throws Tx_Extbase_Persistence_Exception_RepositoryException if the operation otherwise fails
183 */
184 public function _and(Tx_Extbase_Persistence_QOM_ConstraintInterface $constraint1, Tx_Extbase_Persistence_QOM_ConstraintInterface $constraint2) {
185 return t3lib_div::makeInstance('Tx_Extbase_Persistence_QOM_LogicalAnd', $constraint1, $constraint2);
186 }
187
188 /**
189 * Performs a logical disjunction of two other constraints.
190 *
191 * @param Tx_Extbase_Persistence_QOM_ConstraintInterface $constraint1 the first constraint; non-null
192 * @param Tx_Extbase_Persistence_QOM_ConstraintInterface $constraint2 the second constraint; non-null
193 * @return Tx_Extbase_Persistence_QOM_OrInterface the Or constraint; non-null
194 * @throws \F3\PHPCR\Query\InvalidQueryException if the query is invalid
195 * @throws Tx_Extbase_Persistence_Exception_RepositoryException if the operation otherwise fails
196 */
197 public function _or(Tx_Extbase_Persistence_QOM_ConstraintInterface $constraint1, Tx_Extbase_Persistence_QOM_ConstraintInterface $constraint2) {
198 return t3lib_div::makeInstance('Tx_Extbase_Persistence_QOM_LogicalOr', $constraint1, $constraint2);
199 }
200
201 /**
202 * Performs a logical negation of another constraint.
203 *
204 * @param Tx_Extbase_Persistence_QOM_ConstraintInterface $constraint the constraint to be negated; non-null
205 * @return Tx_Extbase_Persistence_QOM_NotInterface the Not constraint; non-null
206 * @throws \F3\PHPCR\Query\InvalidQueryException if the query is invalid
207 * @throws Tx_Extbase_Persistence_Exception_RepositoryException if the operation otherwise fails
208 */
209 public function not(Tx_Extbase_Persistence_QOM_ConstraintInterface $constraint) {
210 return t3lib_div::makeInstance('Tx_Extbase_Persistence_QOM_LogicalNot', $constraint);
211 }
212
213 /**
214 * Filters related node-tuples based on an object property.
215 *
216 * @param Tx_Extbase_DomainObject_AbstractEntity $object The object
217 * @param string $propertyName The name of the property of the related object
218 * @return Tx_Extbase_Persistence_QOM_RelatedInterface the constraint; non-null
219 */
220 public function related(Tx_Extbase_DomainObject_AbstractEntity $object, $propertyName) {
221 return t3lib_div::makeInstance('Tx_Extbase_Persistence_QOM_Related', $object, $propertyName);
222 }
223
224 /**
225 * Filters node-tuples based on the outcome of a binary operation.
226 *
227 * @param Tx_Extbase_Persistence_QOM_DynamicOperandInterface $operand1 the first operand; non-null
228 * @param string $operator the operator; one of QueryObjectModelConstants.JCR_OPERATOR_*
229 * @param Tx_Extbase_Persistence_QOM_StaticOperandInterface $operand2 the second operand; non-null
230 * @return Tx_Extbase_Persistence_QOM_ComparisonInterface the constraint; non-null
231 * @throws \F3\PHPCR\Query\InvalidQueryException if the query is invalid
232 * @throws Tx_Extbase_Persistence_Exception_RepositoryException if the operation otherwise fails
233 */
234 public function comparison(Tx_Extbase_Persistence_QOM_DynamicOperandInterface $operand1, $operator, Tx_Extbase_Persistence_QOM_StaticOperandInterface $operand2) {
235 return t3lib_div::makeInstance('Tx_Extbase_Persistence_QOM_Comparison', $operand1, $operator, $operand2);
236 }
237
238 /**
239 * Tests the existence of a property in the specified or default selector.
240 *
241 * @param string $propertyName the property name; non-null
242 * @param string $selectorName the selector name; non-null
243 * @return Tx_Extbase_Persistence_QOM_PropertyExistenceInterface the constraint; non-null
244 * @throws \F3\PHPCR\Query\InvalidQueryException if the query is invalid
245 * @throws Tx_Extbase_Persistence_Exception_RepositoryException if the operation otherwise fails
246 */
247 public function propertyExistence($propertyName, $selectorName = NULL) {
248 throw new Tx_Extbase_Persistence_Exception('Method not yet implemented, sorry!', 1217058196);
249 }
250
251 /**
252 * Performs a full-text search against the specified or default selector.
253 *
254 * @param string $propertyName the property name, or null to search all full-text indexed properties of the node (or node subgraph, in some implementations);
255 * @param string $fullTextSearchExpression the full-text search expression; non-null
256 * @param string $selectorName the selector name; non-null
257 * @return Tx_Extbase_Persistence_QOM_FullTextSearchInterface the constraint; non-null
258 * @throws \F3\PHPCR\Query\InvalidQueryException if the query is invalid
259 * @throws Tx_Extbase_Persistence_Exception_RepositoryException if the operation otherwise fails
260 */
261 public function fullTextSearch($propertyName, $fullTextSearchExpression, $selectorName = NULL) {
262 throw new Tx_Extbase_Persistence_Exception('Method not yet implemented, sorry!', 1217058197);
263 }
264
265 /**
266 * Tests whether a node in the specified or default selector is reachable by a specified absolute path.
267 *
268 * @param string $selectorName the selector name; non-null
269 * @param string $path an absolute path; non-null
270 * @return Tx_Extbase_Persistence_QOM_SameNodeInterface the constraint; non-null
271 * @throws \F3\PHPCR\Query\InvalidQueryException if the query is invalid
272 * @throws Tx_Extbase_Persistence_Exception_RepositoryException if the operation otherwise fails
273 */
274 public function sameNode($path, $selectorName = NULL) {
275 throw new Tx_Extbase_Persistence_Exception('Method not yet implemented, sorry!', 1217058198);
276 }
277
278 /**
279 * Tests whether a node in the specified or default selector is a child of a node reachable by a specified absolute path.
280 *
281 * @param string $path an absolute path; non-null
282 * @param string $selectorName the selector name; non-null
283 * @return Tx_Extbase_Persistence_QOM_ChildNodeInterface the constraint; non-null
284 * @throws \F3\PHPCR\Query\InvalidQueryException if the query is invalid
285 * @throws Tx_Extbase_Persistence_Exception_RepositoryException if the operation otherwise fails
286 */
287 public function childNode($path, $selectorName = NULL) {
288 throw new Tx_Extbase_Persistence_Exception('Method not yet implemented, sorry!', 1217058199);
289 }
290
291 /**
292 * Tests whether a node in the specified or default selector is a descendant of a node reachable by a specified absolute path.
293 *
294 * @param string $path an absolute path; non-null
295 * @param string $selectorName the selector name; non-null
296 * @return Tx_Extbase_Persistence_QOM_DescendantNodeInterface the constraint; non-null
297 * @throws \F3\PHPCR\Query\InvalidQueryException if the query is invalid
298 * @throws Tx_Extbase_Persistence_Exception_RepositoryException if the operation otherwise fails
299 */
300 public function descendantNode($path, $selectorName = NULL) {
301 throw new Tx_Extbase_Persistence_Exception('Method not yet implemented, sorry!', 1217058200);
302 }
303
304 /**
305 * Evaluates to the value (or values, if multi-valued) of a property in the specified or default selector.
306 *
307 * @param string $propertyName the property name; non-null
308 * @param string $selectorName the selector name; non-null
309 * @return Tx_Extbase_Persistence_QOM_PropertyValueInterface the operand; non-null
310 * @throws \F3\PHPCR\Query\InvalidQueryException if the query is invalid
311 * @throws Tx_Extbase_Persistence_Exception_RepositoryException if the operation otherwise fails
312 */
313 public function propertyValue($propertyName, $selectorName = '') {
314 return t3lib_div::makeInstance('Tx_Extbase_Persistence_QOM_PropertyValue', $propertyName, $selectorName);
315 }
316
317 /**
318 * Evaluates to the length (or lengths, if multi-valued) of a property.
319 *
320 * @param Tx_Extbase_Persistence_QOM_PropertyValueInterface $propertyValue the property value for which to compute the length; non-null
321 * @return Tx_Extbase_Persistence_QOM_LengthInterface the operand; non-null
322 * @throws \F3\PHPCR\Query\InvalidQueryException if the query is invalid
323 * @throws Tx_Extbase_Persistence_Exception_RepositoryException if the operation otherwise fails
324 */
325 public function length(Tx_Extbase_Persistence_QOM_PropertyValueInterface $propertyValue) {
326 throw new Tx_Extbase_Persistence_Exception('Method not yet implemented, sorry!', 1217058202);
327 }
328
329 /**
330 * Evaluates to a NAME value equal to the prefix-qualified name of a node in the specified or default selector.
331 *
332 * @param string $selectorName the selector name; non-null
333 * @return Tx_Extbase_Persistence_QOM_NodeNameInterface the operand; non-null
334 * @throws \F3\PHPCR\Query\InvalidQueryException if the query is invalid
335 * @throws Tx_Extbase_Persistence_Exception_RepositoryException if the operation otherwise fails
336 */
337 public function nodeName($selectorName = NULL) {
338 throw new Tx_Extbase_Persistence_Exception('Method not yet implemented, sorry!', 1217058203);
339 }
340
341 /**
342 * Evaluates to a NAME value equal to the local (unprefixed) name of a node in the specified or default selector.
343 *
344 * @param string $selectorName the selector name; non-null
345 * @return Tx_Extbase_Persistence_QOM_NodeLocalNameInterface the operand; non-null
346 * @throws \F3\PHPCR\Query\InvalidQueryException if the query is invalid
347 * @throws Tx_Extbase_Persistence_Exception_RepositoryException if the operation otherwise fails
348 */
349 public function nodeLocalName($selectorName = NULL) {
350 throw new Tx_Extbase_Persistence_Exception('Method not yet implemented, sorry!', 1217058204);
351 }
352
353 /**
354 * Evaluates to a DOUBLE value equal to the full-text search score of a node in the specified or default selector.
355 *
356 * @param string $selectorName the selector name; non-null
357 * @return Tx_Extbase_Persistence_QOM_FullTextSearchScoreInterface the operand; non-null
358 * @throws \F3\PHPCR\Query\InvalidQueryException if the query is invalid
359 * @throws Tx_Extbase_Persistence_Exception_RepositoryException if the operation otherwise fails
360 */
361 public function fullTextSearchScore($selectorName = NULL) {
362 throw new Tx_Extbase_Persistence_Exception('Method not yet implemented, sorry!', 1217058205);
363 }
364
365 /**
366 * Evaluates to the lower-case string value (or values, if multi-valued) of an operand.
367 *
368 * @param Tx_Extbase_Persistence_QOM_DynamicOperandInterface $operand the operand whose value is converted to a lower-case string; non-null
369 * @return Tx_Extbase_Persistence_QOM_LowerCaseInterface the operand; non-null
370 * @throws \F3\PHPCR\Query\InvalidQueryException if the query is invalid
371 * @throws Tx_Extbase_Persistence_Exception_RepositoryException if the operation otherwise fails
372 */
373 public function lowerCase(Tx_Extbase_Persistence_QOM_DynamicOperandInterface $operand) {
374 return t3lib_div::makeInstance('Tx_Extbase_Persistence_QOM_LowerCase', $operand);
375 }
376
377 /**
378 * Evaluates to the upper-case string value (or values, if multi-valued) of an operand.
379 *
380 * @param Tx_Extbase_Persistence_QOM_DynamicOperandInterface $operand the operand whose value is converted to a upper-case string; non-null
381 * @return Tx_Extbase_Persistence_QOM_UpperCaseInterface the operand; non-null
382 * @throws \F3\PHPCR\Query\InvalidQueryException if the query is invalid
383 * @throws Tx_Extbase_Persistence_Exception_RepositoryException if the operation otherwise fails
384 */
385 public function upperCase(Tx_Extbase_Persistence_QOM_DynamicOperandInterface $operand) {
386 return t3lib_div::makeInstance('Tx_Extbase_Persistence_QOM_UpperCase', $operand);
387 }
388
389 /**
390 * Evaluates to the value of a bind variable.
391 *
392 * @param string $bindVariableName the bind variable name; non-null
393 * @return Tx_Extbase_Persistence_QOM_BindVariableValueInterface the operand; non-null
394 * @throws \F3\PHPCR\Query\InvalidQueryException if the query is invalid
395 * @throws Tx_Extbase_Persistence_Exception_RepositoryException if the operation otherwise fails
396 */
397 public function bindVariable($bindVariableName) {
398 return t3lib_div::makeInstance('Tx_Extbase_Persistence_QOM_BindVariableValue', $bindVariableName);
399 }
400
401 /**
402 * Evaluates to a literal value.
403 *
404 * The query is invalid if no value is bound to $literalValue.
405 *
406 * @param \F3\PHPCR\ValueInterface $literalValue the value
407 * @return \F3\PHPCR\ValueInterface the operand; non-null
408 * @throws \F3\PHPCR\Query\InvalidQueryException if a particular validity test is possible on this method, the implemention chooses to perform that test (and not leave it until later) on createQuery, and the parameters given fail that test
409 * @throws Tx_Extbase_Persistence_Exception_RepositoryException if the operation otherwise fails
410 */
411 public function literal(Tx_Extbase_Persistence_ValueInterface $literalValue) {
412 throw new Tx_Extbase_Persistence_Exception('Method not yet implemented, sorry!', 1217058209);
413 }
414
415 /**
416 * Orders by the value of the specified operand, in ascending order.
417 *
418 * The query is invalid if $operand does not evaluate to a scalar value.
419 *
420 * @param Tx_Extbase_Persistence_QOM_DynamicOperandInterface $operand the operand by which to order; non-null
421 * @return Tx_Extbase_Persistence_QOM_OrderingInterface the ordering
422 * @throws \F3\PHPCR\Query\InvalidQueryException if the query is invalid
423 * @throws Tx_Extbase_Persistence_Exception_RepositoryException if the operation otherwise fails
424 */
425 public function ascending(Tx_Extbase_Persistence_QOM_DynamicOperandInterface $operand) {
426 return t3lib_div::makeInstance('Tx_Extbase_Persistence_QOM_Ordering', $operand, Tx_Extbase_Persistence_QOM_QueryObjectModelConstantsInterface::JCR_ORDER_ASCENDING);
427 }
428
429 /**
430 * Orders by the value of the specified operand, in descending order.
431 *
432 * The query is invalid if $operand does not evaluate to a scalar value.
433 *
434 * @param Tx_Extbase_Persistence_QOM_DynamicOperandInterface $operand the operand by which to order; non-null
435 * @return Tx_Extbase_Persistence_QOM_OrderingInterface the ordering
436 * @throws \F3\PHPCR\Query\InvalidQueryException if the query is invalid
437 * @throws Tx_Extbase_Persistence_Exception_RepositoryException if the operation otherwise fails
438 */
439 public function descending(Tx_Extbase_Persistence_QOM_DynamicOperandInterface $operand) {
440 return t3lib_div::makeInstance('Tx_Extbase_Persistence_QOM_Ordering', $operand, Tx_Extbase_Persistence_QOM_QueryObjectModelConstantsInterface::JCR_ORDER_DESCENDING);
441 }
442
443 /**
444 * Identifies a property in the specified or default selector to include in
445 * the tabular view of query results.
446 * The column name is the property name if not given.
447 *
448 * The query is invalid if:
449 * $selectorName is not the name of a selector in the query, or
450 * $propertyName is specified but it is not a syntactically valid JCR name, or
451 * $propertyName is specified but does not evaluate to a scalar value, or
452 * $propertyName is specified but $columnName is omitted, or
453 * $propertyName is omitted but $columnName is specified, or
454 * the columns in the tabular view are not uniquely named, whether those
455 * column names are specified by $columnName (if $propertyName is specified)
456 * or generated as described above (if $propertyName is omitted).
457 *
458 * If $propertyName is specified but, for a node-tuple, the selector node
459 * does not have a property named $propertyName, the query is valid and the
460 * column has null value.
461 *
462 * @param string $propertyName the property name, or null to include a column for each single-value non-residual property of the selector's node type
463 * @param string $columnName the column name; must be null if propertyName is null
464 * @param string $selectorName the selector name; non-null
465 * @return Tx_Extbase_Persistence_QOM_ColumnInterface the column; non-null
466 * @throws \F3\PHPCR\Query\InvalidQueryException if the query has no default selector or is otherwise invalid
467 * @throws Tx_Extbase_Persistence_Exception_RepositoryException if the operation otherwise fails
468 */
469 public function column($propertyName, $columnName = NULL, $selectorName = NULL) {
470 throw new Tx_Extbase_Persistence_Exception('Method not yet implemented, sorry!', 1217058211);
471 }
472
473 }
474 ?>