src/Entity/Devise.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity(repositoryClass="App\Repository\DeviseRepository")
  8.  */
  9. class Devise
  10. {
  11.     /**
  12.      * @ORM\Id()
  13.      * @ORM\GeneratedValue()
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=255)
  19.      */
  20.     private $name;
  21.     /**
  22.      * @ORM\OneToMany(targetEntity="App\Entity\AdminDonneurOrdre", mappedBy="devise")
  23.      */
  24.     private $adminDonneurOrdres;
  25.     /**
  26.      * @ORM\OneToMany(targetEntity="App\Entity\Quotation", mappedBy="devise")
  27.      */
  28.     private $quotations;
  29.     /**
  30.      * @ORM\OneToMany(targetEntity="App\Entity\Appariement", mappedBy="devise")
  31.      */
  32.     private $appariements;
  33.     /**
  34.      * @ORM\OneToMany(targetEntity="App\Entity\Appariement", mappedBy="target_devise")
  35.      */
  36.     private $target_appariements;
  37.     /**
  38.      * @ORM\OneToMany(targetEntity="App\Entity\Appariement", mappedBy="spread_devise")
  39.      */
  40.     private $spread_appariements;
  41.     /**
  42.      * @ORM\OneToMany(targetEntity="App\Entity\Appariement", mappedBy="strike_devise")
  43.      */
  44.     private $strike_appariements;
  45.     /**
  46.      * @ORM\OneToMany(targetEntity="App\Entity\Operation", mappedBy="devise")
  47.      */
  48.     private $operations;
  49.     /**
  50.      * @ORM\OneToMany(targetEntity="App\Entity\FraisDeCourtage", mappedBy="devise")
  51.      */
  52.     private $fraisDeCourtages;
  53.     /**
  54.      * @ORM\OneToMany(targetEntity="App\Entity\LeveeDeFond", mappedBy="montant_unite")
  55.      */
  56.     private $leveeDeFonds;
  57.     /**
  58.      * @ORM\OneToMany(targetEntity="App\Entity\LeveeDeFond", mappedBy="devise_finacement")
  59.      */
  60.     private $leveeDeviseFinancement;
  61.     /**
  62.      * @ORM\OneToMany(targetEntity="App\Entity\AppelDeMarge", mappedBy="devise")
  63.      */
  64.     private $appelDeMarges;
  65.     /**
  66.      * @ORM\OneToMany(targetEntity="App\Entity\AppelDeMarge", mappedBy="dvise_montant")
  67.      */
  68.     private $appelDeMargeDeviseMontant;
  69.     /**
  70.      * @ORM\OneToMany(targetEntity="App\Entity\AppelDeMarge", mappedBy="strike_devise")
  71.      */
  72.     private $applDeMargeStrike;
  73.     /**
  74.      * @ORM\OneToMany(targetEntity="App\Entity\SousJacent", mappedBy="unite2")
  75.      */
  76.     private $sousJacents;
  77.     /**
  78.      * @ORM\OneToMany(targetEntity="App\Entity\SousJacent", mappedBy="unite1")
  79.      */
  80.     private $unite2;
  81.     /**
  82.      * @ORM\OneToMany(targetEntity="App\Entity\LetterOfIntentToPurchase", mappedBy="devise")
  83.      */
  84.     private $letterOfIntentToPurchases;
  85.     /**
  86.      * @ORM\Column(type="text", nullable=true)
  87.      */
  88.     private $description;
  89.     public function __construct()
  90.     {
  91.         $this->adminDonneurOrdres = new ArrayCollection();
  92.         $this->quotations = new ArrayCollection();
  93.         $this->appariements = new ArrayCollection();
  94.         $this->target_appariements = new ArrayCollection();
  95.         $this->spread_appariements = new ArrayCollection();
  96.         $this->strike_appariements = new ArrayCollection();
  97.         $this->operations = new ArrayCollection();
  98.         $this->fraisDeCourtages = new ArrayCollection();
  99.         $this->leveeDeFonds = new ArrayCollection();
  100.         $this->leveeDeviseFinancement = new ArrayCollection();
  101.         $this->appelDeMarges = new ArrayCollection();
  102.         $this->appelDeMargeDeviseMontant = new ArrayCollection();
  103.         $this->applDeMargeStrike = new ArrayCollection();
  104.         $this->sousJacents = new ArrayCollection();
  105.         $this->unite2 = new ArrayCollection();
  106.         $this->letterOfIntentToPurchases = new ArrayCollection();
  107.     }
  108.     public function getId(): ?int
  109.     {
  110.         return $this->id;
  111.     }
  112.     public function getName(): ?string
  113.     {
  114.         return $this->name;
  115.     }
  116.     public function setName(string $name): self
  117.     {
  118.         $this->name $name;
  119.         return $this;
  120.     }
  121.     /**
  122.      * @return Collection|AdminDonneurOrdre[]
  123.      */
  124.     public function getAdminDonneurOrdres(): Collection
  125.     {
  126.         return $this->adminDonneurOrdres;
  127.     }
  128.     public function addAdminDonneurOrdre(AdminDonneurOrdre $adminDonneurOrdre): self
  129.     {
  130.         if (!$this->adminDonneurOrdres->contains($adminDonneurOrdre)) {
  131.             $this->adminDonneurOrdres[] = $adminDonneurOrdre;
  132.             $adminDonneurOrdre->setDevise($this);
  133.         }
  134.         return $this;
  135.     }
  136.     public function removeAdminDonneurOrdre(AdminDonneurOrdre $adminDonneurOrdre): self
  137.     {
  138.         if ($this->adminDonneurOrdres->contains($adminDonneurOrdre)) {
  139.             $this->adminDonneurOrdres->removeElement($adminDonneurOrdre);
  140.             // set the owning side to null (unless already changed)
  141.             if ($adminDonneurOrdre->getDevise() === $this) {
  142.                 $adminDonneurOrdre->setDevise(null);
  143.             }
  144.         }
  145.         return $this;
  146.     }
  147.     /**
  148.      * @return Collection|Quotation[]
  149.      */
  150.     public function getQuotations(): Collection
  151.     {
  152.         return $this->quotations;
  153.     }
  154.     public function addQuotation(Quotation $quotation): self
  155.     {
  156.         if (!$this->quotations->contains($quotation)) {
  157.             $this->quotations[] = $quotation;
  158.             $quotation->setDevise($this);
  159.         }
  160.         return $this;
  161.     }
  162.     public function removeQuotation(Quotation $quotation): self
  163.     {
  164.         if ($this->quotations->contains($quotation)) {
  165.             $this->quotations->removeElement($quotation);
  166.             // set the owning side to null (unless already changed)
  167.             if ($quotation->getDevise() === $this) {
  168.                 $quotation->setDevise(null);
  169.             }
  170.         }
  171.         return $this;
  172.     }
  173.     /**
  174.      * @return Collection|Appariement[]
  175.      */
  176.     public function getAppariements(): Collection
  177.     {
  178.         return $this->appariements;
  179.     }
  180.     public function addAppariement(Appariement $appariement): self
  181.     {
  182.         if (!$this->appariements->contains($appariement)) {
  183.             $this->appariements[] = $appariement;
  184.             $appariement->setDevise($this);
  185.         }
  186.         return $this;
  187.     }
  188.     public function removeAppariement(Appariement $appariement): self
  189.     {
  190.         if ($this->appariements->contains($appariement)) {
  191.             $this->appariements->removeElement($appariement);
  192.             // set the owning side to null (unless already changed)
  193.             if ($appariement->getDevise() === $this) {
  194.                 $appariement->setDevise(null);
  195.             }
  196.         }
  197.         return $this;
  198.     }
  199.     /**
  200.      * @return Collection|Appariement[]
  201.      */
  202.     public function getTargetAppariements(): Collection
  203.     {
  204.         return $this->target_appariements;
  205.     }
  206.     public function addTargetAppariement(Appariement $targetAppariement): self
  207.     {
  208.         if (!$this->target_appariements->contains($targetAppariement)) {
  209.             $this->target_appariements[] = $targetAppariement;
  210.             $targetAppariement->setTargetDevise($this);
  211.         }
  212.         return $this;
  213.     }
  214.     public function removeTargetAppariement(Appariement $targetAppariement): self
  215.     {
  216.         if ($this->target_appariements->contains($targetAppariement)) {
  217.             $this->target_appariements->removeElement($targetAppariement);
  218.             // set the owning side to null (unless already changed)
  219.             if ($targetAppariement->getTargetDevise() === $this) {
  220.                 $targetAppariement->setTargetDevise(null);
  221.             }
  222.         }
  223.         return $this;
  224.     }
  225.     /**
  226.      * @return Collection|Appariement[]
  227.      */
  228.     public function getSpreadAppariements(): Collection
  229.     {
  230.         return $this->spread_appariements;
  231.     }
  232.     public function addSpreadAppariement(Appariement $spreadAppariement): self
  233.     {
  234.         if (!$this->spread_appariements->contains($spreadAppariement)) {
  235.             $this->spread_appariements[] = $spreadAppariement;
  236.             $spreadAppariement->setSpreadDevise($this);
  237.         }
  238.         return $this;
  239.     }
  240.     public function removeSpreadAppariement(Appariement $spreadAppariement): self
  241.     {
  242.         if ($this->spread_appariements->contains($spreadAppariement)) {
  243.             $this->spread_appariements->removeElement($spreadAppariement);
  244.             // set the owning side to null (unless already changed)
  245.             if ($spreadAppariement->getSpreadDevise() === $this) {
  246.                 $spreadAppariement->setSpreadDevise(null);
  247.             }
  248.         }
  249.         return $this;
  250.     }
  251.     /**
  252.      * @return Collection|Appariement[]
  253.      */
  254.     public function getStrikeAppariements(): Collection
  255.     {
  256.         return $this->strike_appariements;
  257.     }
  258.     public function addStrikeAppariement(Appariement $strikeAppariement): self
  259.     {
  260.         if (!$this->strike_appariements->contains($strikeAppariement)) {
  261.             $this->strike_appariements[] = $strikeAppariement;
  262.             $strikeAppariement->setStrikeDevise($this);
  263.         }
  264.         return $this;
  265.     }
  266.     public function removeStrikeAppariement(Appariement $strikeAppariement): self
  267.     {
  268.         if ($this->strike_appariements->contains($strikeAppariement)) {
  269.             $this->strike_appariements->removeElement($strikeAppariement);
  270.             // set the owning side to null (unless already changed)
  271.             if ($strikeAppariement->getStrikeDevise() === $this) {
  272.                 $strikeAppariement->setStrikeDevise(null);
  273.             }
  274.         }
  275.         return $this;
  276.     }
  277.     /**
  278.      * @return Collection|Operation[]
  279.      */
  280.     public function getOperations(): Collection
  281.     {
  282.         return $this->operations;
  283.     }
  284.     public function addOperation(Operation $operation): self
  285.     {
  286.         if (!$this->operations->contains($operation)) {
  287.             $this->operations[] = $operation;
  288.             $operation->setDevise($this);
  289.         }
  290.         return $this;
  291.     }
  292.     public function removeOperation(Operation $operation): self
  293.     {
  294.         if ($this->operations->contains($operation)) {
  295.             $this->operations->removeElement($operation);
  296.             // set the owning side to null (unless already changed)
  297.             if ($operation->getDevise() === $this) {
  298.                 $operation->setDevise(null);
  299.             }
  300.         }
  301.         return $this;
  302.     }
  303.     /**
  304.      * @return Collection|FraisDeCourtage[]
  305.      */
  306.     public function getFraisDeCourtages(): Collection
  307.     {
  308.         return $this->fraisDeCourtages;
  309.     }
  310.     public function addFraisDeCourtage(FraisDeCourtage $fraisDeCourtage): self
  311.     {
  312.         if (!$this->fraisDeCourtages->contains($fraisDeCourtage)) {
  313.             $this->fraisDeCourtages[] = $fraisDeCourtage;
  314.             $fraisDeCourtage->setDevise($this);
  315.         }
  316.         return $this;
  317.     }
  318.     public function removeFraisDeCourtage(FraisDeCourtage $fraisDeCourtage): self
  319.     {
  320.         if ($this->fraisDeCourtages->contains($fraisDeCourtage)) {
  321.             $this->fraisDeCourtages->removeElement($fraisDeCourtage);
  322.             // set the owning side to null (unless already changed)
  323.             if ($fraisDeCourtage->getDevise() === $this) {
  324.                 $fraisDeCourtage->setDevise(null);
  325.             }
  326.         }
  327.         return $this;
  328.     }
  329.     /**
  330.      * @return Collection|LeveeDeFond[]
  331.      */
  332.     public function getLeveeDeFonds(): Collection
  333.     {
  334.         return $this->leveeDeFonds;
  335.     }
  336.     public function addLeveeDeFond(LeveeDeFond $leveeDeFond): self
  337.     {
  338.         if (!$this->leveeDeFonds->contains($leveeDeFond)) {
  339.             $this->leveeDeFonds[] = $leveeDeFond;
  340.             $leveeDeFond->setMontantUnite($this);
  341.         }
  342.         return $this;
  343.     }
  344.     public function removeLeveeDeFond(LeveeDeFond $leveeDeFond): self
  345.     {
  346.         if ($this->leveeDeFonds->contains($leveeDeFond)) {
  347.             $this->leveeDeFonds->removeElement($leveeDeFond);
  348.             // set the owning side to null (unless already changed)
  349.             if ($leveeDeFond->getMontantUnite() === $this) {
  350.                 $leveeDeFond->setMontantUnite(null);
  351.             }
  352.         }
  353.         return $this;
  354.     }
  355.     /**
  356.      * @return Collection|LeveeDeFond[]
  357.      */
  358.     public function getLeveeDeviseFinancement(): Collection
  359.     {
  360.         return $this->leveeDeviseFinancement;
  361.     }
  362.     public function addLeveeDeviseFinancement(LeveeDeFond $leveeDeviseFinancement): self
  363.     {
  364.         if (!$this->leveeDeviseFinancement->contains($leveeDeviseFinancement)) {
  365.             $this->leveeDeviseFinancement[] = $leveeDeviseFinancement;
  366.             $leveeDeviseFinancement->setDeviseFinacement($this);
  367.         }
  368.         return $this;
  369.     }
  370.     public function removeLeveeDeviseFinancement(LeveeDeFond $leveeDeviseFinancement): self
  371.     {
  372.         if ($this->leveeDeviseFinancement->contains($leveeDeviseFinancement)) {
  373.             $this->leveeDeviseFinancement->removeElement($leveeDeviseFinancement);
  374.             // set the owning side to null (unless already changed)
  375.             if ($leveeDeviseFinancement->getDeviseFinacement() === $this) {
  376.                 $leveeDeviseFinancement->setDeviseFinacement(null);
  377.             }
  378.         }
  379.         return $this;
  380.     }
  381.     public function __toString(): string
  382.     {
  383.         return $this->name;
  384.     }
  385.     /**
  386.      * @return Collection|AppelDeMarge[]
  387.      */
  388.     public function getAppelDeMarges(): Collection
  389.     {
  390.         return $this->appelDeMarges;
  391.     }
  392.     public function addAppelDeMarge(AppelDeMarge $appelDeMarge): self
  393.     {
  394.         if (!$this->appelDeMarges->contains($appelDeMarge)) {
  395.             $this->appelDeMarges[] = $appelDeMarge;
  396.             $appelDeMarge->setDevise($this);
  397.         }
  398.         return $this;
  399.     }
  400.     public function removeAppelDeMarge(AppelDeMarge $appelDeMarge): self
  401.     {
  402.         if ($this->appelDeMarges->contains($appelDeMarge)) {
  403.             $this->appelDeMarges->removeElement($appelDeMarge);
  404.             // set the owning side to null (unless already changed)
  405.             if ($appelDeMarge->getDevise() === $this) {
  406.                 $appelDeMarge->setDevise(null);
  407.             }
  408.         }
  409.         return $this;
  410.     }
  411.     /**
  412.      * @return Collection|AppelDeMarge[]
  413.      */
  414.     public function getAppelDeMargeDeviseMontant(): Collection
  415.     {
  416.         return $this->appelDeMargeDeviseMontant;
  417.     }
  418.     public function addAppelDeMargeDeviseMontant(AppelDeMarge $appelDeMargeDeviseMontant): self
  419.     {
  420.         if (!$this->appelDeMargeDeviseMontant->contains($appelDeMargeDeviseMontant)) {
  421.             $this->appelDeMargeDeviseMontant[] = $appelDeMargeDeviseMontant;
  422.             $appelDeMargeDeviseMontant->setDviseMontant($this);
  423.         }
  424.         return $this;
  425.     }
  426.     public function removeAppelDeMargeDeviseMontant(AppelDeMarge $appelDeMargeDeviseMontant): self
  427.     {
  428.         if ($this->appelDeMargeDeviseMontant->contains($appelDeMargeDeviseMontant)) {
  429.             $this->appelDeMargeDeviseMontant->removeElement($appelDeMargeDeviseMontant);
  430.             // set the owning side to null (unless already changed)
  431.             if ($appelDeMargeDeviseMontant->getDviseMontant() === $this) {
  432.                 $appelDeMargeDeviseMontant->setDviseMontant(null);
  433.             }
  434.         }
  435.         return $this;
  436.     }
  437.     /**
  438.      * @return Collection|AppelDeMarge[]
  439.      */
  440.     public function getApplDeMargeStrike(): Collection
  441.     {
  442.         return $this->applDeMargeStrike;
  443.     }
  444.     public function addApplDeMargeStrike(AppelDeMarge $applDeMargeStrike): self
  445.     {
  446.         if (!$this->applDeMargeStrike->contains($applDeMargeStrike)) {
  447.             $this->applDeMargeStrike[] = $applDeMargeStrike;
  448.             $applDeMargeStrike->setStrikeDevise($this);
  449.         }
  450.         return $this;
  451.     }
  452.     public function removeApplDeMargeStrike(AppelDeMarge $applDeMargeStrike): self
  453.     {
  454.         if ($this->applDeMargeStrike->contains($applDeMargeStrike)) {
  455.             $this->applDeMargeStrike->removeElement($applDeMargeStrike);
  456.             // set the owning side to null (unless already changed)
  457.             if ($applDeMargeStrike->getStrikeDevise() === $this) {
  458.                 $applDeMargeStrike->setStrikeDevise(null);
  459.             }
  460.         }
  461.         return $this;
  462.     }
  463.     /**
  464.      * @return Collection|SousJacent[]
  465.      */
  466.     public function getSousJacents(): Collection
  467.     {
  468.         return $this->sousJacents;
  469.     }
  470.     public function addSousJacent(SousJacent $sousJacent): self
  471.     {
  472.         if (!$this->sousJacents->contains($sousJacent)) {
  473.             $this->sousJacents[] = $sousJacent;
  474.             $sousJacent->setUnite2($this);
  475.         }
  476.         return $this;
  477.     }
  478.     public function removeSousJacent(SousJacent $sousJacent): self
  479.     {
  480.         if ($this->sousJacents->contains($sousJacent)) {
  481.             $this->sousJacents->removeElement($sousJacent);
  482.             // set the owning side to null (unless already changed)
  483.             if ($sousJacent->getUnite2() === $this) {
  484.                 $sousJacent->setUnite2(null);
  485.             }
  486.         }
  487.         return $this;
  488.     }
  489.     /**
  490.      * @return Collection|SousJacent[]
  491.      */
  492.     public function getUnite2(): Collection
  493.     {
  494.         return $this->unite2;
  495.     }
  496.     public function addUnite2(SousJacent $unite2): self
  497.     {
  498.         if (!$this->unite2->contains($unite2)) {
  499.             $this->unite2[] = $unite2;
  500.             $unite2->setUnite1($this);
  501.         }
  502.         return $this;
  503.     }
  504.     public function removeUnite2(SousJacent $unite2): self
  505.     {
  506.         if ($this->unite2->contains($unite2)) {
  507.             $this->unite2->removeElement($unite2);
  508.             // set the owning side to null (unless already changed)
  509.             if ($unite2->getUnite1() === $this) {
  510.                 $unite2->setUnite1(null);
  511.             }
  512.         }
  513.         return $this;
  514.     }
  515.     /**
  516.      * @return Collection|LetterOfIntentToPurchase[]
  517.      */
  518.     public function getLetterOfIntentToPurchases(): Collection
  519.     {
  520.         return $this->letterOfIntentToPurchases;
  521.     }
  522.     public function addLetterOfIntentToPurchase(LetterOfIntentToPurchase $letterOfIntentToPurchase): self
  523.     {
  524.         if (!$this->letterOfIntentToPurchases->contains($letterOfIntentToPurchase)) {
  525.             $this->letterOfIntentToPurchases[] = $letterOfIntentToPurchase;
  526.             $letterOfIntentToPurchase->setDevise($this);
  527.         }
  528.         return $this;
  529.     }
  530.     public function removeLetterOfIntentToPurchase(LetterOfIntentToPurchase $letterOfIntentToPurchase): self
  531.     {
  532.         if ($this->letterOfIntentToPurchases->contains($letterOfIntentToPurchase)) {
  533.             $this->letterOfIntentToPurchases->removeElement($letterOfIntentToPurchase);
  534.             // set the owning side to null (unless already changed)
  535.             if ($letterOfIntentToPurchase->getDevise() === $this) {
  536.                 $letterOfIntentToPurchase->setDevise(null);
  537.             }
  538.         }
  539.         return $this;
  540.     }
  541.     public function getDescription(): ?string
  542.     {
  543.         return $this->description;
  544.     }
  545.     public function setDescription(?string $description): self
  546.     {
  547.         $this->description $description;
  548.         return $this;
  549.     }
  550. }