| @@ 204-237 (lines=34) @@ | ||
| 201 | return $this; |
|
| 202 | } |
|
| 203 | ||
| 204 | public function isOK(&$msg = null) |
|
| 205 | { |
|
| 206 | if (!$this->isStringNotNullOrEmpty($this->name)) { |
|
| 207 | $msg = "Name cannot be null or empty"; |
|
| 208 | return false; |
|
| 209 | } |
|
| 210 | if (!$this->isTUndottedIdentifierValid($this->name)) { |
|
| 211 | $msg = "Name must be a valid TUndottedIdentifier"; |
|
| 212 | return false; |
|
| 213 | } |
|
| 214 | if (!$this->isObjectNullOrType( |
|
| 215 | '\AlgoWeb\ODataMetadata\MetadataV3\edm\ssdl\TDocumentationType', |
|
| 216 | $this->documentation, |
|
| 217 | $msg |
|
| 218 | )) { |
|
| 219 | return false; |
|
| 220 | } |
|
| 221 | if (!$this->isValidArrayOK( |
|
| 222 | $this->entitySet, |
|
| 223 | '\AlgoWeb\ODataMetadata\MetadataV3\edm\ssdl\EntityContainer\EntitySetAnonymousType', |
|
| 224 | $msg |
|
| 225 | )) { |
|
| 226 | return false; |
|
| 227 | } |
|
| 228 | if (!$this->isValidArrayOK( |
|
| 229 | $this->associationSet, |
|
| 230 | '\AlgoWeb\ODataMetadata\MetadataV3\edm\ssdl\EntityContainer\AssociationSetAnonymousType', |
|
| 231 | $msg |
|
| 232 | )) { |
|
| 233 | return false; |
|
| 234 | } |
|
| 235 | ||
| 236 | return true; |
|
| 237 | } |
|
| 238 | } |
|
| 239 | ||
| @@ 159-186 (lines=28) @@ | ||
| 156 | return $this; |
|
| 157 | } |
|
| 158 | ||
| 159 | public function isOK(&$msg = null) |
|
| 160 | { |
|
| 161 | if (!$this->isStringNotNullOrEmpty($this->name)) { |
|
| 162 | $msg = "Name cannot be null or empty"; |
|
| 163 | return false; |
|
| 164 | } |
|
| 165 | if (!$this->isTUndottedIdentifierValid($this->name)) { |
|
| 166 | $msg = "Name must be a valid TUndottedIdentifier"; |
|
| 167 | return false; |
|
| 168 | } |
|
| 169 | if (!$this->isObjectNullOrOK($this->referentialConstraint, $msg)) { |
|
| 170 | return false; |
|
| 171 | } |
|
| 172 | if (!$this->isObjectNullOrOK($this->documentation, $msg)) { |
|
| 173 | return false; |
|
| 174 | } |
|
| 175 | if (!$this->isValidArrayOK( |
|
| 176 | $this->end, |
|
| 177 | '\AlgoWeb\ODataMetadata\MetadataV3\edm\ssdl\TAssociationEndType', |
|
| 178 | $msg, |
|
| 179 | 2, |
|
| 180 | 2 |
|
| 181 | )) { |
|
| 182 | return false; |
|
| 183 | } |
|
| 184 | ||
| 185 | return true; |
|
| 186 | } |
|
| 187 | } |
|
| 188 | ||