*/
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;
* @author Roland Haeder
* @version 0.0
*/
-public abstract class BaseContact extends BaseFrameworkSystem implements Contact, Comparable<Contact> {
+public abstract class BaseContact implements Contact, Comparable<Contact> {
/**
* Serial number
*/
*/
@Override
public void setFamilyName (final String familyName) {
- /* NOISY-DEBUG: */ this.getLogger().trace(MessageFormat.format("familyName={0} - CALLED!", familyName)); //NOI18N
this.familyName = familyName;
}
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
*
*/
@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
*/
@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