@@ 15-127 (lines=113) @@ | ||
12 | * |
|
13 | * XSD Type: TFunctionReferenceExpression |
|
14 | */ |
|
15 | class TFunctionReferenceExpressionType extends IsOK |
|
16 | { |
|
17 | use IsOKToolboxTrait, TQualifiedNameTrait; |
|
18 | /** |
|
19 | * @property string $function |
|
20 | */ |
|
21 | private $function = null; |
|
22 | ||
23 | /** |
|
24 | * @property |
|
25 | * \AlgoWeb\ODataMetadata\MetadataV3\edm\TFunctionReferenceExpressionType\ParameterAnonymousType[] |
|
26 | * $parameter |
|
27 | */ |
|
28 | private $parameter = []; |
|
29 | ||
30 | /** |
|
31 | * Gets as function |
|
32 | * |
|
33 | * @return string |
|
34 | */ |
|
35 | public function getFunction() |
|
36 | { |
|
37 | return $this->function; |
|
38 | } |
|
39 | ||
40 | /** |
|
41 | * Sets a new function |
|
42 | * |
|
43 | * @param string $function |
|
44 | * @return self |
|
45 | */ |
|
46 | public function setFunction($function) |
|
47 | { |
|
48 | $this->function = $function; |
|
49 | return $this; |
|
50 | } |
|
51 | ||
52 | /** |
|
53 | * Adds as parameter |
|
54 | * |
|
55 | * @return self |
|
56 | * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TFunctionReferenceExpressionType\ParameterAnonymousType |
|
57 | * $parameter |
|
58 | */ |
|
59 | public function addToParameter(TFunctionReferenceExpressionType\ParameterAnonymousType $parameter) |
|
60 | { |
|
61 | $this->parameter[] = $parameter; |
|
62 | return $this; |
|
63 | } |
|
64 | ||
65 | /** |
|
66 | * isset parameter |
|
67 | * |
|
68 | * @param scalar $index |
|
69 | * @return boolean |
|
70 | */ |
|
71 | public function issetParameter($index) |
|
72 | { |
|
73 | return isset($this->parameter[$index]); |
|
74 | } |
|
75 | ||
76 | /** |
|
77 | * unset parameter |
|
78 | * |
|
79 | * @param scalar $index |
|
80 | * @return void |
|
81 | */ |
|
82 | public function unsetParameter($index) |
|
83 | { |
|
84 | unset($this->parameter[$index]); |
|
85 | } |
|
86 | ||
87 | /** |
|
88 | * Gets as parameter |
|
89 | * |
|
90 | * @return |
|
91 | * \AlgoWeb\ODataMetadata\MetadataV3\edm\TFunctionReferenceExpressionType\ParameterAnonymousType[] |
|
92 | */ |
|
93 | public function getParameter() |
|
94 | { |
|
95 | return $this->parameter; |
|
96 | } |
|
97 | ||
98 | /** |
|
99 | * Sets a new parameter |
|
100 | * |
|
101 | * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TFunctionReferenceExpressionType\ParameterAnonymousType[] |
|
102 | * $parameter |
|
103 | * @return self |
|
104 | */ |
|
105 | public function setParameter(array $parameter) |
|
106 | { |
|
107 | $this->parameter = $parameter; |
|
108 | return $this; |
|
109 | } |
|
110 | ||
111 | public function isOK(&$msg = null) |
|
112 | { |
|
113 | if (!$this->isTQualifiedNameValid($this->function)) { |
|
114 | $msg = "Function must be a valid TQualifiedName"; |
|
115 | return false; |
|
116 | } |
|
117 | if (!$this->isValidArrayOK( |
|
118 | $this->function, |
|
119 | '\AlgoWeb\ODataMetadata\MetadataV3\edm\TFunctionReferenceExpressionType\ParameterAnonymousType', |
|
120 | $msg, |
|
121 | 1 |
|
122 | )) { |
|
123 | return false; |
|
124 | } |
|
125 | return true; |
|
126 | } |
|
127 | } |
|
128 |
@@ 15-122 (lines=108) @@ | ||
12 | * |
|
13 | * XSD Type: TRecordExpression |
|
14 | */ |
|
15 | class TRecordExpressionType extends IsOK |
|
16 | { |
|
17 | use IsOKToolboxTrait, TUnwrappedFunctionTypeTrait; |
|
18 | /** |
|
19 | * @property string $type |
|
20 | */ |
|
21 | private $type = null; |
|
22 | ||
23 | /** |
|
24 | * @property \AlgoWeb\ODataMetadata\MetadataV3\edm\TPropertyValueType[] $propertyValue |
|
25 | */ |
|
26 | private $propertyValue = []; |
|
27 | ||
28 | /** |
|
29 | * Gets as type |
|
30 | * |
|
31 | * @return string |
|
32 | */ |
|
33 | public function getType() |
|
34 | { |
|
35 | return $this->type; |
|
36 | } |
|
37 | ||
38 | /** |
|
39 | * Sets a new type |
|
40 | * |
|
41 | * @param string $type |
|
42 | * @return self |
|
43 | */ |
|
44 | public function setType($type) |
|
45 | { |
|
46 | $this->type = $type; |
|
47 | return $this; |
|
48 | } |
|
49 | ||
50 | /** |
|
51 | * Adds as propertyValue |
|
52 | * |
|
53 | * @return self |
|
54 | * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TPropertyValueType $propertyValue |
|
55 | */ |
|
56 | public function addToPropertyValue(TPropertyValueType $propertyValue) |
|
57 | { |
|
58 | $this->propertyValue[] = $propertyValue; |
|
59 | return $this; |
|
60 | } |
|
61 | ||
62 | /** |
|
63 | * isset propertyValue |
|
64 | * |
|
65 | * @param scalar $index |
|
66 | * @return boolean |
|
67 | */ |
|
68 | public function issetPropertyValue($index) |
|
69 | { |
|
70 | return isset($this->propertyValue[$index]); |
|
71 | } |
|
72 | ||
73 | /** |
|
74 | * unset propertyValue |
|
75 | * |
|
76 | * @param scalar $index |
|
77 | * @return void |
|
78 | */ |
|
79 | public function unsetPropertyValue($index) |
|
80 | { |
|
81 | unset($this->propertyValue[$index]); |
|
82 | } |
|
83 | ||
84 | /** |
|
85 | * Gets as propertyValue |
|
86 | * |
|
87 | * @return \AlgoWeb\ODataMetadata\MetadataV3\edm\TPropertyValueType[] |
|
88 | */ |
|
89 | public function getPropertyValue() |
|
90 | { |
|
91 | return $this->propertyValue; |
|
92 | } |
|
93 | ||
94 | /** |
|
95 | * Sets a new propertyValue |
|
96 | * |
|
97 | * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TPropertyValueType[] $propertyValue |
|
98 | * @return self |
|
99 | */ |
|
100 | public function setPropertyValue(array $propertyValue) |
|
101 | { |
|
102 | $this->propertyValue = $propertyValue; |
|
103 | return $this; |
|
104 | } |
|
105 | ||
106 | public function isOK(&$msg = null) |
|
107 | { |
|
108 | if (null != $this->type && !$this->isTUnwrappedFunctionTypeValid($this->type)) { |
|
109 | $msg = "Type must be a valid TUnwrappedFunctionType"; |
|
110 | return false; |
|
111 | } |
|
112 | if (!$this->isValidArrayOK( |
|
113 | $this->propertyValue, |
|
114 | '\AlgoWeb\ODataMetadata\MetadataV3\edm\TPropertyValueType', |
|
115 | $msg |
|
116 | )) { |
|
117 | return false; |
|
118 | } |
|
119 | ||
120 | return true; |
|
121 | } |
|
122 | } |
|
123 |
@@ 15-123 (lines=109) @@ | ||
12 | * |
|
13 | * XSD Type: TReferentialConstraintRoleElement |
|
14 | */ |
|
15 | class TReferentialConstraintRoleElementType extends IsOK |
|
16 | { |
|
17 | use IsOKToolboxTrait, TSimpleIdentifierTrait; |
|
18 | /** |
|
19 | * @property string $role |
|
20 | */ |
|
21 | private $role = null; |
|
22 | ||
23 | /** |
|
24 | * @property \AlgoWeb\ODataMetadata\MetadataV3\edm\TPropertyRefType[] $propertyRef |
|
25 | */ |
|
26 | private $propertyRef = []; |
|
27 | ||
28 | /** |
|
29 | * Gets as role |
|
30 | * |
|
31 | * @return string |
|
32 | */ |
|
33 | public function getRole() |
|
34 | { |
|
35 | return $this->role; |
|
36 | } |
|
37 | ||
38 | /** |
|
39 | * Sets a new role |
|
40 | * |
|
41 | * @param string $role |
|
42 | * @return self |
|
43 | */ |
|
44 | public function setRole($role) |
|
45 | { |
|
46 | $this->role = $role; |
|
47 | return $this; |
|
48 | } |
|
49 | ||
50 | /** |
|
51 | * Adds as propertyRef |
|
52 | * |
|
53 | * @return self |
|
54 | * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TPropertyRefType $propertyRef |
|
55 | */ |
|
56 | public function addToPropertyRef(TPropertyRefType $propertyRef) |
|
57 | { |
|
58 | $this->propertyRef[] = $propertyRef; |
|
59 | return $this; |
|
60 | } |
|
61 | ||
62 | /** |
|
63 | * isset propertyRef |
|
64 | * |
|
65 | * @param scalar $index |
|
66 | * @return boolean |
|
67 | */ |
|
68 | public function issetPropertyRef($index) |
|
69 | { |
|
70 | return isset($this->propertyRef[$index]); |
|
71 | } |
|
72 | ||
73 | /** |
|
74 | * unset propertyRef |
|
75 | * |
|
76 | * @param scalar $index |
|
77 | * @return void |
|
78 | */ |
|
79 | public function unsetPropertyRef($index) |
|
80 | { |
|
81 | unset($this->propertyRef[$index]); |
|
82 | } |
|
83 | ||
84 | /** |
|
85 | * Gets as propertyRef |
|
86 | * |
|
87 | * @return \AlgoWeb\ODataMetadata\MetadataV3\edm\TPropertyRefType[] |
|
88 | */ |
|
89 | public function getPropertyRef() |
|
90 | { |
|
91 | return $this->propertyRef; |
|
92 | } |
|
93 | ||
94 | /** |
|
95 | * Sets a new propertyRef |
|
96 | * |
|
97 | * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TPropertyRefType[] $propertyRef |
|
98 | * @return self |
|
99 | */ |
|
100 | public function setPropertyRef(array $propertyRef) |
|
101 | { |
|
102 | $this->propertyRef = $propertyRef; |
|
103 | return $this; |
|
104 | } |
|
105 | ||
106 | public function isOK(&$msg = null) |
|
107 | { |
|
108 | if (!$this->isTSimpleIdentifierValid($this->role)) { |
|
109 | $msg = "Role must be a valid TSimpleIdentifier"; |
|
110 | return false; |
|
111 | } |
|
112 | if (!$this->isValidArrayOK( |
|
113 | $this->propertyRef, |
|
114 | '\AlgoWeb\ODataMetadata\MetadataV3\edm\TPropertyRefType', |
|
115 | $msg, |
|
116 | 1 |
|
117 | )) { |
|
118 | return false; |
|
119 | } |
|
120 | ||
121 | return true; |
|
122 | } |
|
123 | } |
|
124 |