Add Extbase 1.0.1 to TYPO3core. Do NOT make changes inside! See misc/core_svn_rules...
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Classes / Persistence / QOM / Join.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 * Performs a join between two node-tuple sources.
30 *
31 * @package Extbase
32 * @subpackage Persistence\QOM
33 * @version $Id: Join.php 1729 2009-11-25 21:37:20Z stucki $
34 * @scope prototype
35 */
36 class Tx_Extbase_Persistence_QOM_Join implements Tx_Extbase_Persistence_QOM_JoinInterface {
37
38 /**
39 * @var Tx_Extbase_Persistence_QOM_SourceInterface
40 */
41 protected $left;
42
43 /**
44 * @var Tx_Extbase_Persistence_QOM_SourceInterface
45 */
46 protected $right;
47
48 /**
49 * @var integer
50 */
51 protected $joinType;
52
53 /**
54 * @var Tx_Extbase_Persistence_QOM_JoinConditionInterface
55 */
56 protected $joinCondition;
57
58 /**
59 * Constructs the Join instance
60 *
61 * @param Tx_Extbase_Persistence_QOM_SourceInterface $left the left node-tuple source; non-null
62 * @param Tx_Extbase_Persistence_QOM_SourceInterface $right the right node-tuple source; non-null
63 * @param string $joinType one of QueryObjectModelConstants.JCR_JOIN_TYPE_*
64 * @param Tx_Extbase_Persistence_QOM_JoinConditionInterface $join Condition the join condition; non-null
65 */
66 public function __construct(Tx_Extbase_Persistence_QOM_SourceInterface $left, Tx_Extbase_Persistence_QOM_SourceInterface $right, $joinType, Tx_Extbase_Persistence_QOM_JoinConditionInterface $joinCondition) {
67 $this->left = $left;
68 $this->right = $right;
69 $this->joinType = $joinType;
70 $this->joinCondition = $joinCondition;
71 }
72
73 /**
74 * Gets the left node-tuple source.
75 *
76 * @return Tx_Extbase_Persistence_QOM_SourceInterface the left source; non-null
77 */
78 public function getLeft() {
79 return $this->left;
80 }
81
82 /**
83 * Gets the right node-tuple source.
84 *
85 * @return Tx_Extbase_Persistence_QOM_SourceInterface the right source; non-null
86 */
87 public function getRight() {
88 return $this->right;
89 }
90
91 /**
92 * Gets the join type.
93 *
94 * @return string one of QueryObjectModelConstants.JCR_JOIN_TYPE_*
95 */
96 public function getJoinType() {
97 return $this->joinType;
98 }
99
100 /**
101 * Gets the join condition.
102 *
103 * @return JoinCondition the join condition; non-null
104 */
105 public function getJoinCondition() {
106 return $this->joinCondition;
107 }
108
109 }
110
111 ?>