ObjetivoPlanPatria.php
7.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
<?php
namespace UBV\SurUbvBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
/**
* UBV\SurUbvBundle\Entity\ObjetivoPlanPatria
*
* @ORM\Entity(repositoryClass="UBV\SurUbvBundle\Entity\ObjetivoPlanPatriaRepository")
* @ORM\Table(name="objetivo_plan_patria", indexes={@ORM\Index(name="fk_objetivo_plan_patria_objetivo_nivel1_idx", columns={"objetivo_nivel_id"}), @ORM\Index(name="fk_objetivo_plan_patria_objetivo_plan_patria1_idx", columns={"dependencia_id"})}, uniqueConstraints={@ORM\UniqueConstraint(name="id_objetivo_plan_patria_UNIQUE", columns={"id"})})
*/
class ObjetivoPlanPatria
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
* @ORM\SequenceGenerator(sequenceName="objetivo_plan_patria_id_seq", allocationSize=1, initialValue=1)
*/
protected $id;
/**
* @ORM\Column(type="string", length=20)
*/
protected $indice_objetivo;
/**
* @ORM\Column(type="string", length=700)
*/
protected $descripcion;
/**
* @ORM\OneToMany(targetEntity="ObjetivoPlanPatria", mappedBy="objetivoPlanPatria")
* @ORM\JoinColumn(name="id", referencedColumnName="dependencia_id", nullable=false)
*/
protected $objetivoPlanPatrias;
/**
* @ORM\ManyToOne(targetEntity="ObjetivoNivel", inversedBy="objetivoPlanPatrias")
* @ORM\JoinColumn(name="objetivo_nivel_id", referencedColumnName="id", nullable=false)
*/
protected $objetivoNivel;
/**
* @ORM\ManyToOne(targetEntity="ObjetivoPlanPatria", inversedBy="objetivoPlanPatrias")
* @ORM\JoinColumn(name="dependencia_id", referencedColumnName="id")
*/
protected $objetivoPlanPatria;
/**
* @ORM\ManyToMany(targetEntity="Proyecto", inversedBy="objetivoPlanPatrias")
* @ORM\JoinTable(name="proyecto_plan_patria",
* joinColumns={@ORM\JoinColumn(name="objetivo_plan_patria_id", referencedColumnName="id", nullable=false)},
* inverseJoinColumns={@ORM\JoinColumn(name="proyecto_id", referencedColumnName="id", nullable=false)}
* )
*/
protected $proyectos;
public function __construct()
{
$this->objetivoPlanPatrias = new ArrayCollection();
$this->proyectos = new ArrayCollection();
}
/**
* Set the value of id.
*
* @param integer $id
* @return \UBV\SurUbvBundle\Entity\ObjetivoPlanPatria
*/
public function setId($id)
{
$this->id = $id;
return $this;
}
/**
* Get the value of id.
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set the value of indice_objetivo.
*
* @param string $indice_objetivo
* @return \UBV\SurUbvBundle\Entity\ObjetivoPlanPatria
*/
public function setIndiceObjetivo($indice_objetivo)
{
$this->indice_objetivo = $indice_objetivo;
return $this;
}
/**
* Get the value of indice_objetivo.
*
* @return string
*/
public function getIndiceObjetivo()
{
return $this->indice_objetivo;
}
/**
* Set the value of descripcion.
*
* @param string $descripcion
* @return \UBV\SurUbvBundle\Entity\ObjetivoPlanPatria
*/
public function setDescripcion($descripcion)
{
$this->descripcion = $descripcion;
return $this;
}
/**
* Get the value of descripcion.
*
* @return string
*/
public function getDescripcion()
{
return $this->descripcion;
}
/**
* Add ObjetivoPlanPatria entity to collection (one to many).
*
* @param \UBV\SurUbvBundle\Entity\ObjetivoPlanPatria $objetivoPlanPatria
* @return \UBV\SurUbvBundle\Entity\ObjetivoPlanPatria
*/
public function addObjetivoPlanPatria(ObjetivoPlanPatria $objetivoPlanPatria)
{
$this->objetivoPlanPatrias[] = $objetivoPlanPatria;
return $this;
}
/**
* Remove ObjetivoPlanPatria entity from collection (one to many).
*
* @param \UBV\SurUbvBundle\Entity\ObjetivoPlanPatria $objetivoPlanPatria
* @return \UBV\SurUbvBundle\Entity\ObjetivoPlanPatria
*/
public function removeObjetivoPlanPatria(ObjetivoPlanPatria $objetivoPlanPatria)
{
$this->objetivoPlanPatrias->removeElement($objetivoPlanPatria);
return $this;
}
/**
* Get ObjetivoPlanPatria entity collection (one to many).
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getObjetivoPlanPatrias()
{
return $this->objetivoPlanPatrias;
}
/**
* Set ObjetivoNivel entity (many to one).
*
* @param \UBV\SurUbvBundle\Entity\ObjetivoNivel $objetivoNivel
* @return \UBV\SurUbvBundle\Entity\ObjetivoPlanPatria
*/
public function setObjetivoNivel(ObjetivoNivel $objetivoNivel = null)
{
$this->objetivoNivel = $objetivoNivel;
return $this;
}
/**
* Get ObjetivoNivel entity (many to one).
*
* @return \UBV\SurUbvBundle\Entity\ObjetivoNivel
*/
public function getObjetivoNivel()
{
return $this->objetivoNivel;
}
/**
* Set ObjetivoPlanPatria entity (many to one).
*
* @param \UBV\SurUbvBundle\Entity\ObjetivoPlanPatria $objetivoPlanPatria
* @return \UBV\SurUbvBundle\Entity\ObjetivoPlanPatria
*/
public function setObjetivoPlanPatria(ObjetivoPlanPatria $objetivoPlanPatria = null)
{
$this->objetivoPlanPatria = $objetivoPlanPatria;
return $this;
}
/**
* Get ObjetivoPlanPatria entity (many to one).
*
* @return \UBV\SurUbvBundle\Entity\ObjetivoPlanPatria
*/
public function getObjetivoPlanPatria()
{
return $this->objetivoPlanPatria;
}
/**
* Add Proyecto entity to collection.
*
* @param \UBV\SurUbvBundle\Entity\Proyecto $proyecto
* @return \UBV\SurUbvBundle\Entity\ObjetivoPlanPatria
*/
public function addProyecto(Proyecto $proyecto)
{
$proyecto->addObjetivoPlanPatria($this);
$this->proyectos[] = $proyecto;
return $this;
}
/**
* Remove Proyecto entity from collection.
*
* @param \UBV\SurUbvBundle\Entity\Proyecto $proyecto
* @return \UBV\SurUbvBundle\Entity\ObjetivoPlanPatria
*/
public function removeProyecto(Proyecto $proyecto)
{
$proyecto->removeObjetivoPlanPatria($this);
$this->proyectos->removeElement($proyecto);
return $this;
}
/**
* Get Proyecto entity collection.
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getProyectos()
{
return $this->proyectos;
}
public function __sleep()
{
return array('id', 'indice_objetivo', 'descripcion', 'objetivo_nivel_id', 'dependencia_id');
}
public function getObjePlanPatria()
{
return $this->indice_objetivo . " " . $this->objetivoPlanPatria;
}
public function __toString() {
return $this->descripcion;
}
}