Advertisement
Guest User

Question

a guest
Nov 19th, 2011
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.65 KB | None | 0 0
  1. <?php
  2.  
  3. namespace dn\AnkieterBundle\Entity;
  4.  
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Doctrine\Common\Collections\ArrayCollection;
  7.  
  8. /**
  9.  * dn\AnkieterBundle\Entity\Question
  10.  *
  11.  * @ORM\Table()
  12.  * @ORM\Entity
  13.  */
  14. class Question
  15. {
  16.     /**
  17.      * @var integer $id
  18.      *
  19.      * @ORM\Column(name="id", type="integer")
  20.      * @ORM\Id
  21.      * @ORM\GeneratedValue(strategy="AUTO")
  22.      */
  23.     private $id;
  24.  
  25.     /**
  26.      * @var integer $position
  27.      *
  28.      * @ORM\Column(name="position", type="integer")
  29.      */
  30.     private $position;
  31.  
  32.     /**
  33.      * @var string $content
  34.      *
  35.      * @ORM\Column(name="content", type="string", length=255)
  36.      */
  37.     private $content;
  38.  
  39.  
  40.     /**
  41.      * @ORM\ManyToOne(targetEntity="Inquiry", inversedBy="questions")
  42.      * @ORM\JoinColumn(name="inquiry_id", referencedColumnName="id")
  43.      */
  44.     protected $inquiry;
  45.  
  46.  
  47.     /**
  48.      * @ORM\OneToMany(targetEntity="Answer", mappedBy="question")
  49.      */
  50.     protected $answers;
  51.  
  52.  
  53.     public function __construct()
  54.     {
  55.         $this->answers = new ArrayCollection();
  56.     }
  57.  
  58.  
  59.     /**
  60.      * Get id
  61.      *
  62.      * @return integer
  63.      */
  64.     public function getId()
  65.     {
  66.         return $this->id;
  67.     }
  68.  
  69.     /**
  70.      * Set position
  71.      *
  72.      * @param integer $position
  73.      */
  74.     public function setPosition($position)
  75.     {
  76.         $this->position = $position;
  77.     }
  78.  
  79.     /**
  80.      * Get position
  81.      *
  82.      * @return integer
  83.      */
  84.     public function getPosition()
  85.     {
  86.         return $this->position;
  87.     }
  88.  
  89.     /**
  90.      * Set content
  91.      *
  92.      * @param string $content
  93.      */
  94.     public function setContent($content)
  95.     {
  96.         $this->content = $content;
  97.     }
  98.  
  99.     /**
  100.      * Get content
  101.      *
  102.      * @return string
  103.      */
  104.     public function getContent()
  105.     {
  106.         return $this->content;
  107.     }
  108.  
  109.     /**
  110.      * Set inquiry
  111.      *
  112.      * @param dn\AnkieterBundle\Entity\Inquiry $inquiry
  113.      */
  114.     public function setInquiry(\dn\AnkieterBundle\Entity\Inquiry $inquiry)
  115.     {
  116.         $this->inquiry = $inquiry;
  117.     }
  118.  
  119.     /**
  120.      * Get inquiry
  121.      *
  122.      * @return dn\AnkieterBundle\Entity\Inquiry
  123.      */
  124.     public function getInquiry()
  125.     {
  126.         return $this->inquiry;
  127.     }
  128.  
  129.     /**
  130.      * Add answers
  131.      *
  132.      * @param dn\AnkieterBundle\Entity\Answer $answers
  133.      */
  134.     public function addAnswer(\dn\AnkieterBundle\Entity\Answer $answers)
  135.     {
  136.         $this->answers[] = $answers;
  137.     }
  138.  
  139.     /**
  140.      * Get answers
  141.      *
  142.      * @return Doctrine\Common\Collections\Collection
  143.      */
  144.     public function getAnswers()
  145.     {
  146.         return $this->answers;
  147.     }
  148. }
  149.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement