2 * Copyright (C) 2015 Roland Haeder
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.
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.
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/>.
17 package org.mxchange.addressbook.model.contact.user;
19 import java.text.MessageFormat;
20 import org.mxchange.addressbook.model.contact.book.BookContact;
21 import org.mxchange.jcore.contact.Contact;
22 import org.mxchange.jcore.contact.gender.Gender;
26 * @author Roland Haeder
27 * TODO After a Collection has been used in ContactManager, change to
30 public class UserContact extends BookContact implements Contact {
33 * Creates own contact entry
35 * @param gender Gender to be set
36 * @param firstName First name to be set
37 * @param familyName Family name to be set
38 * @param companyName Company name
39 * TODO Add validation of data
41 public UserContact (final Gender gender, final String firstName, final String familyName, final String companyName) {
42 // Make sure all constructors are called
46 this.getLogger().trace(MessageFormat.format("gender={0},firstName={1},familyName={2},companyName={3} - CALLED!", gender, firstName, familyName, companyName)); //NOI18N
49 this.setGender(gender);
50 this.setFirstName(firstName);
51 this.setFamilyName(familyName);
52 this.setCompanyName(companyName);
55 this.getLogger().trace("EXIT!"); //NOI18N
59 * Default constructor, may only be used from database backend
61 public UserContact () {
62 this.enableFlagOwnContact();