Created
April 2, 2013 12:12
-
-
Save manuakasam/5291754 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * @author Manuel Stosic <manuel.stosic@duit.de> | |
| * @copyright 2013 DU-IT GmbH | |
| */ | |
| namespace NotaryRequest\Entity; | |
| use Doctrine\ORM\Mapping as ORM; | |
| use Doctrine\Common\Collections\ArrayCollection; | |
| use Doctrine\Common\Collections\Collection; | |
| /** | |
| * Class Request | |
| * | |
| * @package NotaryRequest\Entity | |
| * @ORM\Entity | |
| * @ORM\Table(name="requests") | |
| */ | |
| class Request | |
| { | |
| /** | |
| * Defines that the request matches no criteria | |
| */ | |
| const CRITERIA_NONE = 0; | |
| /** | |
| * Defines if the request matches §24 Abs. 2 BauBG - Erbbaurecht | |
| */ | |
| const CRITERIA_P24A2BAUBG_HERITATE = 1; | |
| /** | |
| * Defines if the request matches §24 Abs. 2 BauBG - Wohnungseigentum | |
| */ | |
| const CRITERIA_P24A2BAUBG_OWNERSHIP = 2; | |
| /** | |
| * Defines if the request matches §26 Abs. 1 Ziffer 1 BauBG - Verwandschaftsverhältnis | |
| */ | |
| const CRITERIA_P26A1Z1BAUBG_FAMILY = 3; | |
| /** | |
| * Defines if the request matches §26 Abs. 1 Ziffer 2 BauBG - öffentliche oder religiöse Zwecke | |
| */ | |
| const CRITERIA_P26A1Z2BAUBG_PUBLIC_OR_RELIGION = 4; | |
| /** | |
| * Primary Key | |
| * | |
| * @ORM\Id | |
| * @ORM\Column(name="id", type="integer", nullable=false) | |
| * @ORM\GeneratedValue(strategy="AUTO") | |
| * @var integer | |
| * @access protected | |
| */ | |
| protected $id; | |
| /** | |
| * @ORM\ManyToMany(targetEntity="\NotaryRequest\Entity\EstateData") | |
| * @ORM\JoinTable(name="requests_estates", | |
| * joinColumns={@ORM\JoinColumn(name="requests_id", referencedColumnName="id")}, | |
| * inverseJoinColumns={@ORM\JoinColumn(name="estatedata_id", referencedColumnName="id", unique=true)} | |
| * ) | |
| * @var ArrayCollection | |
| * @access protected; | |
| */ | |
| protected $estates; | |
| /*** | |
| * @ORM\ManyToMany(targetEntity="\NotaryRequest\Entity\ContractData") | |
| * @ORM\JoinTable(name="requests_contracts", | |
| * joinColumns={@ORM\JoinColumn(name="requests_id", referencedColumnName="id")}, | |
| * inverseJoinColumns={@ORM\JoinColumn(name="contractdata_id", referencedColumnName="id", unique=true)} | |
| * ) | |
| * @var ArrayCollection | |
| * @access protected; | |
| */ | |
| protected $contracts; | |
| /** | |
| * @ORM\OneToOne(targetEntity="\NotaryRequest\Entity\NotaryPersonData") | |
| * @ORM\JoinColumn(name="notaries_id", referencedColumnName="id") | |
| * @var \NotaryRequest\Entity\NotaryPersonData | |
| * @access protected | |
| */ | |
| protected $notaryPersonData; | |
| /** | |
| * @ORM\OneToOne(targetEntity="\NotaryRequest\Entity\AcquirerPersonData") | |
| * @ORM\JoinColumn(name="acquirers_id", referencedColumnName="id") | |
| * @var \NotaryRequest\Entity\AcquirerPersonData | |
| * @access protected | |
| */ | |
| protected $acquirerPersonData; | |
| /** | |
| * @ORM\OneToOne(targetEntity="\NotaryRequest\Entity\SalesPersonData") | |
| * @ORM\JoinColumn(name="salespersons_id", referencedColumnName="id") | |
| * @var \NotaryRequest\Entity\SalesPersonData | |
| * @access protected | |
| */ | |
| protected $salesPersonData; | |
| /** | |
| * @ORM\Column(name="criteria", type="integer", nullable=false) | |
| * @var integer | |
| * @access protected | |
| */ | |
| protected $criteria; | |
| /** | |
| * Constructor to initiate ArrayCollections | |
| */ | |
| public function __construct() | |
| { | |
| $this->contracts = new ArrayCollection(); | |
| $this->estates = new ArrayCollection(); | |
| } | |
| /** | |
| * @return int | |
| */ | |
| public function getId() | |
| { | |
| return $this->id; | |
| } | |
| /** | |
| * @param int $id | |
| * @return Request | |
| */ | |
| public function setId($id) | |
| { | |
| $this->id = $id; | |
| return $this; | |
| } | |
| /** | |
| * @return \Doctrine\Common\Collections\ArrayCollection | |
| */ | |
| public function getEstates() | |
| { | |
| return $this->estates; | |
| } | |
| /** | |
| * @param Collection $estates | |
| */ | |
| public function addEstates(Collection $estates) | |
| { | |
| foreach ($estates as $oneEstate) { | |
| $this->estates->add($oneEstate); | |
| } | |
| } | |
| /** | |
| * @oaram Collection $estates | |
| */ | |
| public function removeEstates(Collection $estates) | |
| { | |
| foreach ($estates as $oneEstate) { | |
| $this->estates->remove($oneEstate); | |
| } | |
| } | |
| /** | |
| * @return \Doctrine\Common\Collections\ArrayCollection | |
| */ | |
| public function getContracts() | |
| { | |
| return $this->contracts; | |
| } | |
| /** | |
| * @param Collection $contracts | |
| */ | |
| public function addContracts(Collection $contracts) | |
| { | |
| foreach ($contracts as $oneContract) { | |
| $this->contracts->add($oneContract); | |
| } | |
| } | |
| /** | |
| * @param Collection $contracts | |
| */ | |
| public function removeContracts(Collection $contracts) | |
| { | |
| foreach ($contracts as $oneContract) { | |
| $this->contracts->remove($oneContract); | |
| } | |
| } | |
| /** | |
| * @return \NotaryRequest\Entity\AcquirerPersonData | |
| */ | |
| public function getAcquirerPersonData() | |
| { | |
| return $this->acquirerPersonData; | |
| } | |
| /** | |
| * @param \NotaryRequest\Entity\AcquirerPersonData $acquirerPersonData | |
| * @return Request | |
| */ | |
| public function setAcquirerPersonData(AcquirerPersonData $acquirerPersonData) | |
| { | |
| $this->acquirerPersonData = $acquirerPersonData; | |
| return $this; | |
| } | |
| /** | |
| * @return \NotaryRequest\Entity\NotaryPersonData | |
| */ | |
| public function getNotaryPersonData() | |
| { | |
| return $this->notaryPersonData; | |
| } | |
| /** | |
| * @param \NotaryRequest\Entity\NotaryPersonData $notaryPersonData | |
| * @return Request | |
| */ | |
| public function setNotaryPersonData(NotaryPersonData $notaryPersonData) | |
| { | |
| $this->notaryPersonData = $notaryPersonData; | |
| return $this; | |
| } | |
| /** | |
| * @return \NotaryRequest\Entity\SalesPersonData | |
| */ | |
| public function getSalesPersonData() | |
| { | |
| return $this->salesPersonData; | |
| } | |
| /** | |
| * @param \NotaryRequest\Entity\SalesPersonData $salesPersonData | |
| * @return Request | |
| */ | |
| public function setSalesPersonData(SalesPersonData $salesPersonData) | |
| { | |
| $this->salesPersonData = $salesPersonData; | |
| return $this; | |
| } | |
| /** | |
| * @return int | |
| */ | |
| public function getCriteria() | |
| { | |
| return $this->criteria; | |
| } | |
| /** | |
| * @param int $criteria | |
| * @return Request | |
| */ | |
| public function setCriteria($criteria) | |
| { | |
| $this->criteria = $criteria; | |
| return $this; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment