Raised DBAL version from 1.1.5 to 1.1.6
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Classes / Persistence / QOM / EquiJoinCondition.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 * Tests whether the value of a property in a first selector is equal to the value of a
30 * property in a second selector.
31 * A node-tuple satisfies the constraint only if: the selector1Name node has a property named property1Name, and
32 * the selector2Name node has a property named property2Name, and
33 * the value of property property1Name is equal to the value of property property2Name.
34 *
35 * @package Extbase
36 * @subpackage Persistence\QOM
37 * @version $Id: EquiJoinCondition.php 1729 2009-11-25 21:37:20Z stucki $
38 * @scope prototype
39 */
40 class Tx_Extbase_Persistence_QOM_EquiJoinCondition implements Tx_Extbase_Persistence_QOM_JoinConditionInterface {
41
42 /**
43 * @var string
44 */
45 protected $selector1Name;
46
47 /**
48 * @var string
49 */
50 protected $property1Name;
51
52 /**
53 * @var string
54 */
55 protected $selector2Name;
56
57 /**
58 * @var string
59 */
60 protected $property2Name;
61
62 /**
63 * Constructs this EquiJoinCondition instance
64 *
65 * @param string $selector1Name the name of the first selector; non-null
66 * @param string $property1Name the property name in the first selector; non-null
67 * @param string $selector2Name the name of the second selector; non-null
68 * @param string $property2Name the property name in the second selector; non-null
69 */
70 public function __construct($selector1Name, $property1Name, $selector2Name, $property2Name) {
71 // TODO Test for selector1Name = selector2Name -> exception
72 $this->selector1Name = $selector1Name;
73 $this->property1Name = $property1Name;
74 $this->selector2Name = $selector2Name;
75 $this->property2Name = $property2Name;
76 }
77
78 /**
79 * Gets the name of the first selector.
80 *
81 * @return string the selector name; non-null
82 */
83 public function getSelector1Name() {
84 return $this->selector1Name;
85 }
86
87 /**
88 * Gets the name of the first property.
89 *
90 * @return string the property name; non-null
91 */
92 public function getProperty1Name() {
93 return $this->property1Name;
94 }
95
96 /**
97 * Gets the name of the second selector.
98 *
99 * @return string the selector name; non-null
100 */
101 public function getSelector2Name() {
102 return $this->selector2Name;
103 }
104
105 /**
106 * Gets the name of the second property.
107 *
108 * @return string the property name; non-null
109 */
110 public function getProperty2Name() {
111 return $this->property2Name;
112 }
113
114 }
115
116 ?>