Passed
Push — master ( feaee9...2b3e4e )
by Alex
04:28
created

TEntityPropertyType::issetTypeAnnotation()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace AlgoWeb\ODataMetadata\MetadataV3\edm;
4
5
use AlgoWeb\ODataMetadata\IsOK;
6
use AlgoWeb\ODataMetadata\MetadataV3\edm\Groups\TCommonPropertyAttributesTrait;
7
8
/**
9
 * Class representing TEntityPropertyType
10
 *
11
 *
12
 * XSD Type: TEntityProperty
13
 */
14
class TEntityPropertyType extends IsOK
15
{
16
    use TCommonPropertyAttributesTrait;
17
 
18
    /**
19
     * @property string $storeGeneratedPattern
20
     */
21
    private $storeGeneratedPattern = null;
22
23
    /**
24
     * @property \AlgoWeb\ODataMetadata\MetadataV3\edm\TDocumentationType[] $documentation
25
     */
26
    private $documentation = [];
27
28
    /**
29
     * @property \AlgoWeb\ODataMetadata\MetadataV3\edm\TValueAnnotationType[] $valueAnnotation
30
     */
31
    private $valueAnnotation = [];
32
33
    /**
34
     * @property \AlgoWeb\ODataMetadata\MetadataV3\edm\TTypeAnnotationType[] $typeAnnotation
35
     */
36
    private $typeAnnotation = [];
37
38
    /**
39
     * Gets as storeGeneratedPattern
40
     *
41
     * @return string
42
     */
43
    public function getStoreGeneratedPattern()
44
    {
45
        return $this->storeGeneratedPattern;
46
    }
47
48
    /**
49
     * Sets a new storeGeneratedPattern
50
     *
51
     * @param string $storeGeneratedPattern
52
     * @return self
53
     */
54
    public function setStoreGeneratedPattern($storeGeneratedPattern)
55
    {
56
        $this->storeGeneratedPattern = $storeGeneratedPattern;
57
        return $this;
58
    }
59
60
    /**
61
     * Adds as documentation
62
     *
63
     * @return self
64
     * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TDocumentationType $documentation
65
     */
66
    public function addToDocumentation(TDocumentationType $documentation)
67
    {
68
        $this->documentation[] = $documentation;
69
        return $this;
70
    }
71
72
    /**
73
     * isset documentation
74
     *
75
     * @param scalar $index
76
     * @return boolean
77
     */
78
    public function issetDocumentation($index)
79
    {
80
        return isset($this->documentation[$index]);
81
    }
82
83
    /**
84
     * unset documentation
85
     *
86
     * @param scalar $index
87
     * @return void
88
     */
89
    public function unsetDocumentation($index)
90
    {
91
        unset($this->documentation[$index]);
92
    }
93
94
    /**
95
     * Gets as documentation
96
     *
97
     * @return \AlgoWeb\ODataMetadata\MetadataV3\edm\TDocumentationType[]
98
     */
99
    public function getDocumentation()
100
    {
101
        return $this->documentation;
102
    }
103
104
    /**
105
     * Sets a new documentation
106
     *
107
     * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TDocumentationType[] $documentation
108
     * @return self
109
     */
110
    public function setDocumentation(array $documentation)
111
    {
112
        $this->documentation = $documentation;
113
        return $this;
114
    }
115
116
    /**
117
     * Adds as valueAnnotation
118
     *
119
     * @return self
120
     * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TValueAnnotationType $valueAnnotation
121
     */
122
    public function addToValueAnnotation(TValueAnnotationType $valueAnnotation)
123
    {
124
        $this->valueAnnotation[] = $valueAnnotation;
125
        return $this;
126
    }
127
128
    /**
129
     * isset valueAnnotation
130
     *
131
     * @param scalar $index
132
     * @return boolean
133
     */
134
    public function issetValueAnnotation($index)
135
    {
136
        return isset($this->valueAnnotation[$index]);
137
    }
138
139
    /**
140
     * unset valueAnnotation
141
     *
142
     * @param scalar $index
143
     * @return void
144
     */
145
    public function unsetValueAnnotation($index)
146
    {
147
        unset($this->valueAnnotation[$index]);
148
    }
149
150
    /**
151
     * Gets as valueAnnotation
152
     *
153
     * @return \AlgoWeb\ODataMetadata\MetadataV3\edm\TValueAnnotationType[]
154
     */
155
    public function getValueAnnotation()
156
    {
157
        return $this->valueAnnotation;
158
    }
159
160
    /**
161
     * Sets a new valueAnnotation
162
     *
163
     * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TValueAnnotationType[] $valueAnnotation
164
     * @return self
165
     */
166
    public function setValueAnnotation(array $valueAnnotation)
167
    {
168
        $this->valueAnnotation = $valueAnnotation;
169
        return $this;
170
    }
171
172
    /**
173
     * Adds as typeAnnotation
174
     *
175
     * @return self
176
     * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TTypeAnnotationType $typeAnnotation
177
     */
178
    public function addToTypeAnnotation(TTypeAnnotationType $typeAnnotation)
179
    {
180
        $this->typeAnnotation[] = $typeAnnotation;
181
        return $this;
182
    }
183
184
    /**
185
     * isset typeAnnotation
186
     *
187
     * @param scalar $index
188
     * @return boolean
189
     */
190
    public function issetTypeAnnotation($index)
191
    {
192
        return isset($this->typeAnnotation[$index]);
193
    }
194
195
    /**
196
     * unset typeAnnotation
197
     *
198
     * @param scalar $index
199
     * @return void
200
     */
201
    public function unsetTypeAnnotation($index)
202
    {
203
        unset($this->typeAnnotation[$index]);
204
    }
205
206
    /**
207
     * Gets as typeAnnotation
208
     *
209
     * @return \AlgoWeb\ODataMetadata\MetadataV3\edm\TTypeAnnotationType[]
210
     */
211
    public function getTypeAnnotation()
212
    {
213
        return $this->typeAnnotation;
214
    }
215
216
    /**
217
     * Sets a new typeAnnotation
218
     *
219
     * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TTypeAnnotationType[] $typeAnnotation
220
     * @return self
221
     */
222
    public function setTypeAnnotation(array $typeAnnotation)
223
    {
224
        $this->typeAnnotation = $typeAnnotation;
225
        return $this;
226
    }
227
228
    public function isOK(&$msg = null)
229
    {
230
        if (!$this->isTCommonPropertyAttributesValid($msg)) {
231
            return false;
232
        }
233
        return true;
234
    }
235
}
236