src/Globals/ResourceManagementBundle/Entity/Resource.php line 32

Open in your IDE?
  1. <?php
  2. /**
  3.  * Created by PhpStorm.
  4.  * User: ahawley
  5.  * Date: 3/7/2017
  6.  * Time: 12:30 PM
  7.  */
  8. namespace Globals\ResourceManagementBundle\Entity;
  9. use ApiPlatform\Core\Annotation\ApiResource;
  10. use Globals\ClaimManagementBundle\Entity\Assignments;
  11. use Globals\ClaimManagementBundle\Entity\ClaimResourcePrevious;
  12. use Globals\ClaimManagementBundle\Entity\ClaimTeamResource;
  13. use Globals\CustomerManagementBundle\Entity\Customer;
  14. use Globals\CustomerManagementBundle\Entity\CustomerResource;
  15. use Globals\InvoiceManagementBundle\Entity\Invoice;
  16. use Globals\ResourceManagementBundle\Annotation\RegisterProfileObject;
  17. use Doctrine\Common\Collections\ArrayCollection;
  18. use Doctrine\ORM\Mapping as ORM;
  19. use DoctrineExtensions\Query\Mysql\Week;
  20. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  21. use Symfony\Component\Security\Core\User\UserInterface;
  22. use Symfony\Component\Validator\Constraints as Assert;
  23. /**
  24.  * @ORM\Entity(repositoryClass="Globals\ResourceManagementBundle\Repository\ResourceRepository")
  25.  * @ORM\Table(name="resource")
  26.  * @ORM\HasLifecycleCallbacks()
  27.  */
  28. class Resource implements UserInterface
  29. {
  30.     /**
  31.      * @ORM\Id
  32.      * @ORM\GeneratedValue(strategy="AUTO")
  33.      * @ORM\Column(name="id", type="integer")
  34.      */
  35.     private $id;
  36.     /**
  37.      * @ORM\Column(name="last_activity_at", type="datetime")
  38.      */
  39.     private $lastActivityAt;
  40.     /**
  41.      * @ORM\Column(name="is_active", type="boolean")
  42.      */
  43.     private $isActive 1;
  44.     /**
  45.      * @RegisterProfileObject(step="1")
  46.      * @ORM\Column(name="username", type="string")
  47.      * @Assert\NotBlank(message="This value cannot be empty!", groups={"newuser", "Default"})
  48.      */
  49.     private $username;
  50.     /**
  51.      * @ORM\Column(name="password", type="string")
  52.      */
  53.     private $password;
  54.     /**
  55.      * @ORM\Column(name="email", type="string")
  56.      * @Assert\NotBlank(message="This value cannot be empty!", groups={"newuser", "Default"})
  57.      * @Assert\Email()
  58.      */
  59.     private $email;
  60.     /**
  61.      * @ORM\Column(name="first_name", type="string")
  62.      * @Assert\NotBlank(message="This value cannot be empty!", groups={"newuser", "Default"})
  63.      */
  64.     private $firstName;
  65.     /**
  66.      * @ORM\Column(name="last_name", type="string")
  67.      * @Assert\NotBlank(message="This value cannot be empty!", groups={"newuser", "Default"})
  68.      */
  69.     private $lastName;
  70.     /**
  71.      * @ORM\Column(name="middle_name", type="string", nullable=true)
  72.      */
  73.     private $middleName;
  74.     /**
  75.      * @ORM\Column(name="phone", type="string")
  76.      */
  77.     private $phone;
  78.     /**
  79.      * @ORM\Column(name="wing_span_collaborator_id", type="string")
  80.      */
  81.     private $wingSpanCollaboratorId;
  82.     /**
  83.      * @ORM\Column(name="wing_span_collaborator_group_id", type="string")
  84.      */
  85.     private $wingSpanCollaboratorGroupId;
  86.     /**
  87.      * @ORM\Column(name="send_to_fact", type="boolean")
  88.      */
  89.     private $sendToFact;
  90.     /**
  91.      * @ORM\Column(name="fact_adjuster_id", type="string")
  92.      */
  93.     private $factAdjusterId;
  94.     /**
  95.      * @ORM\Column(name="mobile_phone", type="string")
  96.      */
  97.     private $mobile_phone;
  98.     /**
  99.      * @ORM\Column(name="fax", type="string", nullable=true)
  100.      */
  101.     private $fax;
  102.     /**
  103.      * @ORM\Column(name="roles", type="string", nullable=true)
  104.      */
  105.     private $roles '["ROLE_REGISTERED"]';
  106.     /**
  107.      * @ORM\Column(name="title", type="string", nullable=true)
  108.      */
  109.     private $title;
  110.     /**
  111.      * @ORM\Column(name="designation", type="string", nullable=true)
  112.      */
  113.     private $designation;
  114.     /**
  115.      * @ORM\Column(name="payroll_id", type="string")
  116.      */
  117.     private $payrollId 0;
  118.     /**
  119.      * @ORM\Column(name="payroll_type", type="integer", nullable=true)
  120.      */
  121.     private $payrollType 1;
  122.     /**
  123.      * @ORM\Column(name="is_w2", type="boolean")
  124.      */
  125.     private $isW2 0;
  126.     /**
  127.      * @ORM\Column(name="is_tlg", type="boolean")
  128.      */
  129.     private $isTlg 0;
  130.     /**
  131.      * @return int
  132.      */
  133.     public function getIsTlg()
  134.     {
  135.         return $this->isTlg;
  136.     }
  137.     /**
  138.      * @param int $isTlg
  139.      */
  140.     public function setIsTlg($isTlg)
  141.     {
  142.         $this->isTlg $isTlg;
  143.     }
  144.     /**
  145.      * @ORM\Column(name="is_hourly", type="boolean")
  146.      */
  147.     private $isHourly 0;
  148.     /**
  149.      * @ORM\ManyToMany(targetEntity="Globals\ResourceManagementBundle\Entity\AdjusterPosition")
  150.      */
  151.     private $adjusterPositions;
  152.     /**
  153.      * @ORM\Column(name="city", type="string")
  154.      */
  155.     private $city "";
  156.     /**
  157.      * @ORM\ManyToOne(targetEntity="Globals\ResourceManagementBundle\Entity\State")
  158.      * @ORM\JoinColumn(nullable=false)
  159.      */
  160.     private $state;
  161.     /**
  162.      * @ORM\Column(name="zip", type="string")
  163.      */
  164.     private $zip "";
  165.     /**
  166.      * @ORM\Column(name="other", type="string", nullable=true)
  167.      */
  168.     private $other;
  169.     /**
  170.      * @ORM\Column(name="address", type="string")
  171.      */
  172.     private $address "";
  173.     /**
  174.      * @ORM\Column(name="other_phone", type="string", nullable=true)
  175.      */
  176.     private $other_phone;
  177.     /**
  178.      * @ORM\Column(name="notes", type="string", length=5000, nullable=true)
  179.      */
  180.     private $notes;
  181.     /**
  182.      * @ORM\Column(name="ssn_ein", type="string")
  183.      */
  184.     private $ssn_ein 0;
  185.     /**
  186.      * @ORM\Column(name="signature_text", type="string", nullable=true)
  187.      */
  188.     private $signatureText;
  189.     /**
  190.      * @ORM\Column(name="signature", type="string", nullable=true)
  191.      */
  192.     private $signature;
  193.     /**
  194.      * @ORM\Column(name="allow_mailers", type="integer")
  195.      */
  196.     private $allowMailers ;
  197.     /**
  198.      * @ORM\ManyToOne(targetEntity="Globals\ResourceManagementBundle\Entity\Resource", inversedBy="resources")
  199.      * @ORM\JoinColumn(name="supervisor_id", referencedColumnName="id")
  200.      */
  201.     private $supervisor;
  202.     /**
  203.      * @ORM\OneToMany(targetEntity="Globals\ResourceManagementBundle\Entity\Resource", mappedBy="supervisor")
  204.      */
  205.     private $resources;
  206.     /**
  207.      * @ORM\OneToMany(targetEntity="Globals\ResourceManagementBundle\Entity\ResourceNotificationSetting", mappedBy="resource")
  208.      */
  209.     private $resourceNotificationSettings;
  210.     /**
  211.      * @ORM\Column(name="contract_id", type="integer")
  212.      */
  213.     private $contractId 0;
  214.     /**
  215.      * @ORM\Column(name="background_check", type="datetime", nullable=true)
  216.      */
  217.     private $backgroundCheck;
  218.     /**
  219.      * @ORM\Column(name="adjuster_available", type="boolean")
  220.      */
  221.     private $adjusterAvailable 1;
  222.     /**
  223.      * @ORM\Column(name="resume_review", type="integer")
  224.      */
  225.     private $resumeReview 0;
  226.     /**
  227.      * @ORM\ManyToOne(targetEntity="Globals\ResourceManagementBundle\Entity\ResourceType", inversedBy="resources")
  228.      * @ORM\JoinColumn(name="resource_type_id", referencedColumnName="id")
  229.      */
  230.     private $resourceType null;
  231.     /**
  232.      * @ORM\ManyToOne(targetEntity="Globals\CompanyManagementBundle\Entity\DeskRosterPosition", inversedBy="resourceDeskRosterPosition")
  233.      * @ORM\JoinColumn(name="desk_roster_position_id", referencedColumnName="id")
  234.      */
  235.     private $deskRosterPosition null;
  236.     /**
  237.      * @ORM\OneToMany(targetEntity="Globals\ClaimManagementBundle\Entity\Assignments", mappedBy="resource")
  238.      */
  239.     private $resourceClaims 0;
  240.     /**
  241.      * @ORM\OneToMany(targetEntity="Globals\ClaimManagementBundle\Entity\ClaimResourcePrevious", mappedBy="resource")
  242.      */
  243.     private $resourcePreviousClaims;
  244.     /**
  245.      * @ORM\OneToOne(targetEntity="Globals\ResourceManagementBundle\Entity\ResourceDashboard", mappedBy="resource")
  246.      */
  247.     private $resourceDashboard;
  248.     /**
  249.      * @deprecated
  250.      * @ORM\OneToMany(targetEntity="Globals\ResourceManagementBundle\Entity\Limits", mappedBy="resource")
  251.      */
  252.     /**
  253.      * @ORM\OneToMany(targetEntity="Globals\ResourceManagementBundle\Entity\Event", mappedBy="resource")
  254.      */
  255.     private $resourceEvents;
  256.     /**
  257.      * @ORM\OneToMany(targetEntity="Globals\InvoiceManagementBundle\Entity\InvoiceResource", mappedBy="resource")
  258.      */
  259.     private $resourceInvoices 0;
  260.     /**
  261.      * @ORM\Column(name="xactimate_exp", type="boolean")
  262.      */
  263.     private $xactimateExp 0;
  264.     /**
  265.      * @ORM\Column(name="xact_analysis_exp", type="boolean")
  266.      */
  267.     private $xactAnalysisExp 0;
  268.     /**
  269.      * @ORM\Column(name="symbility_exp", type="boolean")
  270.      */
  271.     private $symbilityExp 0;
  272.     /**
  273.      * @ORM\Column(name="property_exp", type="boolean")
  274.      */
  275.     private $propertyExp 0;
  276.     /**
  277.      * @ORM\Column(name="homeowner_exp", type="boolean")
  278.      */
  279.     // private $homeownerExp = 0;
  280.     /**
  281.      * @ORM\Column(name="commercial_exp", type="boolean")
  282.      */
  283.     // private $commercialExp = 0;
  284.     /**
  285.      * @ORM\Column(name="casualty_exp", type="boolean")
  286.      */
  287.     // private $casualtyExp = 0;
  288.     /**
  289.      * @ORM\Column(name="structure_type", type="integer")
  290.      */
  291.     private $structureType 0;
  292.     /**
  293.      * @ORM\Column(name="military_exp", type="boolean")
  294.      */
  295.     private $militaryExp 0;
  296.     /**
  297.      * @ORM\Column(name="military_branch", type="string")
  298.      */
  299.     private $militaryBranch;
  300.     /**
  301.      * @ORM\Column(name="storm_list", type="text")
  302.      */
  303.     private $stormList;
  304.     /**
  305.      * @ORM\Column(name="company_list", type="text")
  306.      */
  307.     private $companyList;
  308.     /**
  309.      * @ORM\Column(name="software_list", type="text")
  310.      */
  311.     private $softwareList;
  312.     /**
  313.      * @ORM\Column(name="certs_list", type="text")
  314.      */
  315.     // private $certsList;
  316.     /**
  317.      * @ORM\OneToMany(targetEntity="Globals\ClaimManagementBundle\Entity\ClaimTeamResource", mappedBy="resource")
  318.      */
  319.     private $claimTeams;
  320.     /**
  321.      * @ORM\Column(name="password_reset_token", type="string")
  322.      */
  323.     private $passwordResetToken;
  324.     /**
  325.      * @ORM\Column(name="last_template_assigned", type="string")
  326.      */
  327.     private $lastTemplateAssigned;
  328.     /**********************
  329.      * Branch User Fields *
  330.      **********************/
  331.     /**
  332.      * @ORM\OneToMany(targetEntity="Globals\CustomerManagementBundle\Entity\CustomerResource",  mappedBy="resource")
  333.      */
  334.     protected $customerResources;
  335.     /**
  336.      * @ORM\Column(name="has_open_letter", type="boolean")
  337.      */
  338.     // protected $has_open_letter = 0;
  339.     /**
  340.      * @ORM\Column(name="has_close_letter", type="boolean")
  341.      */
  342.     // protected $has_close_letter = 0;
  343.     /**
  344.      * @ORM\Column(name="has_reassign_letter", type="boolean")
  345.      */
  346.     // protected $has_reassign_letter = 0;
  347.     /**
  348.      * @ORM\Column(name="invoice_notifications", type="boolean")
  349.      */
  350.     // protected $invoice_notifications = 0;
  351.     /**
  352.      * @ORM\Column(type="float")
  353.      */
  354.     private $serviceExpenseRate 0.00;
  355.     /**
  356.      * @ORM\Column(type="boolean")
  357.      */
  358.     private $zeroCommission 0;
  359.     /**
  360.      * @ORM\Column(type="float", name="latitude")
  361.      */
  362.     private $latitude 0;
  363.     /**
  364.      * @ORM\Column(type="float", name="longitude")
  365.      */
  366.     private $longitude 0;
  367.     /**
  368.      * @ORM\Column(type="string", name="activation_key")
  369.      */
  370.     private $activationKey;
  371.     /**
  372.      * @ORM\Column(type="string", name="sms_authetication")
  373.      */
  374.     private $smsAuthetication;
  375.     /**
  376.      * @ORM\Column(type="datetime", name="activation_timestamp")
  377.      */
  378.     private $activationTimestamp;
  379.     /**
  380.      * @var ArrayCollection|WeekLimit
  381.      *
  382.      * @ORM\OneToMany(targetEntity="Globals\AssignmentBundle\Entity\WeekLimit", mappedBy="resource", cascade={"persist", "remove"})
  383.      */
  384.     /**
  385.      *
  386.      * @ORM\Column(name="last_assigned", type="bigint")
  387.      */
  388.     private $lastAssigned 0;
  389.     /**
  390.      * @ORM\Column(name="nipr_number", type="string", nullable=true, length=50)
  391.      */
  392.     private $niprNumber;
  393.     /**
  394.      * @ORM\Column(name="agent_sync_response", type="string", nullable=true, length=200)
  395.      */
  396.     private $agentSyncResponse;
  397.     /**
  398.      * @ORM\Column(name="nipr_tracking", type="boolean", nullable=true)
  399.      */
  400.     private $niprTracking;
  401.     /**
  402.      * @ORM\Column(name="password_change_date", type="datetime")
  403.      */
  404.     private $passwordChangeDate;
  405.     /**
  406.      * @ORM\Column(name="naca", type="integer", nullable=true)
  407.      */
  408.     private $naca 1;
  409.     /**
  410.      * @ORM\Column(type="integer", name="sms_accept_message")
  411.      */
  412.     private $smsAcceptMessage;
  413.     /**
  414.      * @ORM\ManyToOne(targetEntity="Globals\CompanyManagementBundle\Entity\Acquisition", inversedBy="resourceAcquisition")
  415.      * @ORM\JoinColumn(name="acquisition_id", referencedColumnName="id")
  416.      */
  417.     private $acquisition null;
  418.     /**
  419.      * Adds a single week limit
  420.      * @param WeekLimit $weekLimit
  421.      */
  422.     private function addWeekLimit(WeekLimit $weekLimit)
  423.     {
  424.         if ($this->limits->contains($weekLimit)) {
  425.             return;
  426.         }
  427.     }
  428.     /**
  429.      * @return void
  430.      */
  431.     public function removeCustomerResource()
  432.     {
  433.         $this->customerResources null;
  434.     }
  435.     /**
  436.      * @return mixed
  437.      */
  438.     public function getCustomerResources()
  439.     {
  440.         return $this->customerResources;
  441.     }
  442.     /**
  443.      * @param $customerResources
  444.      */
  445.     public function setCustomerResources($customerResources)
  446.     {
  447.         $this->customerResources $customerResources;
  448.     }
  449.     /**
  450.      * @return boolean
  451.      */
  452.     /*public function getHasOpenLetter()
  453.     {
  454.         return $this->has_open_letter;
  455.     }*/
  456.     /**
  457.      * @param boolean $boolean
  458.      */
  459.     /*public function setHasOpenLetter($boolean)
  460.     {
  461.         $this->has_open_letter = $boolean;
  462.     }*/
  463.     /**
  464.      * @return boolean
  465.      */
  466.     /*public function getHasCloseLetter()
  467.     {
  468.         return $this->has_close_letter;
  469.     }*/
  470.     /**
  471.      * @param boolean $boolean
  472.      */
  473.     /*public function setHasCloseLetter($boolean)
  474.     {
  475.         $this->has_close_letter = $boolean;
  476.     }*/
  477.     /**
  478.      * @return boolean
  479.      */
  480.     /*public function getHasReassignLetter()
  481.     {
  482.         return $this->has_reassign_letter;
  483.     }*/
  484.     /**
  485.      * @param boolean $boolean
  486.      */
  487.     /*public function setHasReassignLetter($boolean)
  488.     {
  489.         $this->has_reassign_letter = $boolean;
  490.     }*/
  491.     /**
  492.      * @return boolean
  493.      */
  494.     /*public function getInvoiceNotifications()
  495.     {
  496.         return $this->invoice_notifications;
  497.     }*/
  498.     /**
  499.      * @param boolean $boolean
  500.      */
  501.     /*public function setInvoiceNotifications($boolean)
  502.     {
  503.         $this->invoice_notifications = $boolean;
  504.     }*/
  505.     /*************************
  506.      * Symbility User Fields *
  507.      *************************/
  508.     /**
  509.      * @ORM\Column(type="string")
  510.      * @Assert\Length(min=4)
  511.      */
  512.     private $symbility_address;
  513.     /**
  514.      * @return mixed
  515.      */
  516.     public function getSymbilityAddress()
  517.     {
  518.         return $this->symbility_address;
  519.     }
  520.     /**
  521.      * @param mixed $symbility_address
  522.      */
  523.     public function setSymbilityAddress($symbility_address)
  524.     {
  525.         $this->symbility_address $symbility_address;
  526.     }
  527.     /*************************
  528.      * Xact User Fields *
  529.      *************************/
  530.     /**
  531.      * @ORM\Column(type="string")
  532.      */
  533.     private $xactAddress;
  534.     /**
  535.      * @ORM\Column(name="updated_at", type="datetime", nullable=true)
  536.      */
  537.     private \DateTime $updatedAt;
  538.     /**
  539.      * @return \DateTime
  540.      */
  541.     public function getUpdatedAt(): \DateTime
  542.     {
  543.         return $this->updatedAt;
  544.     }
  545.     /**
  546.      * @param \DateTime $updatedAt
  547.      * @return $this
  548.      */
  549.     public function setUpdatedAt(\DateTime $updatedAt): self
  550.     {
  551.         $this->updatedAt $updatedAt;
  552.         return $this;
  553.     }
  554.     /**
  555.      * @ORM\PrePersist
  556.      */
  557.     public function prePersist()
  558.     {
  559.         $this->updatedAt = new \DateTime();
  560.     }
  561.     /**
  562.      * @ORM\PreUpdate()
  563.      */
  564.     public function preUpdate()
  565.     {
  566.         $this->updatedAt = new \DateTime();
  567.     }
  568.     /**
  569.      * @return mixed
  570.      */
  571.     public function getXactAddress()
  572.     {
  573.         return $this->xactAddress;
  574.     }
  575.     /**
  576.      * @param mixed $xactAddress
  577.      */
  578.     public function setXactAddress($xactAddress)
  579.     {
  580.         $this->xactAddress $xactAddress;
  581.     }
  582.     public function __toString()
  583.     {
  584.         return ucfirst($this->getFirstName()) . " " ucfirst($this->getLastName());
  585.     }
  586.     /**
  587.      * @return ResourceType
  588.      */
  589.     public function getResourceType()
  590.     {
  591.         return $this->resourceType;
  592.     }
  593.     /**
  594.      * @param mixed $resourceType
  595.      */
  596.     public function setResourceType($resourceType)
  597.     {
  598.         // if ($resourceType instanceof Resource) {
  599.             $this->resourceType $resourceType;
  600.         // }
  601.     }
  602.     /**
  603.      * @return void
  604.      */
  605.     public function removeResourceType()
  606.     {
  607.         $this->resourceType null;
  608.     }
  609.     /**
  610.      * @return DeskRosterPosition
  611.      */
  612.     public function getDeskRosterPosition()
  613.     {
  614.         return $this->deskRosterPosition;
  615.     }
  616.     /**
  617.      * @param mixed $deskRosterPosition
  618.      */
  619.     public function setDeskRosterPosition($deskRosterPosition)
  620.     {
  621.         $this->deskRosterPosition $deskRosterPosition;
  622.     }
  623.     /**
  624.      * @return void
  625.      */
  626.     public function removeDeskRosterPosition()
  627.     {
  628.         $this->deskRosterPosition null;
  629.     }
  630.     /**
  631.      * @return Acquisition
  632.      */
  633.     public function getAcquisition()
  634.     {
  635.         return $this->acquisition;
  636.     }
  637.     /**
  638.      * @param mixed $acquisition
  639.      */
  640.     public function setAcquisition($acquisition)
  641.     {
  642.         $this->acquisition $acquisition;
  643.     }
  644.     /**
  645.      * @return void
  646.      */
  647.     public function removeAcquisition()
  648.     {
  649.         $this->acquisition null;
  650.     }
  651.     function __construct()
  652.     {
  653.         $this->resources = new ArrayCollection();
  654.         $this->adjusterPositions = new ArrayCollection();
  655.         $this->resourceNotificationSettings = new ArrayCollection();
  656.         //$this->backgroundCheck = new \DateTime();
  657.         $this->resourceClaims = new ArrayCollection();
  658.         $this->resourcePreviousClaims = new ArrayCollection();
  659.         $this->resourceClaimRules = new ArrayCollection();
  660.        // $this->resourceLimits = new ArrayCollection();
  661.         $this->resourceInvoices = new ArrayCollection();
  662.         $this->claimTeams = new ArrayCollection();
  663.         $this->perils = new ArrayCollection();
  664.         $this->subPerils = new ArrayCollection();
  665.         $this->states = new ArrayCollection();
  666.         $this->zipCodes = new ArrayCollection();
  667.         $this->skills = new ArrayCollection();
  668.         $this->catCodes = new ArrayCollection();
  669.         $this->workDays = new ArrayCollection();
  670.         $this->reserveZipCodes = new ArrayCollection();
  671.     }
  672. //    /**
  673. //     * @Assert\Callback()
  674. //     */
  675. //    public function validate(ExecutionContextInterface $context, $payload)
  676. //    {
  677. //        if (!filter_var($this->getEmail(), FILTER_VALIDATE_EMAIL)) {
  678. //            $context->buildViolation('Please enter valid email')
  679. //                ->atPath('email')
  680. //                ->addViolation();
  681. //        }
  682. //
  683. //    }
  684.     /**
  685.      * @return int
  686.      */
  687.     public function getId()
  688.     {
  689.         return $this->id;
  690.     }
  691.     /**
  692.      * @param mixed $id
  693.      */
  694.     public function setId($id)
  695.     {
  696.         $this->id $id;
  697.     }
  698.     /**
  699.      * @param \Datetime $lastActivityAt
  700.      */
  701.     public function setLastActivityAt($lastActivityAt)
  702.     {
  703.         $this->lastActivityAt $lastActivityAt;
  704.     }
  705.     /**
  706.      * @return \Datetime
  707.      */
  708.     public function getLastActivityAt()
  709.     {
  710.         return $this->lastActivityAt;
  711.     }
  712.     /**
  713.      * @return Bool Whether the user is active or not
  714.      */
  715.     public function isActiveNow()
  716.     {
  717.         // Delay during wich the user will be considered as still active
  718.         $delay = new \DateTime('2 minutes ago');
  719.         return ( $this->getLastActivityAt() > $delay );
  720.     }
  721.     /**
  722.      * @return int
  723.      */
  724.     public function getIsActive()
  725.     {
  726.         return $this->isActive;
  727.     }
  728.     /**
  729.      * @param mixed $isActive
  730.      */
  731.     public function setIsActive($isActive)
  732.     {
  733.         $this->isActive $isActive;
  734.     }
  735.     /**
  736.      * @return mixed
  737.      */
  738.     public function getUsername()
  739.     {
  740.         return $this->username;
  741.     }
  742.     /**
  743.      * @param mixed $username
  744.      */
  745.     public function setUsername($username)
  746.     {
  747.         $this->username $username;
  748.     }
  749.     /**
  750.      * @return mixed
  751.      */
  752.     public function getPassword()
  753.     {
  754.         return $this->password;
  755.     }
  756.     /**
  757.      * @param mixed $password
  758.      */
  759.     public function setPassword($password)
  760.     {
  761.         if (!is_null($password)) {
  762.             if (!empty($password)) {
  763.                 $this->password $password;
  764.             }
  765.         }
  766.     }
  767.     /**
  768.      * @return mixed
  769.      */
  770.     public function getEmail()
  771.     {
  772.         return $this->email;
  773.     }
  774.     /**
  775.      * @param mixed $email
  776.      */
  777.     public function setEmail($email)
  778.     {
  779.         $this->email $email;
  780.     }
  781.     public function getFullNameNoType()
  782.     {
  783.         $fullNameNoType $this->getFullName();
  784.         if ($this->getResourceType()) {
  785.             $fullNameNoType .= $this->getResourceType()->getResourceType();
  786.         }
  787.         return $fullNameNoType;
  788.     }
  789.     public function getFullName()
  790.     {
  791.         return $this->getFirstName() . " " $this->getLastName();
  792.     }
  793.     /**
  794.      * @return string
  795.      */
  796.     public function getFullNameWithMiddle()
  797.     {
  798.         if (!empty($this->getMiddleName())) {
  799.             return $this->getFirstName() .  " " $this->getMiddleName(). " " $this->getLastName();
  800.         } else {
  801.             return $this->getFirstName() . " " $this->getLastName();
  802.         }
  803.     }
  804.     /**
  805.      * @return string
  806.      */
  807.     public function getFirstName()
  808.     {
  809.         return $this->firstName;
  810.     }
  811.     /**
  812.      * @param string $firstName
  813.      */
  814.     public function setFirstName($firstName)
  815.     {
  816.         $this->firstName $firstName;
  817.     }
  818.     /**
  819.      * @return string
  820.      */
  821.     public function getMiddleName()
  822.     {
  823.         return $this->middleName;
  824.     }
  825.     /**
  826.      * @param string $middleName
  827.      */
  828.     public function setMiddleName($middleName)
  829.     {
  830.         $this->middleName $middleName;
  831.     }
  832.     /**
  833.      * @return string
  834.      */
  835.     public function getLastName()
  836.     {
  837.         return $this->lastName;
  838.     }
  839.     /**
  840.      * @param string $lastName
  841.      */
  842.     public function setLastName($lastName)
  843.     {
  844.         $this->lastName $lastName;
  845.     }
  846.     ###
  847.     #
  848.     # Added to conform to AppBundle\User.php when pulling from security context
  849.     #
  850.     ###
  851.     /**
  852.      * Get fname
  853.      *
  854.      * @return string
  855.      */
  856.     public function getFname()
  857.     {
  858.         return $this->firstName;
  859.     }
  860.     /**
  861.      * Get lname
  862.      *
  863.      * @return string
  864.      */
  865.     public function getLname()
  866.     {
  867.         return $this->lastName;
  868.     }
  869.     /**
  870.      * @return mixed
  871.      */
  872.     public function getPhone()
  873.     {
  874.         return $this->phone;
  875.     }
  876.     /**
  877.      * @param mixed $phone
  878.      */
  879.     public function setPhone($phone)
  880.     {
  881.         $this->phone $phone;
  882.     }
  883.     /**
  884.      * @return mixed
  885.      */
  886.     public function getSendToFact()
  887.     {
  888.         return $this->sendToFact;
  889.     }
  890.     /**
  891.      * @param mixed $sendToFact
  892.      */
  893.     public function sendToFact($sendToFact)
  894.     {
  895.         $this->sendToFact $sendToFact;
  896.     }
  897.     /**
  898.      * @return mixed
  899.      */
  900.     public function getFactAdjusterId()
  901.     {
  902.         return $this->factAdjusterId;
  903.     }
  904.     /**
  905.      * @param mixed $factAdjusterId
  906.      */
  907.     public function factAdjusterId($factAdjusterId)
  908.     {
  909.         $this->factAdjusterId $factAdjusterId;
  910.     }
  911.     /**
  912.      * @return mixed
  913.      */
  914.     public function getMobilePhone()
  915.     {
  916.         return $this->mobile_phone;
  917.     }
  918.     /**
  919.      * @param mixed $mobile_phone
  920.      */
  921.     public function setMobilePhone($mobile_phone)
  922.     {
  923.         $this->mobile_phone $mobile_phone;
  924.     }
  925.     /**
  926.      * @return mixed
  927.      */
  928.     public function getFax()
  929.     {
  930.         return $this->fax;
  931.     }
  932.     /**
  933.      * @param mixed $fax
  934.      */
  935.     public function setFax($fax)
  936.     {
  937.         $this->fax $fax;
  938.     }
  939.     /**
  940.      * @param string $string
  941.      */
  942.     public function setOther($string)
  943.     {
  944.         $this->other $string;
  945.     }
  946.     /**
  947.      * @return string
  948.      */
  949.     public function getOther()
  950.     {
  951.         return $this->other;
  952.     }
  953.     /**
  954.      * Returns the roles or permissions granted to the user for security.
  955.      */
  956.     public function getRoles()
  957.     {
  958.         $roles json_decode($this->roles);
  959.         // guarantees that a user always has at least one role for security
  960.         if (empty($roles)) {
  961.             $roles = array();
  962.             return $roles[] = 'ROLE_USER';
  963.         }
  964.         return array_unique($roles);
  965.     }
  966.     /**
  967.      * @param mixed $roles
  968.      */
  969.     public function setRoles($roles)
  970.     {
  971.         $this->roles $roles;
  972.     }
  973.     public function getDisplayRoles()
  974.     {
  975.         $displayRoles $this->roles;
  976.         if(is_array($displayRoles)){
  977.             foreach($displayRoles as $displayRole){
  978.                 $displayRoles .= $displayRole.', ';
  979.             }
  980.             $displayRoles substr($displayRoles0, -2);
  981.         }
  982.         else
  983.             $displayRoles $this->roles;
  984.         return $displayRoles;
  985.     }
  986.     /**
  987.      * Returns the salt that was originally used to encode the password.
  988.      */
  989.     public function getSalt()
  990.     {
  991.         // See "Do you need to use a Salt?" at http://symfony.com/doc/current/cookbook/security/entity_provider.html
  992.         // we're using bcrypt in security.yml to encode the password, so
  993.         // the salt value is built-in and you don't have to generate one
  994.         return;
  995.     }
  996.     /**
  997.      * Removes sensitive data from the user.
  998.      */
  999.     public function eraseCredentials()
  1000.     {
  1001.         // if you had a plainPassword property, you'd nullify it here
  1002.         // $this->plainPassword = null;
  1003.     }
  1004.     /**
  1005.      * @return mixed
  1006.      */
  1007.     public function getTitle()
  1008.     {
  1009.         return $this->title;
  1010.     }
  1011.     /**
  1012.      * @param mixed $title
  1013.      */
  1014.     public function setTitle($title)
  1015.     {
  1016.         $this->title $title;
  1017.     }
  1018.     /**
  1019.      * @return mixed
  1020.      */
  1021.     public function getDesignation()
  1022.     {
  1023.         return $this->designation;
  1024.     }
  1025.     /**
  1026.      * @param mixed $designation
  1027.      */
  1028.     public function setDesignation($designation)
  1029.     {
  1030.         $this->designation $designation;
  1031.     }
  1032.     /**
  1033.      * @return mixed
  1034.      */
  1035.     public function getPayrollId()
  1036.     {
  1037.         return $this->payrollId;
  1038.     }
  1039.     /**
  1040.      * @param mixed $payrollId
  1041.      */
  1042.     public function setPayrollId($payrollId)
  1043.     {
  1044.         $this->payrollId $payrollId;
  1045.     }
  1046.     /**
  1047.      * @return mixed
  1048.      */
  1049.     public function getPayrollType()
  1050.     {
  1051.         return $this->payrollType;
  1052.     }
  1053.     /**
  1054.      * @param mixed $payrollType
  1055.      */
  1056.     public function setPayrollType($payrollType)
  1057.     {
  1058.         $this->payrollType $payrollType;
  1059.     }
  1060.     /**
  1061.      * @return mixed
  1062.      */
  1063.     public function getIsW2()
  1064.     {
  1065.         return $this->isW2;
  1066.     }
  1067.     /**
  1068.      * @param mixed $isW2
  1069.      */
  1070.     public function setIsW2($isW2)
  1071.     {
  1072.         $this->isW2 $isW2;
  1073.     }
  1074.     /**
  1075.      * @return integer
  1076.      */
  1077.     public function getIsHourly()
  1078.     {
  1079.         return $this->isHourly;
  1080.     }
  1081.     /**
  1082.      * @param integer $isHourly
  1083.      */
  1084.     public function setIsHourly($isHourly)
  1085.     {
  1086.         $this->isHourly $isHourly;
  1087.     }
  1088.     /**
  1089.      * @return mixed
  1090.      */
  1091.     public function getAdjusterPositions()
  1092.     {
  1093.         return $this->adjusterPositions;
  1094.     }
  1095.     /**
  1096.      * @param mixed $adjusterPositions
  1097.      */
  1098.     public function setAdjusterPositions(AdjusterPosition $adjusterPositions)
  1099.     {
  1100.         $this->adjusterPositions $adjusterPositions;
  1101.     }
  1102.     /**
  1103.      * @return mixed
  1104.      */
  1105.     public function getCity()
  1106.     {
  1107.         return $this->city;
  1108.     }
  1109.     /**
  1110.      * @param mixed $city
  1111.      */
  1112.     public function setCity($city)
  1113.     {
  1114.         $this->city $city;
  1115.     }
  1116.     /**
  1117.      * @return State
  1118.      */
  1119.     public function getState()
  1120.     {
  1121.         return $this->state;
  1122.     }
  1123.     /**
  1124.      * @param State $state
  1125.      */
  1126.     public function setState($state)
  1127.     {
  1128.         $this->state $state;
  1129.     }
  1130.     /**
  1131.      * @return mixed
  1132.      */
  1133.     public function getZip()
  1134.     {
  1135.         return $this->zip;
  1136.     }
  1137.     /**
  1138.      * @param mixed $zip
  1139.      */
  1140.     public function setZip($zip)
  1141.     {
  1142.         $this->zip $zip;
  1143.     }
  1144.     /**
  1145.      * @return mixed
  1146.      */
  1147.     public function getAddress()
  1148.     {
  1149.         return $this->address;
  1150.     }
  1151.     /**
  1152.      * @param mixed $address
  1153.      */
  1154.     public function setAddress($address)
  1155.     {
  1156.         $this->address $address;
  1157.     }
  1158.     /**
  1159.      * @return mixed
  1160.      */
  1161.     public function getOtherPhone()
  1162.     {
  1163.         return $this->other_phone;
  1164.     }
  1165.     /**
  1166.      * @param mixed $other_phone
  1167.      */
  1168.     public function setOtherPhone($other_phone)
  1169.     {
  1170.         $this->other_phone $other_phone;
  1171.     }
  1172.     /**
  1173.      * @return mixed
  1174.      */
  1175.     public function getNotes()
  1176.     {
  1177.         return $this->notes;
  1178.     }
  1179.     /**
  1180.      * @param mixed $notes
  1181.      */
  1182.     public function setNotes($notes)
  1183.     {
  1184.         $this->notes $notes;
  1185.     }
  1186.     /**
  1187.      * @return mixed
  1188.      */
  1189.     public function getSsnEin()
  1190.     {
  1191.         return $this->ssn_ein;
  1192.     }
  1193.     /**
  1194.      * @param mixed $ssn_ein
  1195.      */
  1196.     public function setSsnEin($ssn_ein)
  1197.     {
  1198.         $this->ssn_ein $ssn_ein;
  1199.     }
  1200.     /**
  1201.      * @return mixed
  1202.      */
  1203.     public function getSignatureText()
  1204.     {
  1205.         return $this->signatureText;
  1206.     }
  1207.     /**
  1208.      * @param mixed $signatureText
  1209.      */
  1210.     public function setSignatureText($signatureText)
  1211.     {
  1212.         $this->signatureText $signatureText;
  1213.     }
  1214.     /**
  1215.      * @return mixed
  1216.      */
  1217.     public function getSignature()
  1218.     {
  1219.         return $this->signature;
  1220.     }
  1221.     /**
  1222.      * @param mixed $signature
  1223.      */
  1224.     public function setSignature($signature)
  1225.     {
  1226.         $this->signature $signature;
  1227.     }
  1228.     /**
  1229.      * @return mixed
  1230.      */
  1231.     public function getAllowMailers()
  1232.     {
  1233.         return $this->allowMailers;
  1234.     }
  1235.     /**
  1236.      * @param mixed $allowMailers
  1237.      */
  1238.     public function setAllowMailers($allowMailers)
  1239.     {
  1240.         $this->allowMailers $allowMailers;
  1241.     }
  1242.     /**
  1243.      * @return Resource
  1244.      */
  1245.     public function getSupervisor()
  1246.     {
  1247.         return $this->supervisor;
  1248.     }
  1249.     /**
  1250.      * @param Resource $supervisor
  1251.      */
  1252.     public function setSupervisor(Resource $supervisor=null)
  1253.     {
  1254.         $this->supervisor $supervisor;
  1255.     }
  1256.     /**
  1257.      * @return mixed
  1258.      */
  1259.     public function getResources()
  1260.     {
  1261.         return $this->resources;
  1262.     }
  1263.     /**
  1264.      * @return mixed
  1265.      */
  1266.     public function getContractId()
  1267.     {
  1268.         return $this->contractId;
  1269.     }
  1270.     /**
  1271.      * @param mixed $contractId
  1272.      */
  1273.     public function setContractId($contractId)
  1274.     {
  1275.         $this->contractId $contractId;
  1276.     }
  1277.     /**
  1278.      * @return mixed
  1279.      */
  1280.     public function getBackgroundCheck()
  1281.     {
  1282.         return $this->backgroundCheck;
  1283.     }
  1284.     /**
  1285.      * @param mixed $backgroundCheck
  1286.      */
  1287.     public function setBackgroundCheck($backgroundCheck)
  1288.     {
  1289.         $this->backgroundCheck $backgroundCheck;
  1290.     }
  1291.     /**
  1292.      * @return mixed
  1293.      */
  1294.     public function getAdjusterAvailable()
  1295.     {
  1296.         return $this->adjusterAvailable;
  1297.     }
  1298.     /**
  1299.      * @param mixed $adjusterAvailable
  1300.      */
  1301.     public function setAdjusterAvailable($adjusterAvailable)
  1302.     {
  1303.         $this->adjusterAvailable $adjusterAvailable;
  1304.     }
  1305.     /**
  1306.      * @return mixed
  1307.      */
  1308.     public function getResumeReview()
  1309.     {
  1310.         return $this->resumeReview;
  1311.     }
  1312.     /**
  1313.      * @param mixed $resumeReview
  1314.      */
  1315.     public function setResumeReview($resumeReview)
  1316.     {
  1317.         $this->resumeReview $resumeReview;
  1318.     }
  1319.     /**
  1320.      * @param ResourceNotificationSetting $resourceNotificationSetting
  1321.      */
  1322.     public function addResourceNotificationSetting(ResourceNotificationSetting $resourceNotificationSetting)
  1323.     {
  1324.         if( $this->$resourceNotificationSetting->contains($resourceNotificationSetting) ){
  1325.             return;
  1326.         }
  1327.         $this->$resourceNotificationSetting->add$resourceNotificationSetting );
  1328.         $resourceNotificationSetting->setResource$this );
  1329.     }
  1330.     /**
  1331.      * @param ResourceNotificationSetting $resourceNotificationSetting
  1332.      */
  1333.     public function removeResourceNotificationSettingResourceNotificationSetting $resourceNotificationSetting )
  1334.     {
  1335.         if( !$this->resourceNotificationSettings->contains($resourceNotificationSetting) ){
  1336.             return;
  1337.         }
  1338.         $this->resourceNotificationSettings->removeElement$resourceNotificationSetting );
  1339.         $resourceNotificationSetting->removeResource();
  1340.     }
  1341.     /**
  1342.      * @return array
  1343.      */
  1344.     public function getResourceNotificationSettings()
  1345.     {
  1346.         return $this->resourceNotificationSettings->toArray();
  1347.     }
  1348.     /**
  1349.      * @param Assignments $claimResource
  1350.      */
  1351.     public function addResourceClaimAssignments $claimResource )
  1352.     {
  1353.         if( $this->resourceClaims->contains($claimResource) ){
  1354.             return;
  1355.         }
  1356.         $this->resourceClaims->add$claimResource );
  1357.         $claimResource->setResource($this);
  1358.     }
  1359.     /**
  1360.      * @param Assignments $claimResource
  1361.      */
  1362.     public function removeResourceClaimAssignments $claimResource )
  1363.     {
  1364.         if( !$this->resourceClaims->contains($claimResource) ){
  1365.             return;
  1366.         }
  1367.         $this->resourceClaims->removeElement$claimResource );
  1368.         $claimResource->removeResource($this);
  1369.     }
  1370.     /**
  1371.      * @return array
  1372.      */
  1373.     public function getResourceClaims()
  1374.     {
  1375.         return $this->resourceClaims->toArray();
  1376.     }
  1377.     /**
  1378.      * @param ClaimResourcePrevious $resourcePreviousClaims
  1379.      */
  1380.     public function addResourcePreviousClaimClaimResourcePrevious $resourcePreviousClaims )
  1381.     {
  1382.         if( $this->resourcePreviousClaims->contains($resourcePreviousClaims) ){
  1383.             return;
  1384.         }
  1385.         $this->resourcePreviousClaims->add$resourcePreviousClaims );
  1386.         $resourcePreviousClaims->setResource($this);
  1387.     }
  1388.     /**
  1389.      * @param ClaimResourcePrevious $resourcePreviousClaims
  1390.      */
  1391.     public function removeResourcePreviousClaimClaimResourcePrevious $resourcePreviousClaims )
  1392.     {
  1393.         if( !$this->resourcePreviousClaims->contains($resourcePreviousClaims) ){
  1394.             return;
  1395.         }
  1396.         $this->resourcePreviousClaims->removeElement$resourcePreviousClaims );
  1397.         $resourcePreviousClaims->removeResource($this);
  1398.     }
  1399.     /**
  1400.      * @return array
  1401.      */
  1402.     public function getResourcePreviousClaims()
  1403.     {
  1404.         return $this->resourcePreviousClaims->toArray();
  1405.     }
  1406.     /**
  1407.      * @param ResourceDashboard $resourceDashboard
  1408.      */
  1409.     public function setResourceDashboardResourceDashboard $resourceDashboard )
  1410.     {
  1411.        $this->resourceDashboard $resourceDashboard;
  1412.     }
  1413.     /**
  1414.      * @return void
  1415.      */
  1416.     public function removeResourceDashboard()
  1417.     {
  1418.         $this->resourceDashboardnull;
  1419.     }
  1420.     /**
  1421.      * @return string
  1422.      */
  1423.     public function getResourceDashboard()
  1424.     {
  1425.         return $this->resourceDashboard;
  1426.     }
  1427.     /**
  1428.      * @param Event $event
  1429.      */
  1430.     public function addResourceEventEvent $event )
  1431.     {
  1432.         if( $this->resourceEvents->contains($event) ){
  1433.             return;
  1434.         }
  1435.         $this->resourceEvents->add$event );
  1436.         $event->setResource($this);
  1437.     }
  1438.     /**
  1439.      * @param Event $event
  1440.      */
  1441.     public function removeResourceEventEvent $event )
  1442.     {
  1443.         if( !$this->resourceEvents->contains($event) ){
  1444.             return;
  1445.         }
  1446.         $this->resourceEvents->removeElement$event );
  1447.         $event->removeResource($this);
  1448.     }
  1449.     /**
  1450.      * @return array
  1451.      */
  1452.     public function getResourceEvents()
  1453.     {
  1454.         return $this->resourceEvents->toArray();
  1455.     }
  1456.     /**
  1457.      * @param Invoice $resourceInvoice
  1458.      */
  1459.     public function addResourceInvoiceInvoice $resourceInvoice )
  1460.     {
  1461.         if( $this->resourceInvoices->contains($resourceInvoice) ){
  1462.             return;
  1463.         }
  1464.         $this->resourceInvoices->add$resourceInvoice );
  1465.         $resourceInvoice->setResource($this);
  1466.     }
  1467.     /**
  1468.      * @param Invoice $claimInvoice
  1469.      */
  1470.     public function removeResourceInvoiceInvoice $resourceInvoice )
  1471.     {
  1472.         if( !$this->resourceInvoices->contains($resourceInvoice) ){
  1473.             return;
  1474.         }
  1475.         $this->resourceInvoices->removeElement$resourceInvoice );
  1476.         $resourceInvoice->removeResource($this);
  1477.     }
  1478.     /**
  1479.      * @return array
  1480.      */
  1481.     public function getResourceInvoices()
  1482.     {
  1483.         return $this->resourceInvoices->toArray();
  1484.     }
  1485.     /**
  1486.      * @return mixed
  1487.      */
  1488.     public function getServiceExpenseRate()
  1489.     {
  1490.         return $this->serviceExpenseRate;
  1491.     }
  1492.     /**
  1493.      * @param mixed $serviceExpenseRate
  1494.      */
  1495.     public function setServiceExpenseRate($serviceExpenseRate)
  1496.     {
  1497.         $this->serviceExpenseRate $serviceExpenseRate;
  1498.     }
  1499.     /**
  1500.      * @return mixed
  1501.      */
  1502.     public function getZeroCommission()
  1503.     {
  1504.         return $this->zeroCommission;
  1505.     }
  1506.     /**
  1507.      * @param mixed $zeroCommission
  1508.      */
  1509.     public function setZeroCommission($zeroCommission)
  1510.     {
  1511.         $this->zeroCommission $zeroCommission;
  1512.     }
  1513.     /**
  1514.      * @return boolean
  1515.      */
  1516.     public function getXactimateExp()
  1517.     {
  1518.         return $this->xactimateExp;
  1519.     }
  1520.     /**
  1521.      * @param boolean $boolean
  1522.      */
  1523.     public function setXactimateExp($boolean)
  1524.     {
  1525.         $this->xactimateExp $boolean;
  1526.     }
  1527.     /**
  1528.      * @return boolean
  1529.      */
  1530.     public function getXactAnalysisExp()
  1531.     {
  1532.         return $this->xactAnalysisExp;
  1533.     }
  1534.     /**
  1535.      * @param boolean $boolean
  1536.      */
  1537.     public function setXactAnalysisExp($boolean)
  1538.     {
  1539.         $this->xactAnalysisExp $boolean;
  1540.     }
  1541.     /**
  1542.      * @return boolean
  1543.      */
  1544.     public function getSymbilityExp()
  1545.     {
  1546.         return $this->symbilityExp;
  1547.     }
  1548.     /**
  1549.      * @param boolean $boolean
  1550.      */
  1551.     public function setSymbilityExp($boolean)
  1552.     {
  1553.         $this->symbilityExp $boolean;
  1554.     }
  1555.     /**
  1556.      * @return boolean
  1557.      */
  1558.     public function getPropertyExp()
  1559.     {
  1560.         return $this->propertyExp;
  1561.     }
  1562.     /**
  1563.      * @param boolean $boolean
  1564.      */
  1565.     public function setPropertyExp($boolean)
  1566.     {
  1567.         $this->propertyExp $boolean;
  1568.     }
  1569.     /**
  1570.      * @return boolean
  1571.      */
  1572.     /*public function getHomeownerExp()
  1573.     {
  1574.         return $this->homeownerExp;
  1575.     }*/
  1576.     /**
  1577.      * @param boolean $boolean
  1578.      */
  1579.     /*public function setHomeownerExp($boolean)
  1580.     {
  1581.         $this->homeownerExp = $boolean;
  1582.     }*/
  1583.     /**
  1584.      * @return boolean
  1585.      */
  1586.     /*public function getCommercialExp()
  1587.     {
  1588.         return $this->commercialExp;
  1589.     }*/
  1590.     /**
  1591.      * @param boolean $boolean
  1592.      */
  1593.     /*public function setCommercialExp($boolean)
  1594.     {
  1595.         $this->commercialExp = $boolean;
  1596.     }*/
  1597.     /**
  1598.      * @return boolean
  1599.      */
  1600.     /*public function getCasualtyExp()
  1601.     {
  1602.         return $this->casualtyExp;
  1603.     }*/
  1604.     /**
  1605.      * @param boolean $boolean
  1606.      */
  1607.     /*public function setCasualtyExp($boolean)
  1608.     {
  1609.         $this->casualtyExp = $boolean;
  1610.     }*/
  1611.     /**
  1612.      * @return integer
  1613.      */
  1614.     public function getStructureType()
  1615.     {
  1616.         return $this->structureType;
  1617.     }
  1618.     /**
  1619.      * @param integer $integer
  1620.      */
  1621.     public function setStructureType($integer)
  1622.     {
  1623.         $this->structureType $integer;
  1624.     }
  1625.     /**
  1626.      * @return boolean
  1627.      */
  1628.     public function getMilitaryExp()
  1629.     {
  1630.         return $this->militaryExp;
  1631.     }
  1632.     /**
  1633.      * @param boolean $boolean
  1634.      */
  1635.     public function setMilitaryExp($boolean)
  1636.     {
  1637.         $this->militaryExp $boolean;
  1638.     }
  1639.     /**
  1640.      * @return string
  1641.      */
  1642.     public function getMilitaryBranch()
  1643.     {
  1644.         return $this->militaryBranch;
  1645.     }
  1646.     /**
  1647.      * @param string $string
  1648.      */
  1649.     public function setMilitaryBranch($string)
  1650.     {
  1651.         $this->militaryBranch $string;
  1652.     }
  1653.     /**
  1654.      * @return string
  1655.      */
  1656.     public function getStormList()
  1657.     {
  1658.         return $this->stormList;
  1659.     }
  1660.     /**
  1661.      * @param string $string
  1662.      */
  1663.     public function setStormList($string)
  1664.     {
  1665.         $this->stormList $string;
  1666.     }
  1667.     /**
  1668.      * @return string
  1669.      */
  1670.     public function getCompanyList()
  1671.     {
  1672.         return $this->companyList;
  1673.     }
  1674.     /**
  1675.      * @param string $string
  1676.      */
  1677.     public function setCompanyList($string)
  1678.     {
  1679.         $this->companyList $string;
  1680.     }
  1681.     /**
  1682.      * @return string
  1683.      */
  1684.     public function getSoftwareList()
  1685.     {
  1686.         return $this->softwareList;
  1687.     }
  1688.     /**
  1689.      * @param string $string
  1690.      */
  1691.     public function setSoftwareList($string)
  1692.     {
  1693.         $this->softwareList $string;
  1694.     }
  1695.     /**
  1696.      * @return string
  1697.      */
  1698.     /*public function getCertsList()
  1699.     {
  1700.         return $this->certsList;
  1701.     }*/
  1702.     /**
  1703.      * @param string $string
  1704.      */
  1705.     /*public function setCertsList($string)
  1706.     {
  1707.         $this->certsList = $string;
  1708.     }*/
  1709.     /**
  1710.      * @param ClaimTeamResource $claimTeam
  1711.      */
  1712.     public function addClaimTeamClaimTeamResource $claimTeam )
  1713.     {
  1714.         if( $this->claimTeams->contains($claimTeam) ){
  1715.             return;
  1716.         }
  1717.         $this->claimTeams->add$claimTeam );
  1718.         $claimTeam->setResource($this);
  1719.     }
  1720.     /**
  1721.      * @param ClaimTeamResource $claimTeam
  1722.      */
  1723.     public function removeClaimTeamClaimTeamResource $claimTeam )
  1724.     {
  1725.         if( !$this->claimTeams->contains($claimTeam) ){
  1726.             return;
  1727.         }
  1728.         $this->claimTeams->removeElement$claimTeam );
  1729.         $claimTeam->removeResource();
  1730.     }
  1731.     /**
  1732.      * @return array
  1733.      */
  1734.     public function getClaimTeams($toArray=true)
  1735.     {
  1736.         if ($toArray) {
  1737.             return $this->claimTeams->toArray();
  1738.         } else {
  1739.             return $this->claimTeams;
  1740.         }
  1741.     }
  1742.     /**
  1743.      * @return mixed
  1744.      */
  1745.     public function getLatitude()
  1746.     {
  1747.         return $this->latitude;
  1748.     }
  1749.     /**
  1750.      * @param mixed $latitude
  1751.      */
  1752.     public function setLatitude($latitude)
  1753.     {
  1754.         $this->latitude $latitude;
  1755.     }
  1756.     /**
  1757.      * @return mixed
  1758.      */
  1759.     public function getLongitude()
  1760.     {
  1761.         return $this->longitude;
  1762.     }
  1763.     /**
  1764.      * @param mixed $longitude
  1765.      */
  1766.     public function setLongitude($longitude)
  1767.     {
  1768.         $this->longitude $longitude;
  1769.     }
  1770.     /**
  1771.      * @return string
  1772.      */
  1773.     public function getActivationKey()
  1774.     {
  1775.         return $this->activationKey;
  1776.     }
  1777.     /**
  1778.      * @param string $activationKey
  1779.      */
  1780.     public function setActivationKey($activationKey)
  1781.     {
  1782.         $this->activationKey $activationKey;
  1783.     }
  1784.     /**
  1785.      * @return \DateTime
  1786.      */
  1787.     public function getActivationTimestamp()
  1788.     {
  1789.         return $this->activationTimestamp;
  1790.     }
  1791.     /**
  1792.      * @param \DateTime $activationTimestamp
  1793.      */
  1794.     public function setActivationTimestamp($activationTimestamp)
  1795.     {
  1796.         $this->activationTimestamp $activationTimestamp;
  1797.     }
  1798.     /**
  1799.      * Set PasswordResetToken
  1800.      *
  1801.      * @return string
  1802.      *
  1803.      */
  1804.     public function setPasswordResetToken($passwordResetToken)
  1805.     {
  1806.         $this->passwordResetToken $passwordResetToken;
  1807.         return $this;
  1808.     }
  1809.     /**
  1810.      * Get PasswordResetToken
  1811.      *
  1812.      * @return string
  1813.      */
  1814.     public function getPasswordResetToken()
  1815.     {
  1816.         return $this->passwordResetToken;
  1817.     }
  1818.     /**
  1819.      * @return array
  1820.      */
  1821.     public function getWeekLimits()
  1822.     {
  1823.         return $this->limits->toArray();
  1824.     }
  1825.     /**
  1826.      * @return integer
  1827.      */
  1828.     public function getLastAssigned()
  1829.     {
  1830.         return $this->lastAssigned;
  1831.     }
  1832.     /**
  1833.      * @param integer $lastAssigned
  1834.      */
  1835.     public function setLastAssigned($lastAssigned)
  1836.     {
  1837.         $this->lastAssigned $lastAssigned;
  1838.     }
  1839.     /**
  1840.      * @return mixed
  1841.      */
  1842.     public function getLastTemplateAssigned()
  1843.     {
  1844.         return $this->lastTemplateAssigned;
  1845.     }
  1846.     /**
  1847.      * @param mixed $lastTemplateAssigned
  1848.      */
  1849.     public function setLastTemplateAssigned($lastTemplateAssigned)
  1850.     {
  1851.         $this->lastTemplateAssigned $lastTemplateAssigned;
  1852.     }
  1853.     /**
  1854.      * @return mixed
  1855.      */
  1856.     public function getNiprNumber(){
  1857.         return trim($this->niprNumber);
  1858.     }
  1859.     /**
  1860.      * @param mixed $niprNumber
  1861.      */
  1862.     public function setNiprNumber($niprNumber){
  1863.         $this->niprNumber trim($niprNumber);
  1864.     }
  1865.     /**
  1866.      * @return mixed
  1867.      */
  1868.     public function getAgentSyncResponse(){
  1869.         return trim($this->agentSyncResponse);
  1870.     }
  1871.     /**
  1872.      * @param mixed $agentSyncResponse
  1873.      */
  1874.     public function setAgentSyncResponse($agentSyncResponse){
  1875.         $this->agentSyncResponse trim($agentSyncResponse);
  1876.     }
  1877.     /**
  1878.      * @return mixed
  1879.      */
  1880.     public function getWingSpanCollaboratorId(){
  1881.         return trim($this->wingSpanCollaboratorId);
  1882.     }
  1883.     /**
  1884.      * @param mixed $agentSyncResponse
  1885.      */
  1886.     public function setWingSpanCollaboratorId($wingSpanCollaboratorId){
  1887.         $this->wingSpanCollaboratorId trim($wingSpanCollaboratorId);
  1888.     }
  1889.     /**
  1890.      * @return mixed
  1891.      */
  1892.     public function getWingSpanCollaboratorGroupId(){
  1893.         return trim($this->wingSpanCollaboratorGroupId);
  1894.     }
  1895.     /**
  1896.      * @param mixed $agentSyncResponse
  1897.      */
  1898.     public function setWingSpanCollaboratorGroupId($wingSpanCollaboratorGroupId){
  1899.         $this->wingSpanCollaboratorGroupId trim($wingSpanCollaboratorGroupId);
  1900.     }
  1901.     /**
  1902.      * @return mixed
  1903.      */
  1904.     public function getNiprTracking(){
  1905.         return $this->niprTracking;
  1906.     }
  1907.     /**
  1908.      * @param mixed $niprTracking
  1909.      */
  1910.     public function setNiprTracking($niprTracking){
  1911.         $this->niprTracking $niprTracking;
  1912.     }
  1913.     /**
  1914.      * Set SmsAuthetication
  1915.      *
  1916.      * @return string
  1917.      *
  1918.      */
  1919.     public function setSmsAuthetication($smsAuthetication)
  1920.     {
  1921.         $this->smsAuthetication $smsAuthetication;
  1922.         return $this;
  1923.     }
  1924.     /**
  1925.      * Get SmsAuthetication
  1926.      *
  1927.      * @return string
  1928.      */
  1929.     public function getSmsAuthetication()
  1930.     {
  1931.         return $this->smsAuthetication;
  1932.     }
  1933.         /**
  1934.      * @param \Datetime $passwordChangeDate
  1935.      */
  1936.     public function setPasswordChangeDate($passwordChangeDate)
  1937.     {
  1938.         $this->passwordChangeDate $passwordChangeDate;
  1939.     }
  1940.     /**
  1941.      * @return \Datetime
  1942.      */
  1943.     public function getPasswordChangeDate()
  1944.     {
  1945.         return $this->passwordChangeDate;
  1946.     }
  1947.     /**
  1948.      * @return integer
  1949.      */
  1950.     
  1951.     public function getNaca()
  1952.     {
  1953.         return $this->naca;
  1954.     }
  1955.     /**
  1956.      * @param integer $naca
  1957.      */
  1958.     public function setNaca($naca)
  1959.     {
  1960.         $this->naca $naca;
  1961.     }
  1962.     /**
  1963.      * Set smsAcceptMessage
  1964.      *
  1965.      * @return integer
  1966.      *
  1967.      */
  1968.     public function setSmsAcceptMessage($smsAcceptMessage)
  1969.     {
  1970.         $this->smsAcceptMessage $smsAcceptMessage;
  1971.         return $this;
  1972.     }
  1973.     /**
  1974.      * Get smsAcceptMessage
  1975.      *
  1976.      * @return integer
  1977.      */
  1978.     public function getSmsAcceptMessage()
  1979.     {
  1980.         return $this->smsAcceptMessage;
  1981.     }
  1982. }