TYPO3 API  SVNRelease
ComparisonInterface.php
Go to the documentation of this file.
00001 <?php
00002 /***************************************************************
00003 *  Copyright notice
00004 *
00005 *  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
00006 *  All rights reserved
00007 *
00008 *  This class is a backport of the corresponding class of FLOW3.
00009 *  All credits go to the v5 team.
00010 *
00011 *  This script is part of the TYPO3 project. The TYPO3 project is
00012 *  free software; you can redistribute it and/or modify
00013 *  it under the terms of the GNU General Public License as published by
00014 *  the Free Software Foundation; either version 2 of the License, or
00015 *  (at your option) any later version.
00016 *
00017 *  The GNU General Public License can be found at
00018 *  http://www.gnu.org/copyleft/gpl.html.
00019 *
00020 *  This script is distributed in the hope that it will be useful,
00021 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00022 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00023 *  GNU General Public License for more details.
00024 *
00025 *  This copyright notice MUST APPEAR in all copies of the script!
00026 ***************************************************************/
00027 
00028 /**
00029  * Filters node-tuples based on the outcome of a binary operation.
00030  *
00031  * For any comparison, operand2 always evaluates to a scalar value. In contrast,
00032  * operand1 may evaluate to an array of values (for example, the value of a multi-valued
00033  * property), in which case the comparison is separately performed for each element
00034  * of the array, and the Comparison constraint is satisfied as a whole if the
00035  * comparison against any element of the array is satisfied.
00036  *
00037  * If operand1 and operand2 evaluate to values of different property types, the
00038  * value of operand2 is converted to the property type of the value of operand1.
00039  * If the type conversion fails, the query is invalid.
00040  *
00041  * If operator is not supported for the property type of operand1, the query is invalid.
00042  *
00043  * If operand1 evaluates to null (for example, if the operand evaluates the value
00044  * of a property which does not exist), the constraint is not satisfied.
00045  *
00046  * The JCR_OPERATOR_EQUAL_TO operator is satisfied only if the value of operand1
00047  * equals the value of operand2.
00048  *
00049  * The JCR_OPERATOR_NOT_EQUAL_TO operator is satisfied unless the value of
00050  * operand1 equals the value of operand2.
00051  *
00052  * The JCR_OPERATOR_LESSS_THAN operator is satisfied only if the value of
00053  * operand1 is ordered before the value of operand2.
00054  *
00055  * The JCR_OPERATOR_LESS_THAN_OR_EQUAL_TO operator is satisfied unless the value
00056  * of operand1 is ordered after the value of operand2.
00057  *
00058  * The JCR_OPERATOR_GREATER_THAN operator is satisfied only if the value of
00059  * operand1 is ordered after the value of operand2.
00060  *
00061  * The JCR_OPERATOR_GREATER_THAN_OR_EQUAL_TO operator is satisfied unless the
00062  * value of operand1 is ordered before the value of operand2.
00063  *
00064  * The JCR_OPERATOR_LIKE operator is satisfied only if the value of operand1
00065  * matches the pattern specified by the value of operand2, where in the pattern:
00066  * * the character "%" matches zero or more characters, and
00067  * * the character "_" (underscore) matches exactly one character, and
00068  * * the string "\x" matches the character "x", and
00069  *   all other characters match themselves.
00070  *
00071  * @package Extbase
00072  * @subpackage Persistence\QOM
00073  * @version $Id: ComparisonInterface.php 1729 2009-11-25 21:37:20Z stucki $
00074  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
00075  */
00076 interface Tx_Extbase_Persistence_QOM_ComparisonInterface extends Tx_Extbase_Persistence_QOM_ConstraintInterface {
00077 
00078     /**
00079      *
00080      * Gets the first operand.
00081      *
00082      * @return Tx_Extbase_Persistence_QOM_DynamicOperandInterface the operand; non-null
00083      */
00084     public function getOperand1();
00085 
00086     /**
00087      * Gets the operator.
00088      *
00089      * @return string one of Tx_Extbase_Persistence_QueryObjectModelConstantsInterface.OPERATOR_*
00090      */
00091     public function getOperator();
00092 
00093     /**
00094      * Gets the second operand.
00095      *
00096      * @return Tx_Extbase_Persistence_QOM_StaticOperandInterface the operand; non-null
00097      */
00098     public function getOperand2();
00099 
00100 }
00101 
00102 ?>