<?php

namespace Proxies\__CG__\Fishman\WorkshopBundle\Entity;

/**
 * THIS CLASS WAS GENERATED BY THE DOCTRINE ORM. DO NOT EDIT THIS FILE.
 */
class Plan extends \Fishman\WorkshopBundle\Entity\Plan implements \Doctrine\ORM\Proxy\Proxy
{
    private $_entityPersister;
    private $_identifier;
    public $__isInitialized__ = false;
    public function __construct($entityPersister, $identifier)
    {
        $this->_entityPersister = $entityPersister;
        $this->_identifier = $identifier;
    }
    /** @private */
    public function __load()
    {
        if (!$this->__isInitialized__ && $this->_entityPersister) {
            $this->__isInitialized__ = true;

            if (method_exists($this, "__wakeup")) {
                // call this after __isInitialized__to avoid infinite recursion
                // but before loading to emulate what ClassMetadata::newInstance()
                // provides.
                $this->__wakeup();
            }

            if ($this->_entityPersister->load($this->_identifier, $this) === null) {
                throw new \Doctrine\ORM\EntityNotFoundException();
            }
            unset($this->_entityPersister, $this->_identifier);
        }
    }

    /** @private */
    public function __isInitialized()
    {
        return $this->__isInitialized__;
    }

    
    public function getId()
    {
        if ($this->__isInitialized__ === false) {
            return (int) $this->_identifier["id"];
        }
        $this->__load();
        return parent::getId();
    }

    public function setType($type)
    {
        $this->__load();
        return parent::setType($type);
    }

    public function getType()
    {
        $this->__load();
        return parent::getType();
    }

    public function setWorkshopapplicationactivity(\Fishman\WorkshopBundle\Entity\Workshopapplicationactivity $workshopapplicationactivity = NULL)
    {
        $this->__load();
        return parent::setWorkshopapplicationactivity($workshopapplicationactivity);
    }

    public function getWorkshopapplicationactivity()
    {
        $this->__load();
        return parent::getWorkshopapplicationactivity();
    }

    public function setPlangoals(\Fishman\WorkshopBundle\Entity\Plangoal $plangoals = NULL)
    {
        $this->__load();
        return parent::setPlangoals($plangoals);
    }

    public function getPlangoals()
    {
        $this->__load();
        return parent::getPlangoals();
    }

    public function setComments($comments)
    {
        $this->__load();
        return parent::setComments($comments);
    }

    public function getComments()
    {
        $this->__load();
        return parent::getComments();
    }

    public function addPlangoal(\Fishman\WorkshopBundle\Entity\Plangoal $plangoals)
    {
        $this->__load();
        return parent::addPlangoal($plangoals);
    }

    public function removePlangoal(\Fishman\WorkshopBundle\Entity\Plangoal $plangoals)
    {
        $this->__load();
        return parent::removePlangoal($plangoals);
    }


    public function __sleep()
    {
        return array('__isInitialized__', 'id', 'type', 'comments', 'workshopapplicationactivity', 'plangoals');
    }

    public function __clone()
    {
        if (!$this->__isInitialized__ && $this->_entityPersister) {
            $this->__isInitialized__ = true;
            $class = $this->_entityPersister->getClassMetadata();
            $original = $this->_entityPersister->load($this->_identifier);
            if ($original === null) {
                throw new \Doctrine\ORM\EntityNotFoundException();
            }
            foreach ($class->reflFields as $field => $reflProperty) {
                $reflProperty->setValue($this, $reflProperty->getValue($original));
            }
            unset($this->_entityPersister, $this->_identifier);
        }
        
    }
}