RDBManyToManyRelationDescription.php
1 <?php
2 /**
3  * wCMF - wemove Content Management Framework
4  * Copyright (C) 2005-2020 wemove digital solutions GmbH
5  *
6  * Licensed under the terms of the MIT License.
7  *
8  * See the LICENSE file distributed with this work for
9  * additional information.
10  */
11 namespace wcmf\lib\model\mapper;
12 
16 
17 /**
18  * Instances of RDBManyToManyRelationDescription describe a many to many relation
19  * from 'this' end to 'other' end in a relational database.
20  * This relation is always realized by a connecting database table and can be resolved
21  * into a many-to-one relation from 'this' end to the relation type and a one-to-many relation
22  * from the relation type to the 'other' end.
23  *
24  * @author ingo herwig <ingo@wemove.com>
25  */
27 
28  protected $thisEndRelation = '';
29  protected $otherEndRelation = '';
30 
31  /**
32  * Constructor.
33  * @see RelationDescription::__construct
34  * @param $thisEndRelation The RDBOneToManyRelationDescription describing the relation between 'this' end and the connecting type
35  * @param $otherEndRelation The RDBManyToOneRelationDescription describing the relation between the connecting type and the 'other' end
36  */
38  $this->thisEndRelation = $thisEndRelation;
39  $this->otherEndRelation = $otherEndRelation;
40  }
41 
42  /**
43  * Get the RDBOneToManyRelationDescription describing the relation between
44  * 'this' end and the connecting type
45  * @return RelationDescription
46  */
47  public function getThisEndRelation() {
49  }
50 
51  /**
52  * Get the RDBManyToOneRelationDescription describing the relation between
53  * the connecting type and the 'other' end
54  * @return RelationDescription
55  */
56  public function getOtherEndRelation() {
58  }
59 
60  /**
61  * @see RelationDescription::isMultiValued
62  */
63  public function isMultiValued() {
64  return true;
65  }
66 
67  /**
68  * @see RelationDescription::getThisType
69  */
70  public function getThisType() {
71  return $this->thisEndRelation->thisType;
72  }
73 
74  /**
75  * @see RelationDescription::getThisRole
76  */
77  public function getThisRole() {
78  return $this->thisEndRelation->thisRole;
79  }
80 
81  /**
82  * @see RelationDescription::getOtherType
83  */
84  public function getOtherType() {
85  return $this->otherEndRelation->otherType;
86  }
87 
88  /**
89  * @see RelationDescription::getOtherRole
90  */
91  public function getOtherRole() {
92  return $this->otherEndRelation->otherRole;
93  }
94 
95  /**
96  * @see RelationDescription::getThisMinMultiplicity
97  */
98  public function getThisMinMultiplicity() {
99  return $this->thisEndRelation->thisMinMultiplicity;
100  }
101 
102  /**
103  * @see RelationDescription::getThisMaxMultiplicity
104  */
105  public function getThisMaxMultiplicity() {
106  return $this->thisEndRelation->thisMaxMultiplicity;
107  }
108 
109  /**
110  * @see RelationDescription::getOtherMinMultiplicity
111  */
112  public function getOtherMinMultiplicity() {
113  return $this->thisEndRelation->otherMinMultiplicity;
114  }
115 
116  /**
117  * @see RelationDescription::getOtherMaxMultiplicity
118  */
119  public function getOtherMaxMultiplicity() {
120  return $this->thisEndRelation->otherMaxMultiplicity;
121  }
122 
123  /**
124  * @see RelationDescription::getThisAggregationKind
125  */
126  public function getThisAggregationKind() {
127  return $this->thisEndRelation->thisAggregationKind;
128  }
129 
130  /**
131  * @see RelationDescription::getOtherAggregationKind
132  */
133  public function getOtherAggregationKind() {
134  return $this->otherEndRelation->otherAggregationKind;
135  }
136 
137  /**
138  * @see RelationDescription::getThisNavigability
139  */
140  public function getThisNavigability() {
141  return $this->thisEndRelation->thisNavigability;
142  }
143 
144  /**
145  * @see RelationDescription::getOtherNavigability
146  */
147  public function getOtherNavigability() {
148  return $this->otherEndRelation->otherNavigability;
149  }
150 
151  /**
152  * @see RelationDescription::getHierarchyType
153  */
154  public function getHierarchyType() {
155  return 'child';
156  }
157 }
158 ?>
Instances of RDBManyToManyRelationDescription describe a many to many relation from 'this' end to 'ot...
getThisEndRelation()
Get the RDBOneToManyRelationDescription describing the relation between 'this' end and the connecting...
Instances of RDBManyToOneRelationDescription describe a many to one relation from 'this' end (many) t...
getOtherEndRelation()
Get the RDBManyToOneRelationDescription describing the relation between the connecting type and the '...
Instances of RelationDescription describe relations between different types of PersistentObjects.
__construct(RDBOneToManyRelationDescription $thisEndRelation, RDBManyToOneRelationDescription $otherEndRelation)
Constructor.
Instances of RDBOneToManyRelationDescription describe a one to many relation from 'this' end (one) to...