|
TYPO3 API
SVNRelease
|
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 * Tests whether the value of a property in a first selector is equal to the value of a 00030 * property in a second selector. 00031 * A node-tuple satisfies the constraint only if: the selector1Name node has a property named property1Name, and 00032 * the selector2Name node has a property named property2Name, and 00033 * the value of property property1Name is equal to the value of property property2Name. 00034 * 00035 * @package Extbase 00036 * @subpackage Persistence\QOM 00037 * @version $Id: EquiJoinCondition.php 1729 2009-11-25 21:37:20Z stucki $ 00038 * @scope prototype 00039 */ 00040 class Tx_Extbase_Persistence_QOM_EquiJoinCondition implements Tx_Extbase_Persistence_QOM_JoinConditionInterface { 00041 00042 /** 00043 * @var string 00044 */ 00045 protected $selector1Name; 00046 00047 /** 00048 * @var string 00049 */ 00050 protected $property1Name; 00051 00052 /** 00053 * @var string 00054 */ 00055 protected $selector2Name; 00056 00057 /** 00058 * @var string 00059 */ 00060 protected $property2Name; 00061 00062 /** 00063 * Constructs this EquiJoinCondition instance 00064 * 00065 * @param string $selector1Name the name of the first selector; non-null 00066 * @param string $property1Name the property name in the first selector; non-null 00067 * @param string $selector2Name the name of the second selector; non-null 00068 * @param string $property2Name the property name in the second selector; non-null 00069 */ 00070 public function __construct($selector1Name, $property1Name, $selector2Name, $property2Name) { 00071 // TODO Test for selector1Name = selector2Name -> exception 00072 $this->selector1Name = $selector1Name; 00073 $this->property1Name = $property1Name; 00074 $this->selector2Name = $selector2Name; 00075 $this->property2Name = $property2Name; 00076 } 00077 00078 /** 00079 * Gets the name of the first selector. 00080 * 00081 * @return string the selector name; non-null 00082 */ 00083 public function getSelector1Name() { 00084 return $this->selector1Name; 00085 } 00086 00087 /** 00088 * Gets the name of the first property. 00089 * 00090 * @return string the property name; non-null 00091 */ 00092 public function getProperty1Name() { 00093 return $this->property1Name; 00094 } 00095 00096 /** 00097 * Gets the name of the second selector. 00098 * 00099 * @return string the selector name; non-null 00100 */ 00101 public function getSelector2Name() { 00102 return $this->selector2Name; 00103 } 00104 00105 /** 00106 * Gets the name of the second property. 00107 * 00108 * @return string the property name; non-null 00109 */ 00110 public function getProperty2Name() { 00111 return $this->property2Name; 00112 } 00113 00114 } 00115 00116 ?>
1.8.0