RDBOneToManyRelationDescription.php
1 <?php
2 /**
3  * wCMF - wemove Content Management Framework
4  * Copyright (C) 2005-2015 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 
14 
15 /**
16  * Instances of RDBOneToManyRelationDescription describe a one to many relation
17  * from 'this' end (one) to 'other' end (many) in a relational database.
18  *
19  * @author ingo herwig <ingo@wemove.com>
20  */
22 
23  protected $idName = '';
24  protected $fkName = '';
25 
26  /**
27  * Constructor.
28  * @param $thisType The PersistentObject type at this end
29  * @param $thisRole The role name at this end
30  * @param $otherType The PersistentObject type at the other end
31  * @param $otherRole The role name at the other end
32  * @param $thisMinMultiplicity The minimum number of instances at this end (number or 'unbound')
33  * @param $thisMaxMultiplicity The maximum number of instances at this end (number or 'unbound')
34  * @param $otherMinMultiplicity The minimum number of instances at the other end (number or 'unbound')
35  * @param $otherMaxMultiplicity The maximum number of instances at the other end (number or 'unbound')
36  * @param $thisAggregationKind The aggregation kind at this end ('none', 'shared' or 'composite')
37  * @param $otherAggregationKind The aggregation kind at the other end ('none', 'shared' or 'composite')
38  * @param $thisNavigability Boolean whether this end is navigable from the other end or not
39  * @param $otherNavigability Boolean whether the other end is navigable from this end or not
40  * @param $hierarchyType The hierarchy type that the other end has in relation to this end ('parent', 'child', 'undefined')
41  * @param $idName The name of the attribute in 'this' end's type, that is referenced by the foreign key attribute in the 'other' end's type
42  * @param $fkName The name of the foreign key attribute in the 'other' end's type
43  */
47 
51 
52  $this->idName = $idName;
53  $this->fkName = $fkName;
54  }
55 
56  /**
57  * Get the name of the attribute in 'this' end's type, that is referenced by
58  * the foreign key attribute in the 'other' end's type
59  * @return String
60  */
61  public function getIdName() {
62  return $this->idName;
63  }
64 
65  /**
66  * Get the name of the foreign key attribute in the 'other' end's type
67  * @return String
68  */
69  public function getFkName() {
70  return $this->fkName;
71  }
72 }
73 ?>
__construct($thisType, $thisRole, $otherType, $otherRole, $thisMinMultiplicity, $thisMaxMultiplicity, $otherMinMultiplicity, $otherMaxMultiplicity, $thisAggregationKind, $otherAggregationKind, $thisNavigability, $otherNavigability, $hierarchyType, $idName, $fkName)
Constructor.
getFkName()
Get the name of the foreign key attribute in the 'other' end's type.
Instances of RelationDescription describe relations between different types of PersistentObjects.
getIdName()
Get the name of the attribute in 'this' end's type, that is referenced by the foreign key attribute i...
Instances of RDBOneToManyRelationDescription describe a one to many relation from 'this' end (one) to...