1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Victoire\Bundle\QueryBundle\Entity; |
4
|
|
|
|
5
|
|
|
use Doctrine\ORM\Mapping as ORM; |
6
|
|
|
use Victoire\Bundle\BusinessEntityBundle\Entity\BusinessEntity; |
7
|
|
|
|
8
|
|
|
/** |
9
|
|
|
* Query trait adds the query fields. |
10
|
|
|
*/ |
11
|
|
|
trait QueryTrait |
12
|
|
|
{ |
13
|
|
|
/** |
14
|
|
|
* @var string |
15
|
|
|
* |
16
|
|
|
* @ORM\Column(name="query", type="text", nullable=true) |
17
|
|
|
*/ |
18
|
|
|
protected $query; |
19
|
|
|
|
20
|
|
|
/** |
21
|
|
|
* @var string |
22
|
|
|
* |
23
|
|
|
* @ORM\Column(name="orderBy", type="text", nullable=true) |
24
|
|
|
*/ |
25
|
|
|
protected $orderBy; |
26
|
|
|
|
27
|
|
|
/** |
28
|
|
|
* @deprecated |
29
|
|
|
* Auto list mode: businessentity type. |
30
|
|
|
* |
31
|
|
|
* @var string |
32
|
|
|
* @ORM\Column(name="business_entity_id", type="string", nullable=true) |
33
|
|
|
*/ |
34
|
|
|
protected $businessEntityName; |
35
|
|
|
/** |
36
|
|
|
* @ORM\ManyToOne(targetEntity="Victoire\Bundle\BusinessEntityBundle\Entity\BusinessEntity", cascade={"persist"}) |
37
|
|
|
* @ORM\JoinColumn(name="related_business_entity_id", referencedColumnName="id", onDelete="CASCADE") |
38
|
|
|
*/ |
39
|
|
|
protected $businessEntity; |
40
|
|
|
|
41
|
|
|
/** |
42
|
|
|
* Get query. |
43
|
|
|
* |
44
|
|
|
* @return string |
45
|
|
|
*/ |
46
|
|
|
public function getQuery() |
47
|
|
|
{ |
48
|
|
|
return $this->query; |
49
|
|
|
} |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* Set query. |
53
|
|
|
* |
54
|
|
|
* @param string $query |
55
|
|
|
*/ |
56
|
|
|
public function setQuery($query) |
57
|
|
|
{ |
58
|
|
|
$this->query = $query; |
59
|
|
|
} |
60
|
|
|
|
61
|
|
|
/** |
62
|
|
|
* Get orderBy. |
63
|
|
|
* |
64
|
|
|
* @return string |
65
|
|
|
*/ |
66
|
|
|
public function getOrderBy() |
67
|
|
|
{ |
68
|
|
|
return $this->orderBy; |
69
|
|
|
} |
70
|
|
|
|
71
|
|
|
/** |
72
|
|
|
* Set orderBy. |
73
|
|
|
* |
74
|
|
|
* @param string $orderBy |
75
|
|
|
*/ |
76
|
|
|
public function setOrderBy($orderBy) |
77
|
|
|
{ |
78
|
|
|
$this->orderBy = $orderBy; |
79
|
|
|
} |
80
|
|
|
|
81
|
|
|
/** |
82
|
|
|
* @deprecated |
83
|
|
|
* Get businessEntityName. |
84
|
|
|
* |
85
|
|
|
* @return int |
86
|
|
|
*/ |
87
|
|
|
public function getOldBusinessEntityName() |
88
|
|
|
{ |
89
|
|
|
return $this->businessEntityName; |
|
|
|
|
90
|
|
|
} |
91
|
|
|
|
92
|
|
|
/** |
93
|
|
|
* Get businessEntityName. |
94
|
|
|
* |
95
|
|
|
* @return int |
96
|
|
|
*/ |
97
|
|
|
public function getBusinessEntityName() |
98
|
|
|
{ |
99
|
|
|
return $this->getBusinessEntity()->getName(); |
100
|
|
|
} |
101
|
|
|
|
102
|
|
|
/** |
103
|
|
|
* @deprecated |
104
|
|
|
* Proxy to get businessEntityName. |
105
|
|
|
* |
106
|
|
|
* @return int |
107
|
|
|
*/ |
108
|
|
|
public function getBusinessEntityId() |
109
|
|
|
{ |
110
|
|
|
return $this->getBusinessEntityName(); |
111
|
|
|
} |
112
|
|
|
|
113
|
|
|
/** |
114
|
|
|
* @return mixed |
115
|
|
|
*/ |
116
|
|
|
public function getBusinessEntity() |
117
|
|
|
{ |
118
|
|
|
return $this->businessEntity; |
119
|
|
|
} |
120
|
|
|
|
121
|
|
|
/** |
122
|
|
|
* @param BusinessEntity $businessEntity |
123
|
|
|
*/ |
124
|
|
|
public function setBusinessEntity(BusinessEntity $businessEntity) |
125
|
|
|
{ |
126
|
|
|
$this->businessEntity = $businessEntity; |
127
|
|
|
} |
128
|
|
|
} |
129
|
|
|
|
This property has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the property will be removed from the class and what other property to use instead.