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