public function setNiveltipo(Niveltipo $v = null) { if ($v === null) { $this->setFkNiveltipoId(0); } else { $this->setFkNiveltipoId($v->getId()); } $this->aNiveltipo = $v; if ($v !== null) { $v->addEstablecimiento($this); } return $this; }