X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=Addressbook%2Fsrc%2Forg%2Fmxchange%2Faddressbook%2Fcontact%2Fuser%2FUserContact.java;h=1ca7f8968a6595300050437ad2d77d0c4e648dad;hb=a67280d037eb9f783695157780cbbc676e84b26f;hp=b86e2d9edaf947c324cd615105b2d34c5d65c1a2;hpb=c3a6502c11c40b41c5c20988dd7344526d583b14;p=addressbook-lib.git
diff --git a/Addressbook/src/org/mxchange/addressbook/contact/user/UserContact.java b/Addressbook/src/org/mxchange/addressbook/contact/user/UserContact.java
index b86e2d9..1ca7f89 100644
--- a/Addressbook/src/org/mxchange/addressbook/contact/user/UserContact.java
+++ b/Addressbook/src/org/mxchange/addressbook/contact/user/UserContact.java
@@ -1,52 +1,64 @@
-/*
- * Copyright (C) 2015 Roland Haeder
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package org.mxchange.addressbook.contact.user;
-
-import org.mxchange.addressbook.contact.Contact;
-import org.mxchange.addressbook.contact.book.BookContact;
-
-/**
- *
- * @author Roland Haeder
- * @todo After a Collection has been used in ContactManager, change to BaseContact
- */
-public class UserContact extends BookContact implements Contact {
-
- /**
- * Creates own contact entry
- *
- * @param gender Gender to be set
- * @param surname Surname to be set
- * @param familyName Family name to be set
- * @todo Add validation of data
- */
- public UserContact (final char gender, final String surname, final String familyName) {
- // Make sure all constructors are called
- this();
-
- this.setGender(gender);
- this.setSurname(surname);
- this.setFamilyName(familyName);
- }
-
- /**
- * No empty instances can be created of this class
- */
- protected UserContact () {
- super();
- }
-}
+/*
+ * Copyright (C) 2015 Roland Haeder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package org.mxchange.addressbook.contact.user;
+
+import java.text.MessageFormat;
+import org.mxchange.addressbook.contact.book.BookContact;
+import org.mxchange.jcore.contact.Contact;
+import org.mxchange.jcore.contact.Gender;
+
+/**
+ *
+ * @author Roland Haeder
+ * @todo After a Collection has been used in ContactManager, change to
+ * BaseContact
+ */
+public class UserContact extends BookContact implements Contact {
+
+ /**
+ * Creates own contact entry
+ *
+ * @param gender Gender to be set
+ * @param surname Surname to be set
+ * @param familyName Family name to be set
+ * @param companyName Company name
+ * @todo Add validation of data
+ */
+ public UserContact (final Gender gender, final String surname, final String familyName, final String companyName) {
+ // Make sure all constructors are called
+ this();
+
+ // Trace message
+ this.getLogger().trace(MessageFormat.format("gender={0},surname={1},familyName={2},companyName={3} - CALLED!", gender, surname, familyName, companyName)); //NOI18N
+
+ // Update all data
+ this.setGender(gender);
+ this.setSurname(surname);
+ this.setFamilyName(familyName);
+ this.setCompanyName(companyName);
+
+ // Trace message
+ this.getLogger().trace("EXIT!"); //NOI18N
+ }
+
+ /**
+ * Default constructor, may only be used from database backend
+ */
+ public UserContact () {
+ this.enableFlagOwnContact();
+ }
+}