From ac6afb1dee36c9adb0af9ab0bdb5aecfa7e742c5 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Tue, 8 Sep 2015 22:42:47 +0200 Subject: [PATCH] =?utf8?q?Continued:=20-=20removed=20more=20JSP-stuff=20-?= =?utf8?q?=20don't=20extend=20BaseFrameworkSystem=20in=20POJOs=20or=20Fram?= =?utf8?q?eworkInterface=20in=20POJIs=20...=20:-(=20-=20Gender=20is=20now?= =?utf8?q?=20serializable=20Signed-off-by:Roland=20H=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../jcore/model/contact/BaseContact.java | 28 +------------------ .../mxchange/jcore/model/contact/Contact.java | 7 ----- .../jcore/model/contact/gender/Gender.java | 3 +- 3 files changed, 3 insertions(+), 35 deletions(-) diff --git a/src/org/mxchange/jcore/model/contact/BaseContact.java b/src/org/mxchange/jcore/model/contact/BaseContact.java index c293880..999dcd6 100644 --- a/src/org/mxchange/jcore/model/contact/BaseContact.java +++ b/src/org/mxchange/jcore/model/contact/BaseContact.java @@ -16,9 +16,7 @@ */ package org.mxchange.jcore.model.contact; -import java.text.MessageFormat; import java.util.Objects; -import org.mxchange.jcore.BaseFrameworkSystem; import org.mxchange.jcore.client.Client; import org.mxchange.jcore.model.contact.gender.Gender; @@ -28,7 +26,7 @@ import org.mxchange.jcore.model.contact.gender.Gender; * @author Roland Haeder * @version 0.0 */ -public abstract class BaseContact extends BaseFrameworkSystem implements Contact, Comparable { +public abstract class BaseContact implements Contact, Comparable { /** * Serial number */ @@ -331,7 +329,6 @@ public abstract class BaseContact extends BaseFrameworkSystem implements Contact */ @Override public void setFamilyName (final String familyName) { - /* NOISY-DEBUG: */ this.getLogger().trace(MessageFormat.format("familyName={0} - CALLED!", familyName)); //NOI18N this.familyName = familyName; } @@ -455,20 +452,6 @@ public abstract class BaseContact extends BaseFrameworkSystem implements Contact this.street = street; } - /** - * Some "getter" for a translated/human-readable gender - * - * @return gender Human-readable gender - */ - @Override - public String getTranslatedGender () { - // "Translate" it - String translated = this.getMessageStringFromKey(this.getGender().getMessageKey()); - - // Return it - return translated; - } - /** * ZIP code * @@ -518,9 +501,6 @@ public abstract class BaseContact extends BaseFrameworkSystem implements Contact */ @Override public void show (final Client client) { - // Trace message - this.getLogger().trace(MessageFormat.format("client={0} - CALLED!", client)); //NOI18N - // The client must be set if (null == client) { // Not set @@ -553,17 +533,11 @@ public abstract class BaseContact extends BaseFrameworkSystem implements Contact */ @Override public int compareTo (final Contact contact) { - // Trace message - this.getLogger().trace(MessageFormat.format("contact={0} - CALLED!", contact)); //NOI18N - // contact should not be null if (null == contact) { throw new NullPointerException("contact is null"); //NOI18N } - // Debug message - this.getLogger().debug(MessageFormat.format("this.id={0},contact.id={1}", this.getContactId(), contact.getContactId())); //NOI18N - // Is the contactId the same? if (Objects.equals(this.getContactId(), contact.getContactId())) { // Same contactId, means same contact diff --git a/src/org/mxchange/jcore/model/contact/Contact.java b/src/org/mxchange/jcore/model/contact/Contact.java index abc8879..0d290c2 100644 --- a/src/org/mxchange/jcore/model/contact/Contact.java +++ b/src/org/mxchange/jcore/model/contact/Contact.java @@ -26,13 +26,6 @@ import org.mxchange.jcore.model.contact.gender.Gender; * @author Roland Haeder */ public interface Contact extends Serializable { - /** - * Some "getter" for translated gender of the contact - * - * @return Translated / human-readable gender - */ - public String getTranslatedGender (); - /** * Id number * @return the contactId diff --git a/src/org/mxchange/jcore/model/contact/gender/Gender.java b/src/org/mxchange/jcore/model/contact/gender/Gender.java index 6e8faaa..4e1f012 100644 --- a/src/org/mxchange/jcore/model/contact/gender/Gender.java +++ b/src/org/mxchange/jcore/model/contact/gender/Gender.java @@ -16,6 +16,7 @@ */ package org.mxchange.jcore.model.contact.gender; +import java.io.Serializable; import java.text.MessageFormat; /** @@ -23,7 +24,7 @@ import java.text.MessageFormat; * * @author Roland Haeder */ -public enum Gender { +public enum Gender implements Serializable { /** * Unknown enum */ -- 2.39.5