Failed Conditions
Pull Request — experimental/sf (#31)
by Kentaro
06:59
created

Customer   F

Complexity

Total Complexity 74

Size/Duplication

Total Lines 1121
Duplicated Lines 0 %

Coupling/Cohesion

Components 3
Dependencies 5

Importance

Changes 0
Metric Value
dl 0
loc 1121
rs 1.596
c 0
b 0
f 0
wmc 74
lcom 3
cbo 5

74 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
A __toString() 0 4 1
A getRoles() 0 4 1
A getUsername() 0 4 1
A eraseCredentials() 0 3 1
A loadValidatorMetadata() 0 8 1
A getId() 0 4 1
A setName01() 0 6 1
A getName01() 0 4 1
A setName02() 0 6 1
A getName02() 0 4 1
A setKana01() 0 6 1
A getKana01() 0 4 1
A setKana02() 0 6 1
A getKana02() 0 4 1
A setCompanyName() 0 6 1
A getCompanyName() 0 4 1
A setPostalCode() 0 6 1
A getPostalCode() 0 4 1
A setAddr01() 0 6 1
A getAddr01() 0 4 1
A setAddr02() 0 6 1
A getAddr02() 0 4 1
A setEmail() 0 6 1
A getEmail() 0 4 1
A setPhoneNumber() 0 6 1
A getPhoneNumber() 0 4 1
A setBirth() 0 6 1
A getBirth() 0 4 1
A setPassword() 0 6 1
A getPassword() 0 4 1
A setSalt() 0 6 1
A getSalt() 0 4 1
A setSecretKey() 0 6 1
A getSecretKey() 0 4 1
A setFirstBuyDate() 0 6 1
A getFirstBuyDate() 0 4 1
A setLastBuyDate() 0 6 1
A getLastBuyDate() 0 4 1
A setBuyTimes() 0 6 1
A getBuyTimes() 0 4 1
A setBuyTotal() 0 6 1
A getBuyTotal() 0 4 1
A setNote() 0 6 1
A getNote() 0 4 1
A setResetKey() 0 6 1
A getResetKey() 0 4 1
A setResetExpire() 0 6 1
A getResetExpire() 0 4 1
A setCreateDate() 0 6 1
A getCreateDate() 0 4 1
A setUpdateDate() 0 6 1
A getUpdateDate() 0 4 1
A addCustomerFavoriteProduct() 0 6 1
A removeCustomerFavoriteProduct() 0 4 1
A getCustomerFavoriteProducts() 0 4 1
A addCustomerAddress() 0 6 1
A removeCustomerAddress() 0 4 1
A getCustomerAddresses() 0 4 1
A addOrder() 0 6 1
A removeOrder() 0 4 1
A getOrders() 0 4 1
A setStatus() 0 6 1
A getStatus() 0 4 1
A setSex() 0 6 1
A getSex() 0 4 1
A setJob() 0 6 1
A getJob() 0 4 1
A setCountry() 0 6 1
A getCountry() 0 4 1
A setPref() 0 6 1
A getPref() 0 4 1
A setPoint() 0 6 1
A getPoint() 0 4 1

How to fix   Complexity   

Complex Class

Complex classes like Customer often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes. You can also have a look at the cohesion graph to spot any un-connected, or weakly-connected components.

Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.

While breaking up the class, it is a good idea to analyze how other classes use Customer, and based on these observations, apply Extract Interface, too.

1
<?php
2
3
/*
4
 * This file is part of EC-CUBE
5
 *
6
 * Copyright(c) LOCKON CO.,LTD. All Rights Reserved.
7
 *
8
 * http://www.lockon.co.jp/
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Eccube\Entity;
15
16
use Doctrine\ORM\Mapping as ORM;
17
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
18
use Symfony\Component\Security\Core\User\UserInterface;
19
use Symfony\Component\Validator\Mapping\ClassMetadata;
20
21
if (!class_exists('\Eccube\Entity\Customer')) {
22
    /**
23
     * Customer
24
     *
25
     * @ORM\Table(name="dtb_customer", uniqueConstraints={@ORM\UniqueConstraint(name="secret_key", columns={"secret_key"})}, indexes={@ORM\Index(name="dtb_customer_buy_times_idx", columns={"buy_times"}), @ORM\Index(name="dtb_customer_buy_total_idx", columns={"buy_total"}), @ORM\Index(name="dtb_customer_create_date_idx", columns={"create_date"}), @ORM\Index(name="dtb_customer_update_date_idx", columns={"update_date"}), @ORM\Index(name="dtb_customer_last_buy_date_idx", columns={"last_buy_date"}), @ORM\Index(name="dtb_customer_email_idx", columns={"email"})})
26
     * @ORM\InheritanceType("SINGLE_TABLE")
27
     * @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
28
     * @ORM\HasLifecycleCallbacks()
29
     * @ORM\Entity(repositoryClass="Eccube\Repository\CustomerRepository")
30
     */
31
    class Customer extends \Eccube\Entity\AbstractEntity implements UserInterface
32
    {
33
        /**
34
         * @var int
35
         *
36
         * @ORM\Column(name="id", type="integer", options={"unsigned":true})
37
         * @ORM\Id
38
         * @ORM\GeneratedValue(strategy="IDENTITY")
39
         */
40
        private $id;
41
42
        /**
43
         * @var string
44
         *
45
         * @ORM\Column(name="name01", type="string", length=255)
46
         */
47
        private $name01;
48
49
        /**
50
         * @var string
51
         *
52
         * @ORM\Column(name="name02", type="string", length=255)
53
         */
54
        private $name02;
55
56
        /**
57
         * @var string|null
58
         *
59
         * @ORM\Column(name="kana01", type="string", length=255, nullable=true)
60
         */
61
        private $kana01;
62
63
        /**
64
         * @var string|null
65
         *
66
         * @ORM\Column(name="kana02", type="string", length=255, nullable=true)
67
         */
68
        private $kana02;
69
70
        /**
71
         * @var string|null
72
         *
73
         * @ORM\Column(name="company_name", type="string", length=255, nullable=true)
74
         */
75
        private $company_name;
76
77
        /**
78
         * @var string|null
79
         *
80
         * @ORM\Column(name="postal_code", type="string", length=8, nullable=true)
81
         */
82
        private $postal_code;
83
84
        /**
85
         * @var string|null
86
         *
87
         * @ORM\Column(name="addr01", type="string", length=255, nullable=true)
88
         */
89
        private $addr01;
90
91
        /**
92
         * @var string|null
93
         *
94
         * @ORM\Column(name="addr02", type="string", length=255, nullable=true)
95
         */
96
        private $addr02;
97
98
        /**
99
         * @var string
100
         *
101
         * @ORM\Column(name="email", type="string", length=255)
102
         */
103
        private $email;
104
105
        /**
106
         * @var string|null
107
         *
108
         * @ORM\Column(name="phone_number", type="string", length=14, nullable=true)
109
         */
110
        private $phone_number;
111
112
        /**
113
         * @var \DateTime|null
114
         *
115
         * @ORM\Column(name="birth", type="datetimetz", nullable=true)
116
         */
117
        private $birth;
118
119
        /**
120
         * @var string|null
121
         *
122
         * @ORM\Column(name="password", type="string", length=255, nullable=true)
123
         */
124
        private $password;
125
126
        /**
127
         * @var string|null
128
         *
129
         * @ORM\Column(name="salt", type="string", length=255, nullable=true)
130
         */
131
        private $salt;
132
133
        /**
134
         * @var string
135
         *
136
         * @ORM\Column(name="secret_key", type="string", length=255)
137
         */
138
        private $secret_key;
139
140
        /**
141
         * @var \DateTime|null
142
         *
143
         * @ORM\Column(name="first_buy_date", type="datetimetz", nullable=true)
144
         */
145
        private $first_buy_date;
146
147
        /**
148
         * @var \DateTime|null
149
         *
150
         * @ORM\Column(name="last_buy_date", type="datetimetz", nullable=true)
151
         */
152
        private $last_buy_date;
153
154
        /**
155
         * @var string|null
156
         *
157
         * @ORM\Column(name="buy_times", type="decimal", precision=10, scale=0, nullable=true, options={"unsigned":true,"default":0})
158
         */
159
        private $buy_times = 0;
160
161
        /**
162
         * @var string|null
163
         *
164
         * @ORM\Column(name="buy_total", type="decimal", precision=12, scale=2, nullable=true, options={"unsigned":true,"default":0})
165
         */
166
        private $buy_total = 0;
167
168
        /**
169
         * @var string|null
170
         *
171
         * @ORM\Column(name="note", type="string", length=4000, nullable=true)
172
         */
173
        private $note;
174
175
        /**
176
         * @var string|null
177
         *
178
         * @ORM\Column(name="reset_key", type="string", length=255, nullable=true)
179
         */
180
        private $reset_key;
181
182
        /**
183
         * @var \DateTime|null
184
         *
185
         * @ORM\Column(name="reset_expire", type="datetimetz", nullable=true)
186
         */
187
        private $reset_expire;
188
189
        /**
190
         * @var string
191
         *
192
         * @ORM\Column(name="point", type="decimal", precision=12, scale=0, options={"unsigned":false,"default":0})
193
         */
194
        private $point = '0';
195
196
        /**
197
         * @var \DateTime
198
         *
199
         * @ORM\Column(name="create_date", type="datetimetz")
200
         */
201
        private $create_date;
202
203
        /**
204
         * @var \DateTime
205
         *
206
         * @ORM\Column(name="update_date", type="datetimetz")
207
         */
208
        private $update_date;
209
210
        /**
211
         * @var \Doctrine\Common\Collections\Collection
212
         *
213
         * @ORM\OneToMany(targetEntity="Eccube\Entity\CustomerFavoriteProduct", mappedBy="Customer", cascade={"remove"})
214
         */
215
        private $CustomerFavoriteProducts;
216
217
        /**
218
         * @var \Doctrine\Common\Collections\Collection
219
         *
220
         * @ORM\OneToMany(targetEntity="Eccube\Entity\CustomerAddress", mappedBy="Customer", cascade={"remove"})
221
         * @ORM\OrderBy({
222
         *     "id"="ASC"
223
         * })
224
         */
225
        private $CustomerAddresses;
226
227
        /**
228
         * @var \Doctrine\Common\Collections\Collection
229
         *
230
         * @ORM\OneToMany(targetEntity="Eccube\Entity\Order", mappedBy="Customer")
231
         */
232
        private $Orders;
233
234
        /**
235
         * @var \Eccube\Entity\Master\CustomerStatus
236
         *
237
         * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\CustomerStatus")
238
         * @ORM\JoinColumns({
239
         *   @ORM\JoinColumn(name="customer_status_id", referencedColumnName="id")
240
         * })
241
         */
242
        private $Status;
243
244
        /**
245
         * @var \Eccube\Entity\Master\Sex
246
         *
247
         * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Sex")
248
         * @ORM\JoinColumns({
249
         *   @ORM\JoinColumn(name="sex_id", referencedColumnName="id")
250
         * })
251
         */
252
        private $Sex;
253
254
        /**
255
         * @var \Eccube\Entity\Master\Job
256
         *
257
         * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Job")
258
         * @ORM\JoinColumns({
259
         *   @ORM\JoinColumn(name="job_id", referencedColumnName="id")
260
         * })
261
         */
262
        private $Job;
263
264
        /**
265
         * @var \Eccube\Entity\Master\Country
266
         *
267
         * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Country")
268
         * @ORM\JoinColumns({
269
         *   @ORM\JoinColumn(name="country_id", referencedColumnName="id")
270
         * })
271
         */
272
        private $Country;
273
274
        /**
275
         * @var \Eccube\Entity\Master\Pref
276
         *
277
         * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Pref")
278
         * @ORM\JoinColumns({
279
         *   @ORM\JoinColumn(name="pref_id", referencedColumnName="id")
280
         * })
281
         */
282
        private $Pref;
283
284
        /**
285
         * Constructor
286
         */
287
        public function __construct()
288
        {
289
            $this->CustomerFavoriteProducts = new \Doctrine\Common\Collections\ArrayCollection();
290
            $this->CustomerAddresses = new \Doctrine\Common\Collections\ArrayCollection();
291
            $this->Orders = new \Doctrine\Common\Collections\ArrayCollection();
292
293
            $this->setBuyTimes(0);
294
            $this->setBuyTotal(0);
295
        }
296
297
        /**
298
         * @return string
299
         */
300
        public function __toString()
301
        {
302
            return (string) ($this->getName01().' '.$this->getName02());
303
        }
304
305
        /**
306
         * {@inheritdoc}
307
         */
308
        public function getRoles()
309
        {
310
            return ['ROLE_USER'];
311
        }
312
313
        /**
314
         * {@inheritdoc}
315
         */
316
        public function getUsername()
317
        {
318
            return $this->email;
319
        }
320
321
        /**
322
         * {@inheritdoc}
323
         */
324
        public function eraseCredentials()
325
        {
326
        }
327
328
        // TODO: できればFormTypeで行いたい
329
        public static function loadValidatorMetadata(ClassMetadata $metadata)
330
        {
331
            $metadata->addConstraint(new UniqueEntity([
332
            'fields' => 'email',
333
            'message' => 'customer.text.error.email_registered',
334
            'repositoryMethod' => 'getNonWithdrawingCustomers',
335
        ]));
336
        }
337
338
        /**
339
         * Get id.
340
         *
341
         * @return int
342
         */
343
        public function getId()
344
        {
345
            return $this->id;
346
        }
347
348
        /**
349
         * Set name01.
350
         *
351
         * @param string $name01
352
         *
353
         * @return Customer
354
         */
355
        public function setName01($name01)
356
        {
357
            $this->name01 = $name01;
358
359
            return $this;
360
        }
361
362
        /**
363
         * Get name01.
364
         *
365
         * @return string
366
         */
367
        public function getName01()
368
        {
369
            return $this->name01;
370
        }
371
372
        /**
373
         * Set name02.
374
         *
375
         * @param string $name02
376
         *
377
         * @return Customer
378
         */
379
        public function setName02($name02)
380
        {
381
            $this->name02 = $name02;
382
383
            return $this;
384
        }
385
386
        /**
387
         * Get name02.
388
         *
389
         * @return string
390
         */
391
        public function getName02()
392
        {
393
            return $this->name02;
394
        }
395
396
        /**
397
         * Set kana01.
398
         *
399
         * @param string|null $kana01
400
         *
401
         * @return Customer
402
         */
403
        public function setKana01($kana01 = null)
404
        {
405
            $this->kana01 = $kana01;
406
407
            return $this;
408
        }
409
410
        /**
411
         * Get kana01.
412
         *
413
         * @return string|null
414
         */
415
        public function getKana01()
416
        {
417
            return $this->kana01;
418
        }
419
420
        /**
421
         * Set kana02.
422
         *
423
         * @param string|null $kana02
424
         *
425
         * @return Customer
426
         */
427
        public function setKana02($kana02 = null)
428
        {
429
            $this->kana02 = $kana02;
430
431
            return $this;
432
        }
433
434
        /**
435
         * Get kana02.
436
         *
437
         * @return string|null
438
         */
439
        public function getKana02()
440
        {
441
            return $this->kana02;
442
        }
443
444
        /**
445
         * Set companyName.
446
         *
447
         * @param string|null $companyName
448
         *
449
         * @return Customer
450
         */
451
        public function setCompanyName($companyName = null)
452
        {
453
            $this->company_name = $companyName;
454
455
            return $this;
456
        }
457
458
        /**
459
         * Get companyName.
460
         *
461
         * @return string|null
462
         */
463
        public function getCompanyName()
464
        {
465
            return $this->company_name;
466
        }
467
468
        /**
469
         * Set postal_code.
470
         *
471
         * @param string|null $postal_code
472
         *
473
         * @return Customer
474
         */
475
        public function setPostalCode($postal_code = null)
476
        {
477
            $this->postal_code = $postal_code;
478
479
            return $this;
480
        }
481
482
        /**
483
         * Get postal_code.
484
         *
485
         * @return string|null
486
         */
487
        public function getPostalCode()
488
        {
489
            return $this->postal_code;
490
        }
491
492
        /**
493
         * Set addr01.
494
         *
495
         * @param string|null $addr01
496
         *
497
         * @return Customer
498
         */
499
        public function setAddr01($addr01 = null)
500
        {
501
            $this->addr01 = $addr01;
502
503
            return $this;
504
        }
505
506
        /**
507
         * Get addr01.
508
         *
509
         * @return string|null
510
         */
511
        public function getAddr01()
512
        {
513
            return $this->addr01;
514
        }
515
516
        /**
517
         * Set addr02.
518
         *
519
         * @param string|null $addr02
520
         *
521
         * @return Customer
522
         */
523
        public function setAddr02($addr02 = null)
524
        {
525
            $this->addr02 = $addr02;
526
527
            return $this;
528
        }
529
530
        /**
531
         * Get addr02.
532
         *
533
         * @return string|null
534
         */
535
        public function getAddr02()
536
        {
537
            return $this->addr02;
538
        }
539
540
        /**
541
         * Set email.
542
         *
543
         * @param string $email
544
         *
545
         * @return Customer
546
         */
547
        public function setEmail($email)
548
        {
549
            $this->email = $email;
550
551
            return $this;
552
        }
553
554
        /**
555
         * Get email.
556
         *
557
         * @return string
558
         */
559
        public function getEmail()
560
        {
561
            return $this->email;
562
        }
563
564
        /**
565
         * Set phone_number.
566
         *
567
         * @param string|null $phone_number
568
         *
569
         * @return Customer
570
         */
571
        public function setPhoneNumber($phone_number = null)
572
        {
573
            $this->phone_number = $phone_number;
574
575
            return $this;
576
        }
577
578
        /**
579
         * Get phone_number.
580
         *
581
         * @return string|null
582
         */
583
        public function getPhoneNumber()
584
        {
585
            return $this->phone_number;
586
        }
587
588
        /**
589
         * Set birth.
590
         *
591
         * @param \DateTime|null $birth
592
         *
593
         * @return Customer
594
         */
595
        public function setBirth($birth = null)
596
        {
597
            $this->birth = $birth;
598
599
            return $this;
600
        }
601
602
        /**
603
         * Get birth.
604
         *
605
         * @return \DateTime|null
606
         */
607
        public function getBirth()
608
        {
609
            return $this->birth;
610
        }
611
612
        /**
613
         * Set password.
614
         *
615
         * @param string|null $password
616
         *
617
         * @return Customer
618
         */
619
        public function setPassword($password = null)
620
        {
621
            $this->password = $password;
622
623
            return $this;
624
        }
625
626
        /**
627
         * Get password.
628
         *
629
         * @return string|null
630
         */
631
        public function getPassword()
632
        {
633
            return $this->password;
634
        }
635
636
        /**
637
         * Set salt.
638
         *
639
         * @param string|null $salt
640
         *
641
         * @return Customer
642
         */
643
        public function setSalt($salt = null)
644
        {
645
            $this->salt = $salt;
646
647
            return $this;
648
        }
649
650
        /**
651
         * Get salt.
652
         *
653
         * @return string|null
654
         */
655
        public function getSalt()
656
        {
657
            return $this->salt;
658
        }
659
660
        /**
661
         * Set secretKey.
662
         *
663
         * @param string $secretKey
664
         *
665
         * @return Customer
666
         */
667
        public function setSecretKey($secretKey)
668
        {
669
            $this->secret_key = $secretKey;
670
671
            return $this;
672
        }
673
674
        /**
675
         * Get secretKey.
676
         *
677
         * @return string
678
         */
679
        public function getSecretKey()
680
        {
681
            return $this->secret_key;
682
        }
683
684
        /**
685
         * Set firstBuyDate.
686
         *
687
         * @param \DateTime|null $firstBuyDate
688
         *
689
         * @return Customer
690
         */
691
        public function setFirstBuyDate($firstBuyDate = null)
692
        {
693
            $this->first_buy_date = $firstBuyDate;
694
695
            return $this;
696
        }
697
698
        /**
699
         * Get firstBuyDate.
700
         *
701
         * @return \DateTime|null
702
         */
703
        public function getFirstBuyDate()
704
        {
705
            return $this->first_buy_date;
706
        }
707
708
        /**
709
         * Set lastBuyDate.
710
         *
711
         * @param \DateTime|null $lastBuyDate
712
         *
713
         * @return Customer
714
         */
715
        public function setLastBuyDate($lastBuyDate = null)
716
        {
717
            $this->last_buy_date = $lastBuyDate;
718
719
            return $this;
720
        }
721
722
        /**
723
         * Get lastBuyDate.
724
         *
725
         * @return \DateTime|null
726
         */
727
        public function getLastBuyDate()
728
        {
729
            return $this->last_buy_date;
730
        }
731
732
        /**
733
         * Set buyTimes.
734
         *
735
         * @param string|null $buyTimes
736
         *
737
         * @return Customer
738
         */
739
        public function setBuyTimes($buyTimes = null)
740
        {
741
            $this->buy_times = $buyTimes;
742
743
            return $this;
744
        }
745
746
        /**
747
         * Get buyTimes.
748
         *
749
         * @return string|null
750
         */
751
        public function getBuyTimes()
752
        {
753
            return $this->buy_times;
754
        }
755
756
        /**
757
         * Set buyTotal.
758
         *
759
         * @param string|null $buyTotal
760
         *
761
         * @return Customer
762
         */
763
        public function setBuyTotal($buyTotal = null)
764
        {
765
            $this->buy_total = $buyTotal;
766
767
            return $this;
768
        }
769
770
        /**
771
         * Get buyTotal.
772
         *
773
         * @return string|null
774
         */
775
        public function getBuyTotal()
776
        {
777
            return $this->buy_total;
778
        }
779
780
        /**
781
         * Set note.
782
         *
783
         * @param string|null $note
784
         *
785
         * @return Customer
786
         */
787
        public function setNote($note = null)
788
        {
789
            $this->note = $note;
790
791
            return $this;
792
        }
793
794
        /**
795
         * Get note.
796
         *
797
         * @return string|null
798
         */
799
        public function getNote()
800
        {
801
            return $this->note;
802
        }
803
804
        /**
805
         * Set resetKey.
806
         *
807
         * @param string|null $resetKey
808
         *
809
         * @return Customer
810
         */
811
        public function setResetKey($resetKey = null)
812
        {
813
            $this->reset_key = $resetKey;
814
815
            return $this;
816
        }
817
818
        /**
819
         * Get resetKey.
820
         *
821
         * @return string|null
822
         */
823
        public function getResetKey()
824
        {
825
            return $this->reset_key;
826
        }
827
828
        /**
829
         * Set resetExpire.
830
         *
831
         * @param \DateTime|null $resetExpire
832
         *
833
         * @return Customer
834
         */
835
        public function setResetExpire($resetExpire = null)
836
        {
837
            $this->reset_expire = $resetExpire;
838
839
            return $this;
840
        }
841
842
        /**
843
         * Get resetExpire.
844
         *
845
         * @return \DateTime|null
846
         */
847
        public function getResetExpire()
848
        {
849
            return $this->reset_expire;
850
        }
851
852
        /**
853
         * Set createDate.
854
         *
855
         * @param \DateTime $createDate
856
         *
857
         * @return Customer
858
         */
859
        public function setCreateDate($createDate)
860
        {
861
            $this->create_date = $createDate;
862
863
            return $this;
864
        }
865
866
        /**
867
         * Get createDate.
868
         *
869
         * @return \DateTime
870
         */
871
        public function getCreateDate()
872
        {
873
            return $this->create_date;
874
        }
875
876
        /**
877
         * Set updateDate.
878
         *
879
         * @param \DateTime $updateDate
880
         *
881
         * @return Customer
882
         */
883
        public function setUpdateDate($updateDate)
884
        {
885
            $this->update_date = $updateDate;
886
887
            return $this;
888
        }
889
890
        /**
891
         * Get updateDate.
892
         *
893
         * @return \DateTime
894
         */
895
        public function getUpdateDate()
896
        {
897
            return $this->update_date;
898
        }
899
900
        /**
901
         * Add customerFavoriteProduct.
902
         *
903
         * @param \Eccube\Entity\CustomerFavoriteProduct $customerFavoriteProduct
904
         *
905
         * @return Customer
906
         */
907
        public function addCustomerFavoriteProduct(\Eccube\Entity\CustomerFavoriteProduct $customerFavoriteProduct)
908
        {
909
            $this->CustomerFavoriteProducts[] = $customerFavoriteProduct;
910
911
            return $this;
912
        }
913
914
        /**
915
         * Remove customerFavoriteProduct.
916
         *
917
         * @param \Eccube\Entity\CustomerFavoriteProduct $customerFavoriteProduct
918
         *
919
         * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
920
         */
921
        public function removeCustomerFavoriteProduct(\Eccube\Entity\CustomerFavoriteProduct $customerFavoriteProduct)
922
        {
923
            return $this->CustomerFavoriteProducts->removeElement($customerFavoriteProduct);
924
        }
925
926
        /**
927
         * Get customerFavoriteProducts.
928
         *
929
         * @return \Doctrine\Common\Collections\Collection
930
         */
931
        public function getCustomerFavoriteProducts()
932
        {
933
            return $this->CustomerFavoriteProducts;
934
        }
935
936
        /**
937
         * Add customerAddress.
938
         *
939
         * @param \Eccube\Entity\CustomerAddress $customerAddress
940
         *
941
         * @return Customer
942
         */
943
        public function addCustomerAddress(\Eccube\Entity\CustomerAddress $customerAddress)
944
        {
945
            $this->CustomerAddresses[] = $customerAddress;
946
947
            return $this;
948
        }
949
950
        /**
951
         * Remove customerAddress.
952
         *
953
         * @param \Eccube\Entity\CustomerAddress $customerAddress
954
         *
955
         * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
956
         */
957
        public function removeCustomerAddress(\Eccube\Entity\CustomerAddress $customerAddress)
958
        {
959
            return $this->CustomerAddresses->removeElement($customerAddress);
960
        }
961
962
        /**
963
         * Get customerAddresses.
964
         *
965
         * @return \Doctrine\Common\Collections\Collection
966
         */
967
        public function getCustomerAddresses()
968
        {
969
            return $this->CustomerAddresses;
970
        }
971
972
        /**
973
         * Add order.
974
         *
975
         * @param \Eccube\Entity\Order $order
976
         *
977
         * @return Customer
978
         */
979
        public function addOrder(\Eccube\Entity\Order $order)
980
        {
981
            $this->Orders[] = $order;
982
983
            return $this;
984
        }
985
986
        /**
987
         * Remove order.
988
         *
989
         * @param \Eccube\Entity\Order $order
990
         *
991
         * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
992
         */
993
        public function removeOrder(\Eccube\Entity\Order $order)
994
        {
995
            return $this->Orders->removeElement($order);
996
        }
997
998
        /**
999
         * Get orders.
1000
         *
1001
         * @return \Doctrine\Common\Collections\Collection
1002
         */
1003
        public function getOrders()
1004
        {
1005
            return $this->Orders;
1006
        }
1007
1008
        /**
1009
         * Set status.
1010
         *
1011
         * @param \Eccube\Entity\Master\CustomerStatus|null $status
1012
         *
1013
         * @return Customer
1014
         */
1015
        public function setStatus(\Eccube\Entity\Master\CustomerStatus $status = null)
1016
        {
1017
            $this->Status = $status;
1018
1019
            return $this;
1020
        }
1021
1022
        /**
1023
         * Get status.
1024
         *
1025
         * @return \Eccube\Entity\Master\CustomerStatus|null
1026
         */
1027
        public function getStatus()
1028
        {
1029
            return $this->Status;
1030
        }
1031
1032
        /**
1033
         * Set sex.
1034
         *
1035
         * @param \Eccube\Entity\Master\Sex|null $sex
1036
         *
1037
         * @return Customer
1038
         */
1039
        public function setSex(\Eccube\Entity\Master\Sex $sex = null)
1040
        {
1041
            $this->Sex = $sex;
1042
1043
            return $this;
1044
        }
1045
1046
        /**
1047
         * Get sex.
1048
         *
1049
         * @return \Eccube\Entity\Master\Sex|null
1050
         */
1051
        public function getSex()
1052
        {
1053
            return $this->Sex;
1054
        }
1055
1056
        /**
1057
         * Set job.
1058
         *
1059
         * @param \Eccube\Entity\Master\Job|null $job
1060
         *
1061
         * @return Customer
1062
         */
1063
        public function setJob(\Eccube\Entity\Master\Job $job = null)
1064
        {
1065
            $this->Job = $job;
1066
1067
            return $this;
1068
        }
1069
1070
        /**
1071
         * Get job.
1072
         *
1073
         * @return \Eccube\Entity\Master\Job|null
1074
         */
1075
        public function getJob()
1076
        {
1077
            return $this->Job;
1078
        }
1079
1080
        /**
1081
         * Set country.
1082
         *
1083
         * @param \Eccube\Entity\Master\Country|null $country
1084
         *
1085
         * @return Customer
1086
         */
1087
        public function setCountry(\Eccube\Entity\Master\Country $country = null)
1088
        {
1089
            $this->Country = $country;
1090
1091
            return $this;
1092
        }
1093
1094
        /**
1095
         * Get country.
1096
         *
1097
         * @return \Eccube\Entity\Master\Country|null
1098
         */
1099
        public function getCountry()
1100
        {
1101
            return $this->Country;
1102
        }
1103
1104
        /**
1105
         * Set pref.
1106
         *
1107
         * @param \Eccube\Entity\Master\Pref|null $pref
1108
         *
1109
         * @return Customer
1110
         */
1111
        public function setPref(\Eccube\Entity\Master\Pref $pref = null)
1112
        {
1113
            $this->Pref = $pref;
1114
1115
            return $this;
1116
        }
1117
1118
        /**
1119
         * Get pref.
1120
         *
1121
         * @return \Eccube\Entity\Master\Pref|null
1122
         */
1123
        public function getPref()
1124
        {
1125
            return $this->Pref;
1126
        }
1127
1128
        /**
1129
         * Set point
1130
         *
1131
         * @param string $point
1132
         *
1133
         * @return Customer
1134
         */
1135
        public function setPoint($point)
1136
        {
1137
            $this->point = $point;
1138
1139
            return $this;
1140
        }
1141
1142
        /**
1143
         * Get point
1144
         *
1145
         * @return string
1146
         */
1147
        public function getPoint()
1148
        {
1149
            return $this->point;
1150
        }
1151
    }
1152
}
1153