|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace AlgoWeb\ODataMetadata\MetadataV3\edm; |
|
4
|
|
|
|
|
5
|
|
|
use AlgoWeb\ODataMetadata\IsOK; |
|
6
|
|
|
use AlgoWeb\ODataMetadata\IsOKTraits\IsOKToolboxTrait; |
|
7
|
|
|
|
|
8
|
|
|
/** |
|
9
|
|
|
* Class representing TConstraintType |
|
10
|
|
|
* |
|
11
|
|
|
* |
|
12
|
|
|
* XSD Type: TConstraint |
|
13
|
|
|
*/ |
|
14
|
|
|
class TConstraintType extends IsOK |
|
15
|
|
|
{ |
|
16
|
|
|
use IsOKToolboxTrait; |
|
17
|
|
|
/** |
|
18
|
|
|
* @property \AlgoWeb\ODataMetadata\MetadataV3\edm\TDocumentationType $documentation |
|
19
|
|
|
*/ |
|
20
|
|
|
private $documentation = null; |
|
21
|
|
|
|
|
22
|
|
|
/** |
|
23
|
|
|
* @property \AlgoWeb\ODataMetadata\MetadataV3\edm\TReferentialConstraintRoleElementType $principal |
|
24
|
|
|
*/ |
|
25
|
|
|
private $principal = null; |
|
26
|
|
|
|
|
27
|
|
|
/** |
|
28
|
|
|
* @property \AlgoWeb\ODataMetadata\MetadataV3\edm\TReferentialConstraintRoleElementType $dependent |
|
29
|
|
|
*/ |
|
30
|
|
|
private $dependent = null; |
|
31
|
|
|
|
|
32
|
|
|
/** |
|
33
|
|
|
* Gets as documentation |
|
34
|
|
|
* |
|
35
|
|
|
* @return \AlgoWeb\ODataMetadata\MetadataV3\edm\TDocumentationType |
|
36
|
|
|
*/ |
|
37
|
|
|
public function getDocumentation() |
|
38
|
|
|
{ |
|
39
|
|
|
return $this->documentation; |
|
40
|
|
|
} |
|
41
|
|
|
|
|
42
|
|
|
/** |
|
43
|
|
|
* Sets a new documentation |
|
44
|
|
|
* |
|
45
|
|
|
* @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TDocumentationType $documentation |
|
46
|
|
|
* @return self |
|
47
|
|
|
*/ |
|
48
|
|
|
public function setDocumentation(TDocumentationType $documentation) |
|
49
|
|
|
{ |
|
50
|
|
|
$this->documentation = $documentation; |
|
51
|
|
|
return $this; |
|
52
|
|
|
} |
|
53
|
|
|
|
|
54
|
|
|
/** |
|
55
|
|
|
* Gets as principal |
|
56
|
|
|
* |
|
57
|
|
|
* @return \AlgoWeb\ODataMetadata\MetadataV3\edm\TReferentialConstraintRoleElementType |
|
58
|
|
|
*/ |
|
59
|
|
|
public function getPrincipal() |
|
60
|
|
|
{ |
|
61
|
|
|
return $this->principal; |
|
62
|
|
|
} |
|
63
|
|
|
|
|
64
|
|
|
/** |
|
65
|
|
|
* Sets a new principal |
|
66
|
|
|
* |
|
67
|
|
|
* @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TReferentialConstraintRoleElementType $principal |
|
68
|
|
|
* @return self |
|
69
|
|
|
*/ |
|
70
|
|
|
public function setPrincipal(TReferentialConstraintRoleElementType $principal) |
|
71
|
|
|
{ |
|
72
|
|
|
$this->principal = $principal; |
|
73
|
|
|
return $this; |
|
74
|
|
|
} |
|
75
|
|
|
|
|
76
|
|
|
/** |
|
77
|
|
|
* Gets as dependent |
|
78
|
|
|
* |
|
79
|
|
|
* @return \AlgoWeb\ODataMetadata\MetadataV3\edm\TReferentialConstraintRoleElementType |
|
80
|
|
|
*/ |
|
81
|
|
|
public function getDependent() |
|
82
|
|
|
{ |
|
83
|
|
|
return $this->dependent; |
|
84
|
|
|
} |
|
85
|
|
|
|
|
86
|
|
|
/** |
|
87
|
|
|
* Sets a new dependent |
|
88
|
|
|
* |
|
89
|
|
|
* @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TReferentialConstraintRoleElementType $dependent |
|
90
|
|
|
* @return self |
|
91
|
|
|
*/ |
|
92
|
|
|
public function setDependent(TReferentialConstraintRoleElementType $dependent) |
|
93
|
|
|
{ |
|
94
|
|
|
$this->dependent = $dependent; |
|
95
|
|
|
return $this; |
|
96
|
|
|
} |
|
97
|
|
|
|
|
98
|
|
|
public function isOK(&$msg = null) |
|
99
|
|
|
{ |
|
100
|
|
|
if (null == $this->documentation || !$this->isObjectNullOrOK($this->documentation, $msg)) { |
|
101
|
|
|
return false; |
|
102
|
|
|
} |
|
103
|
|
|
if (null == $this->principal || !$this->isObjectNullOrOK($this->principal, $msg)) { |
|
104
|
|
|
return false; |
|
105
|
|
|
} |
|
106
|
|
|
if (null == $this->dependent || !$this->isObjectNullOrOK($this->dependent, $msg)) { |
|
107
|
|
|
return false; |
|
108
|
|
|
} |
|
109
|
|
|
|
|
110
|
|
|
return true; |
|
111
|
|
|
} |
|
112
|
|
|
} |
|
113
|
|
|
|