From: Roland Haeder Date: Tue, 8 Sep 2015 20:42:47 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ac6afb1dee36c9adb0af9ab0bdb5aecfa7e742c5;p=jcore.git Continued: - removed more JSP-stuff - don't extend BaseFrameworkSystem in POJOs or FrameworkInterface in POJIs ... :-( - Gender is now serializable Signed-off-by:Roland Häder --- 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 */