[CLEANUP] General code cleanup
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Classes / Persistence / Generic / Qom / Join.php
1 <?php
2 namespace TYPO3\CMS\Extbase\Persistence\Generic\Qom;
3
4 /***************************************************************
5 * Copyright notice
6 *
7 * (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
8 * All rights reserved
9 *
10 * This class is a backport of the corresponding class of FLOW3.
11 * All credits go to the v5 team.
12 *
13 * This script is part of the TYPO3 project. The TYPO3 project is
14 * free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
18 *
19 * The GNU General Public License can be found at
20 * http://www.gnu.org/copyleft/gpl.html.
21 *
22 * This script is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU General Public License for more details.
26 *
27 * This copyright notice MUST APPEAR in all copies of the script!
28 ***************************************************************/
29 /**
30 * Performs a join between two node-tuple sources.
31 *
32 * @package Extbase
33 * @subpackage Persistence\QOM
34 * @version $Id$
35 * @scope prototype
36 */
37 class Join implements \TYPO3\CMS\Extbase\Persistence\Generic\Qom\JoinInterface {
38
39 /**
40 * @var \TYPO3\CMS\Extbase\Persistence\Generic\Qom\SourceInterface
41 */
42 protected $left;
43
44 /**
45 * @var \TYPO3\CMS\Extbase\Persistence\Generic\Qom\SourceInterface
46 */
47 protected $right;
48
49 /**
50 * @var integer
51 */
52 protected $joinType;
53
54 /**
55 * @var \TYPO3\CMS\Extbase\Persistence\Generic\Qom\JoinConditionInterface
56 */
57 protected $joinCondition;
58
59 /**
60 * Constructs the Join instance
61 *
62 * @param \TYPO3\CMS\Extbase\Persistence\Generic\Qom\SourceInterface $left the left node-tuple source; non-null
63 * @param \TYPO3\CMS\Extbase\Persistence\Generic\Qom\SourceInterface $right the right node-tuple source; non-null
64 * @param string $joinType one of QueryObjectModelConstants.JCR_JOIN_TYPE_*
65 * @param JoinConditionInterface $joinCondition
66 */
67 public function __construct(\TYPO3\CMS\Extbase\Persistence\Generic\Qom\SourceInterface $left, \TYPO3\CMS\Extbase\Persistence\Generic\Qom\SourceInterface $right, $joinType, \TYPO3\CMS\Extbase\Persistence\Generic\Qom\JoinConditionInterface $joinCondition) {
68 $this->left = $left;
69 $this->right = $right;
70 $this->joinType = $joinType;
71 $this->joinCondition = $joinCondition;
72 }
73
74 /**
75 * Gets the left node-tuple source.
76 *
77 * @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\SourceInterface the left source; non-null
78 */
79 public function getLeft() {
80 return $this->left;
81 }
82
83 /**
84 * Gets the right node-tuple source.
85 *
86 * @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\SourceInterface the right source; non-null
87 */
88 public function getRight() {
89 return $this->right;
90 }
91
92 /**
93 * Gets the join type.
94 *
95 * @return string one of QueryObjectModelConstants.JCR_JOIN_TYPE_*
96 */
97 public function getJoinType() {
98 return $this->joinType;
99 }
100
101 /**
102 * Gets the join condition.
103 *
104 * @return JoinConditionInterface the join condition; non-null
105 */
106 public function getJoinCondition() {
107 return $this->joinCondition;
108 }
109
110 }
111
112
113 ?>