comment = new CommentEmbeddable(); } /** * GETTERS */ public function getId(): ?int { return $this->id; } public function getFreeText(): ?string { return $this->freeText; } public function getComment(): CommentEmbeddable { return $this->comment; } public function getKind(): ?PersonResourceKind { return $this->kind; } public function getPersonOwner(): ?Person { return $this->personOwner; } public function getPerson(): ?Person { return $this->person; } public function getThirdParty(): ?ThirdParty { return $this->thirdParty; } public function getCreatedAt(): ?DateTimeInterface { return $this->createdAt; } public function getCreatedBy(): ?User { return $this->createdBy; } public function getUpdatedAt(): ?DateTimeInterface { return $this->updatedAt; } public function getUpdatedBy(): ?User { return $this->updatedBy; } /** * SETTERS */ public function setFreeText(?string $freeText): self { $this->freeText = $freeText; if ('' !== $freeText && $freeText !== null) { $this->setPerson(null); $this->setThirdParty(null); } return $this; } public function setComment(?CommentEmbeddable $comment): self { $this->comment = $comment; return $this; } public function setKind(?PersonResourceKind $kind): self { $this->kind = $kind; return $this; } public function setPersonOwner(?Person $personOwner): self { $this->personOwner = $personOwner; return $this; } public function setPerson(?Person $person): self { $this->person = $person; if (null !== $person) { $this->setFreeText(""); $this->setThirdParty(null); } return $this; } public function setThirdParty(?ThirdParty $thirdParty): self { $this->thirdParty = $thirdParty; if (null !== $thirdParty) { $this->setFreeText(""); $this->setPerson(null); } return $this; } public function setCreatedAt(DateTimeInterface $createdAt): self { $this->createdAt = $createdAt; return $this; } public function setCreatedBy(?User $createdBy): self { $this->createdBy = $createdBy; return $this; } public function setUpdatedAt(DateTimeInterface $updatedAt): self { $this->updatedAt = $updatedAt; return $this; } public function setUpdatedBy(?User $updatedBy): self { $this->updatedBy = $updatedBy; return $this; } }