]> git.mxchange.org Git - jbonuscard-lib.git/blob - Addressbook/src/org/mxchange/addressbook/contact/user/UserContact.java
Introduced Gender enum which replaces the old char
[jbonuscard-lib.git] / Addressbook / src / org / mxchange / addressbook / contact / user / UserContact.java
1 /*
2  * Copyright (C) 2015 Roland Haeder
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  */
17 package org.mxchange.addressbook.contact.user;
18
19 import org.mxchange.addressbook.contact.Contact;
20 import org.mxchange.addressbook.contact.Gender;
21 import org.mxchange.addressbook.contact.book.BookContact;
22 import org.mxchange.addressbook.database.storage.csv.StoreableCsv;
23
24 /**
25  *
26  * @author Roland Haeder
27  * @todo After a Collection has been used in ContactManager, change to
28  * BaseContact
29  */
30 public class UserContact extends BookContact implements Contact, StoreableCsv {
31
32         /**
33          * Creates own contact entry
34          *
35          * @param gender Gender to be set
36          * @param surname Surname to be set
37          * @param familyName Family name to be set
38          * @param companyName Company name
39          * @todo Add validation of data
40          */
41         public UserContact (final Gender gender, final String surname, final String familyName, final String companyName) {
42                 // Make sure all constructors are called
43                 this();
44
45                 // Update all data
46                 this.updateNameData(gender, surname, familyName, companyName);
47         }
48
49         /**
50          * Default constructor, may only be used from database backend
51          */
52         public UserContact () {
53                 this.enableFlagOwnContact();
54         }
55 }