[TASK] Re-work/simplify copyright header in PHP files - Part 8
[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 * This file is part of the TYPO3 CMS project.
6 *
7 * It is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License, either version 2
9 * of the License, or any later version.
10 *
11 * For the full copyright and license information, please read the
12 * LICENSE.txt file that was distributed with this source code.
13 *
14 * The TYPO3 project - inspiring people to share!
15 */
16 /**
17 * Filters node-tuples based on the outcome of a binary operation.
18 *
19 * For any comparison, operand2 always evaluates to a scalar value. In contrast,
20 * operand1 may evaluate to an array of values (for example, the value of a multi-valued
21 * property), in which case the comparison is separately performed for each element
22 * of the array, and the Comparison constraint is satisfied as a whole if the
23 * comparison against any element of the array is satisfied.
24 *
25 * If operand1 and operand2 evaluate to values of different property types, the
26 * value of operand2 is converted to the property type of the value of operand1.
27 * If the type conversion fails, the query is invalid.
28 *
29 * If operator is not supported for the property type of operand1, the query is invalid.
30 *
31 * If operand1 evaluates to null (for example, if the operand evaluates the value
32 * of a property which does not exist), the constraint is not satisfied.
33 *
34 * The JCR_OPERATOR_EQUAL_TO operator is satisfied only if the value of operand1
35 * equals the value of operand2.
36 *
37 * The JCR_OPERATOR_NOT_EQUAL_TO operator is satisfied unless the value of
38 * operand1 equals the value of operand2.
39 *
40 * The JCR_OPERATOR_LESSS_THAN operator is satisfied only if the value of
41 * operand1 is ordered before the value of operand2.
42 *
43 * The JCR_OPERATOR_LESS_THAN_OR_EQUAL_TO operator is satisfied unless the value
44 * of operand1 is ordered after the value of operand2.
45 *
46 * The JCR_OPERATOR_GREATER_THAN operator is satisfied only if the value of
47 * operand1 is ordered after the value of operand2.
48 *
49 * The JCR_OPERATOR_GREATER_THAN_OR_EQUAL_TO operator is satisfied unless the
50 * value of operand1 is ordered before the value of operand2.
51 *
52 * The JCR_OPERATOR_LIKE operator is satisfied only if the value of operand1
53 * matches the pattern specified by the value of operand2, where in the pattern:
54 * the character "%" matches zero or more characters, and
55 * the character "_" (underscore) matches exactly one character, and
56 * the string "\x" matches the character "x", and
57 * all other characters match themselves.
58 *
59 * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
60 */
61 interface ComparisonInterface extends ConstraintInterface {
62
63 /**
64 * Gets the first operand.
65 *
66 * @return PropertyValueInterface the operand; non-null
67 */
68 public function getOperand1();
69
70 /**
71 * Gets the operator.
72 *
73 * @return string one of \TYPO3\CMS\Extbase\Persistence\QueryInterface::*
74 */
75 public function getOperator();
76
77 /**
78 * Gets the second operand.
79 *
80 * @return StaticOperandInterface the operand; non-null
81 */
82 public function getOperand2();
83
84 /**
85 * @param string $parameterIdentifier
86 * @return void
87 */
88 public function setParameterIdentifier($parameterIdentifier);
89
90 /**
91 * @return string
92 */
93 public function getParameterIdentifier();
94 }