[TASK] Merge submodule workspaces into core
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Classes / Persistence / Generic / Qom / ComparisonInterface.php
1 <?php
2 namespace TYPO3\CMS\Extbase\Persistence\Generic\Qom;
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 * Filters node-tuples based on the outcome of a binary operation.
32 *
33 * For any comparison, operand2 always evaluates to a scalar value. In contrast,
34 * operand1 may evaluate to an array of values (for example, the value of a multi-valued
35 * property), in which case the comparison is separately performed for each element
36 * of the array, and the Comparison constraint is satisfied as a whole if the
37 * comparison against any element of the array is satisfied.
38 *
39 * If operand1 and operand2 evaluate to values of different property types, the
40 * value of operand2 is converted to the property type of the value of operand1.
41 * If the type conversion fails, the query is invalid.
42 *
43 * If operator is not supported for the property type of operand1, the query is invalid.
44 *
45 * If operand1 evaluates to null (for example, if the operand evaluates the value
46 * of a property which does not exist), the constraint is not satisfied.
47 *
48 * The JCR_OPERATOR_EQUAL_TO operator is satisfied only if the value of operand1
49 * equals the value of operand2.
50 *
51 * The JCR_OPERATOR_NOT_EQUAL_TO operator is satisfied unless the value of
52 * operand1 equals the value of operand2.
53 *
54 * The JCR_OPERATOR_LESSS_THAN operator is satisfied only if the value of
55 * operand1 is ordered before the value of operand2.
56 *
57 * The JCR_OPERATOR_LESS_THAN_OR_EQUAL_TO operator is satisfied unless the value
58 * of operand1 is ordered after the value of operand2.
59 *
60 * The JCR_OPERATOR_GREATER_THAN operator is satisfied only if the value of
61 * operand1 is ordered after the value of operand2.
62 *
63 * The JCR_OPERATOR_GREATER_THAN_OR_EQUAL_TO operator is satisfied unless the
64 * value of operand1 is ordered before the value of operand2.
65 *
66 * The JCR_OPERATOR_LIKE operator is satisfied only if the value of operand1
67 * matches the pattern specified by the value of operand2, where in the pattern:
68 * the character "%" matches zero or more characters, and
69 * the character "_" (underscore) matches exactly one character, and
70 * the string "\x" matches the character "x", and
71 * all other characters match themselves.
72 *
73 * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
74 */
75 interface ComparisonInterface extends \TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface {
76
77 /**
78 * Gets the first operand.
79 *
80 * @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\DynamicOperandInterface the operand; non-null
81 */
82 public function getOperand1();
83
84 /**
85 * Gets the operator.
86 *
87 * @return string one of \TYPO3\CMS\Extbase\Persistence\QueryObjectModelConstantsInterface.OPERATOR_*
88 */
89 public function getOperator();
90
91 /**
92 * Gets the second operand.
93 *
94 * @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\StaticOperandInterface the operand; non-null
95 */
96 public function getOperand2();
97 }
98
99 ?>