Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- use Doctrine\ORM\Mapping as ORM;
- namespace Entity;
- /**
- * Entity\Cloud
- *
- * @orm:Table(name="cloud")
- * @orm:Entity
- * @orm:HasLifecycleCallbacks
- */
- class Cloud
- {
- /**
- * @var integer $id
- *
- * @orm:Column(name="id", type="integer", length="13")
- * @orm:Id
- * @orm:GeneratedValue(strategy="IDENTITY")
- */
- private $id;
- /**
- * @var Entity\User
- *
- * @orm:ManyToOne(targetEntity="User", inversedBy="cloudList")
- */
- private $user;
- /**
- * @var Entity\Instance
- *
- * @orm:ManyToOne(targetEntity="Instance")
- */
- #private $topic_instance;
- /**
- * @var float $position_x
- *
- * @orm:Column(name="position_x", type="float", length=9)
- */
- private $position_x;
- /**
- * @var float $position_y
- *
- * @orm:Column(name="position_y", type="float", length=9)
- */
- private $position_y;
- /**
- * @var boolean $is_public
- *
- * @orm:Column(name="is_public", type="boolean")
- */
- private $is_public;
- /**
- * @var Entity\Cloud
- *
- * @orm:ManyToOne(targetEntity="Cloud", inversedBy="children")
- */
- private $parent;
- /**
- * @var Entity\Cloud
- *
- * @orm:OneToMany(targetEntity="Cloud", mappedBy="parent")
- */
- private $children;
- /**
- * @var integer $left_node
- *
- * @orm:Column(name="left_node", type="integer", nullable=true)
- */
- private $left_node;
- /**
- * @var integer $right_node
- *
- * @orm:Column(name="right_node", type="integer", nullable=true)
- */
- private $right_node;
- /**
- * @var integer $topic_level
- *
- * @orm:Column(name="topic_level", type="integer", nullable=true)
- */
- private $topic_level;
- /**
- * @var float $attraction_force
- *
- * @orm:Column(name="attraction_force", type="float", nullable=true)
- */
- private $attraction_force;
- /**
- * @var float $repulsion_force
- *
- * @orm:Column(name="repulsion_force", type="float", nullable=true)
- */
- private $repulsion_force;
- /**
- * @var integer $repulsion_dist
- *
- * @orm:Column(name="repulsion_dist", type="float", nullable=true)
- */
- private $repulsion_dist;
- /**
- * @var float $gravitation_force
- *
- * @orm:Column(name="gravitation_force", type="float", nullable=true)
- */
- private $gravitation_force;
- /**
- * @var string $commit_group
- *
- * @orm:Column(name="commit_group", type="string", length=32, nullable=true)
- */
- private $commit_group;
- /**
- * @var string $commit_key
- *
- * @orm:Column(name="commit_key", type="string", length=13, nullable=true)
- */
- private $commit_key;
- /**
- * @var string $record_checksum
- *
- * @orm:Column(name="record_checksum", type="string", length=32, nullable=true)
- */
- private $record_checksum;
- /**
- * @var datetime $created_at
- *
- * @orm:Column(name="created_at", type="datetime", nullable=false)
- */
- private $created_at;
- /**
- * @var datetime $updated_at
- *
- * @orm:Column(name="updated_at", type="datetime", nullable=false)
- */
- private $updated_at;
- /**
- * @var Entity\Cloud
- *
- * @orm:ManyToMany(targetEntity="Cloud", mappedBy="linkedTo")
- */
- private $linkedToMe;
- /**
- * @var Entity\Cloud
- *
- * @orm:ManyToMany(targetEntity="Cloud", inversedBy="linkedToMe")
- * @orm:JoinTable(name="cloud_link",
- * joinColumns={@orm:JoinColumn(name="cloud_id", referencedColumnName="id")},
- * inverseJoinColumns={@orm:JoinColumn(name="linked_cloud_id", referencedColumnName="id")}
- * )
- */
- private $linkedTo;
- /**
- * @var Application\BackEnd\Entity\Instance
- *
- * @orm:OneToMany(targetEntity="Instance", mappedBy="cloud", cascade={"remove"})
- */
- private $instanceList;
- /**
- * @var Application\BackEnd\Entity\InstanceLink
- *
- * @orm:OneToMany(targetEntity="InstanceLink", mappedBy="cloud", cascade={"remove"})
- */
- private $instanceLink;
- /**
- * @var Entity\CloudShare
- * @orm:OneToMany(targetEntity="CloudShare", mappedBy="cloud", cascade={"remove", "persist"}, orphanRemoval=true)
- *
- */
- private $cloudShareList;
- public function __construct()
- {
- $this->children = new \Doctrine\Common\Collections\ArrayCollection();
- $this->linkedToMe = new \Doctrine\Common\Collections\ArrayCollection();
- $this->linkedTo = new \Doctrine\Common\Collections\ArrayCollection();
- $this->instanceList = new \Doctrine\Common\Collections\ArrayCollection();
- $this->instanceLink = new \Doctrine\Common\Collections\ArrayCollection();
- $this->cloudShareList = new \Doctrine\Common\Collections\ArrayCollection();
- }
- /**
- * Hook to call when a new object is created
- *
- * @orm:PrePersist
- */
- public function doStuffOnPrePersist()
- {
- $date = new \DateTime();
- $this->setCreatedAt($date);
- $this->setUpdatedAt($date);
- }
- /**
- * Hook to call when an existing object is updated
- *
- * @orm:PreUpdate
- */
- public function doStuffOnPreUpdate()
- {
- $date = new \DateTime();
- $this->setUpdatedAt($date);
- }
- /**
- * Returns a list of clouds for this user
- *
- * @return Doctrine\Common\Collections\Collection
- */
- public function getCloudShares()
- {
- return $this->cloudShareList;
- }
- /**
- * Get id
- *
- * @return integer $id
- */
- public function getId()
- {
- return $this->id;
- }
- /**
- * Set position_x
- *
- * @param float $positionX
- */
- public function setPositionX($positionX)
- {
- $this->position_x = $positionX;
- }
- /**
- * Get position_x
- *
- * @return float $positionX
- */
- public function getPositionX()
- {
- return $this->position_x;
- }
- /**
- * Set position_y
- *
- * @param float $positionY
- */
- public function setPositionY($positionY)
- {
- $this->position_y = $positionY;
- }
- /**
- * Get position_y
- *
- * @return float $positionY
- */
- public function getPositionY()
- {
- return $this->position_y;
- }
- /**
- * Set is_public
- *
- * @param boolean $isPublic
- */
- public function setIsPublic($isPublic)
- {
- $this->is_public = $isPublic;
- }
- /**
- * Get is_public
- *
- * @return boolean $isPublic
- */
- public function getIsPublic()
- {
- return $this->is_public;
- }
- /**
- * Set left_node
- *
- * @param integer $leftNode
- */
- public function setLeftNode($leftNode)
- {
- $this->left_node = $leftNode;
- }
- /**
- * Get left_node
- *
- * @return integer $leftNode
- */
- public function getLeftNode()
- {
- return $this->left_node;
- }
- /**
- * Set right_node
- *
- * @param integer $rightNode
- */
- public function setRightNode($rightNode)
- {
- $this->right_node = $rightNode;
- }
- /**
- * Get right_node
- *
- * @return integer $rightNode
- */
- public function getRightNode()
- {
- return $this->right_node;
- }
- /**
- * Set topic_level
- *
- * @param integer $topicLevel
- */
- public function setTopicLevel($topicLevel)
- {
- $this->topic_level = $topicLevel;
- }
- /**
- * Get topic_level
- *
- * @return integer $topicLevel
- */
- public function getTopicLevel()
- {
- return $this->topic_level;
- }
- /**
- * Set attraction_force
- *
- * @param float $attractionForce
- */
- public function setAttractionForce($attractionForce)
- {
- $this->attraction_force = $attractionForce;
- }
- /**
- * Get attraction_force
- *
- * @return float $attractionForce
- */
- public function getAttractionForce()
- {
- return $this->attraction_force;
- }
- /**
- * Set repulsion_force
- *
- * @param float $repulsionForce
- */
- public function setRepulsionForce($repulsionForce)
- {
- $this->repulsion_force = $repulsionForce;
- }
- /**
- * Get repulsion_force
- *
- * @return float $repulsionForce
- */
- public function getRepulsionForce()
- {
- return $this->repulsion_force;
- }
- /**
- * Set repulsion_dist
- *
- * @param integer $repulsionDist
- */
- public function setRepulsionDist($repulsionDist)
- {
- $this->repulsion_dist = $repulsionDist;
- }
- /**
- * Get repulsion_dist
- *
- * @return integer $repulsionDist
- */
- public function getRepulsionDist()
- {
- return $this->repulsion_dist;
- }
- /**
- * Set gravitation_force
- *
- * @param float $gravitationForce
- */
- public function setGravitationForce($gravitationForce)
- {
- $this->gravitation_force = $gravitationForce;
- }
- /**
- * Get gravitation_force
- *
- * @return float $gravitationForce
- */
- public function getGravitationForce()
- {
- return $this->gravitation_force;
- }
- /**
- * Get commit_group
- *
- * @return string $commitGroup
- */
- public function getCommitGroup()
- {
- return $this->commit_group;
- }
- /**
- * Set commit_group
- *
- * @param string $commitGroup
- */
- public function setCommitGroup($commitGroup)
- {
- $this->commit_group = $commitGroup;
- }
- /**
- * Get commit_key
- *
- * @return string $commitKey
- */
- public function getCommitKey()
- {
- return $this->commit_key;
- }
- /**
- * Set commit_key
- *
- * @param string $commitKey
- */
- public function setCommitKey($commitKey)
- {
- $this->commit_key = $commitKey;
- }
- /**
- * Get record_checksum
- *
- * @return string $recordChecksum
- */
- public function getRecordChecksum()
- {
- return $this->record_checksum;
- }
- /**
- * Set record_checksum
- *
- * @param string $recordChecksum
- */
- public function setRecordChecksum($recordChecksum)
- {
- $this->record_checksum = $recordChecksum;
- }
- /**
- * Set created_at
- *
- * @param datetime $createdAt
- */
- public function setCreatedAt($createdAt)
- {
- $this->created_at = $createdAt;
- }
- /**
- * Get created_at
- *
- * @return datetime $createdAt
- */
- public function getCreatedAt()
- {
- return $this->created_at;
- }
- /**
- * Set updated_at
- *
- * @param datetime $updatedAt
- */
- public function setUpdatedAt($updatedAt)
- {
- $this->updated_at = $updatedAt;
- }
- /**
- * Get updated_at
- *
- * @return datetime $updatedAt
- */
- public function getUpdatedAt()
- {
- return $this->updated_at;
- }
- /**
- * Set user
- *
- * @param Entity\User $user
- */
- public function setUser(\Entity\User $user)
- {
- $this->user = $user;
- }
- /**
- * Get user
- *
- * @return Entity\User $user
- */
- public function getUser()
- {
- return $this->user;
- }
- /**
- * Set topic_instance
- *
- * @param Entity\Instance $topicInstance
- */
- /*public function setTopicInstance(\Entity\Instance $topicInstance)
- {
- $this->topic_instance = $topicInstance;
- }*/
- /**
- * Get topic_instance
- *
- * @return Entity\Instance $topicInstance
- */
- /*public function getTopicInstance()
- {
- return $this->topic_instance;
- }*/
- /**
- * Set parent
- *
- * @param Entity\Cloud $parent
- */
- public function setParent(\Entity\Cloud $parent)
- {
- $this->parent = $parent;
- }
- /**
- * Get parent
- *
- * @return Entity\Cloud $parent
- */
- public function getParent()
- {
- return $this->parent;
- }
- /**
- * Add children
- *
- * @param Entity\Cloud $children
- */
- public function addChildren(\Entity\Cloud $children)
- {
- $this->children[] = $children;
- }
- /**
- * Get children
- *
- * @return Doctrine\Common\Collections\Collection $children
- */
- public function getChildren()
- {
- return $this->children;
- }
- /**
- * Add linkedToMe
- *
- * @param Entity\Cloud $linkedToMe
- */
- public function addLinkedToMe(\Entity\Cloud $linkedToMe)
- {
- $this->linkedToMe[] = $linkedToMe;
- }
- /**
- * Get linkedToMe
- *
- * @return Doctrine\Common\Collections\Collection $linkedToMe
- */
- public function getLinkedToMe()
- {
- return $this->linkedToMe;
- }
- /**
- * Add linkedTo
- *
- * @param Entity\Cloud $linkedTo
- */
- public function addLinkedTo(\Entity\Cloud $linkedTo)
- {
- $this->linkedTo[] = $linkedTo;
- }
- /**
- * Get linkedTo
- *
- * @return Doctrine\Common\Collections\Collection $linkedTo
- */
- public function getLinkedTo()
- {
- return $this->linkedTo;
- }
- /**
- * Add instanceList
- *
- * @param Entity\Instance $instanceList
- */
- public function addInstanceList(\Entity\Instance $instanceList)
- {
- $this->instanceList[] = $instanceList;
- }
- /**
- * Get instanceList
- *
- * @return Doctrine\Common\Collections\Collection $instanceList
- */
- public function getInstanceList()
- {
- return $this->instanceList;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement