<?php
namespace App\Entity\Search;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=SearchEngineParametersRepository::class)
*/
class SearchEngineParameters
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\OneToMany(targetEntity=SearchIndustry::class, mappedBy="searchEngine",cascade={"persist","remove"})
*/
private $searchIndustries;
/**
* @ORM\OneToMany(targetEntity=SearchCity::class, mappedBy="searchEngine",cascade={"persist","remove"})
*/
private $searchCities;
/**
* @ORM\OneToMany(targetEntity=SearchTechnology::class, mappedBy="searchEngine",cascade={"persist","remove"})
*/
private $searchTechnologies;
/**
* @ORM\OneToMany(targetEntity=SearchAnother::class, mappedBy="searchEngine",cascade={"persist","remove"})
*/
private $searchAnothers;
public function __construct()
{
$this->searchIndustries = new ArrayCollection();
$this->searchCities = new ArrayCollection();
$this->searchTechnologies = new ArrayCollection();
$this->searchAnothers = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
/**
* @return Collection|SearchIndustry[]
*/
public function getSearchIndustries(): Collection
{
return $this->searchIndustries;
}
public function addSearchIndustry(?SearchIndustry $searchIndustry): self
{
if(is_null($searchIndustry) === false){
if (!$this->searchIndustries->contains($searchIndustry)) {
$this->searchIndustries[] = $searchIndustry;
$searchIndustry->setSearchEngine($this);
}
}
return $this;
}
public function removeSearchIndustry(SearchIndustry $searchIndustry): self
{
if ($this->searchIndustries->removeElement($searchIndustry)) {
// set the owning side to null (unless already changed)
if ($searchIndustry->getSearchEngine() === $this) {
$searchIndustry->setSearchEngine(null);
}
}
return $this;
}
/**
* @return Collection|SearchCity[]
*/
public function getSearchCities(): Collection
{
return $this->searchCities;
}
public function addSearchCity(?SearchCity $searchCity): self
{
if(is_null($searchCity) === false){
if (!$this->searchCities->contains($searchCity)) {
$this->searchCities[] = $searchCity;
$searchCity->setSearchEngine($this);
}
}
return $this;
}
public function removeSearchCity(SearchCity $searchCity): self
{
if ($this->searchCities->removeElement($searchCity)) {
// set the owning side to null (unless already changed)
if ($searchCity->getSearchEngine() === $this) {
$searchCity->setSearchEngine(null);
}
}
return $this;
}
/**
* @return Collection|SearchTechnology[]
*/
public function getSearchTechnologies(): Collection
{
return $this->searchTechnologies;
}
public function addSearchTechnology(?SearchTechnology $searchTechnology): self
{
if(is_null($searchTechnology) === false){
if (!$this->searchTechnologies->contains($searchTechnology)) {
$this->searchTechnologies[] = $searchTechnology;
$searchTechnology->setSearchEngine($this);
}
}
return $this;
}
public function removeSearchTechnology(SearchTechnology $searchTechnology): self
{
if ($this->searchTechnologies->removeElement($searchTechnology)) {
// set the owning side to null (unless already changed)
if ($searchTechnology->getSearchEngine() === $this) {
$searchTechnology->setSearchEngine(null);
}
}
return $this;
}
/**
* @return Collection|SearchAnother[]
*/
public function getSearchAnothers(): Collection
{
return $this->searchAnothers;
}
public function addSearchAnother(SearchAnother $searchAnother): self
{
if (!$this->searchAnothers->contains($searchAnother)) {
$this->searchAnothers[] = $searchAnother;
$searchAnother->setSearchEngine($this);
}
return $this;
}
public function removeSearchAnother(SearchAnother $searchAnother): self
{
if ($this->searchAnothers->removeElement($searchAnother)) {
// set the owning side to null (unless already changed)
if ($searchAnother->getSearchEngine() === $this) {
$searchAnother->setSearchEngine(null);
}
}
return $this;
}
}