1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace AlgoWeb\ODataMetadata\MetadataV3\mapping\cs; |
4
|
|
|
|
5
|
|
|
use AlgoWeb\ODataMetadata\IsOK; |
6
|
|
|
use AlgoWeb\ODataMetadata\MetadataV3\mapping\cs\Groups\TPropertyGroup; |
7
|
|
|
|
8
|
|
|
/** |
9
|
|
|
* Class representing TMappingFragmentType |
10
|
|
|
* |
11
|
|
|
* Type for MappingFragment element |
12
|
|
|
* |
13
|
|
|
* XSD Type: TMappingFragment |
14
|
|
|
*/ |
15
|
|
|
class TMappingFragmentType extends IsOK |
16
|
|
|
{ |
17
|
|
|
use TPropertyGroup; |
18
|
|
|
/** |
19
|
|
|
* @property string $storeEntitySet |
20
|
|
|
*/ |
21
|
|
|
private $storeEntitySet = null; |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* @property boolean $makeColumnsDistinct |
25
|
|
|
*/ |
26
|
|
|
private $makeColumnsDistinct = null; |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* Gets as storeEntitySet |
30
|
|
|
* |
31
|
|
|
* @return string |
32
|
|
|
*/ |
33
|
|
|
public function getStoreEntitySet() |
34
|
|
|
{ |
35
|
|
|
return $this->storeEntitySet; |
36
|
|
|
} |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* Sets a new storeEntitySet |
40
|
|
|
* |
41
|
|
|
* @param string $storeEntitySet |
42
|
|
|
* @return self |
43
|
|
|
*/ |
44
|
|
|
public function setStoreEntitySet($storeEntitySet) |
45
|
|
|
{ |
46
|
|
|
$this->storeEntitySet = $storeEntitySet; |
47
|
|
|
return $this; |
48
|
|
|
} |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* Gets as makeColumnsDistinct |
52
|
|
|
* |
53
|
|
|
* @return boolean |
54
|
|
|
*/ |
55
|
|
|
public function getMakeColumnsDistinct() |
56
|
|
|
{ |
57
|
|
|
return $this->makeColumnsDistinct; |
58
|
|
|
} |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* Sets a new makeColumnsDistinct |
62
|
|
|
* |
63
|
|
|
* @param boolean $makeColumnsDistinct |
64
|
|
|
* @return self |
65
|
|
|
*/ |
66
|
|
|
public function setMakeColumnsDistinct($makeColumnsDistinct) |
67
|
|
|
{ |
68
|
|
|
$this->makeColumnsDistinct = $makeColumnsDistinct; |
69
|
|
|
return $this; |
70
|
|
|
} |
71
|
|
|
|
72
|
|
|
public function isOK(&$msg = null) |
73
|
|
|
{ |
74
|
|
|
if (!$this->isStringNotNullOrEmpty($this->storeEntitySet)) { |
75
|
|
|
$msg = 'Name cannot be null or empty'; |
76
|
|
|
return false; |
77
|
|
|
} |
78
|
|
|
if (!$this->isPropertyGroupOK($msg)) { |
79
|
|
|
return false; |
80
|
|
|
} |
81
|
|
|
return true; |
82
|
|
|
} |
83
|
|
|
} |
84
|
|
|
|