From: Roland Haeder Date: Fri, 14 Jul 2017 13:34:45 +0000 (+0200) Subject: Continued a bit: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ee8974344fbb86051d284743401abd64bc76149b;p=jcontacts-core.git Continued a bit: - these fields may be optional, but at least specify personal title, first name, family name and country --- diff --git a/src/org/mxchange/jcontacts/contact/UserContact.java b/src/org/mxchange/jcontacts/contact/UserContact.java index b3e0c0b..a373519 100644 --- a/src/org/mxchange/jcontacts/contact/UserContact.java +++ b/src/org/mxchange/jcontacts/contact/UserContact.java @@ -1,521 +1,517 @@ -/* - * Copyright (C) 2016, 2017 Roland Häder - * - * 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.jcontacts.contact; - -import java.util.Calendar; -import java.util.Date; -import java.util.Objects; -import javax.persistence.Basic; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.EnumType; -import javax.persistence.Enumerated; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Index; -import javax.persistence.JoinColumn; -import javax.persistence.Lob; -import javax.persistence.NamedQueries; -import javax.persistence.NamedQuery; -import javax.persistence.OneToOne; -import javax.persistence.Table; -import javax.persistence.Temporal; -import javax.persistence.TemporalType; -import javax.persistence.Transient; -import org.mxchange.jcontacts.contact.title.PersonalTitle; -import org.mxchange.jcountry.data.Country; -import org.mxchange.jcountry.data.CountryData; -import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber; -import org.mxchange.jphone.phonenumbers.fax.FaxNumber; -import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber; -import org.mxchange.jphone.phonenumbers.landline.LandLineNumber; -import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber; -import org.mxchange.jphone.phonenumbers.mobile.MobileNumber; - -/** - * A general contact class which serves as an entity. - *

- * @author Roland Häder - * @version 0.0 - */ -@Entity (name = "contacts") -@Table ( - name = "contacts", - indexes = { - @Index ( - name = "contact_personal_title", - columnList = "contact_personal_title" - ) - } -) -@NamedQueries ( - { - @NamedQuery (name = "AllContacts", query = "SELECT c FROM contacts AS c ORDER BY c.contactId ASC"), - @NamedQuery (name = "AllContactEmailAddresses", query = "SELECT c.contactEmailAddress FROM contacts AS c ORDER BY c.contactId ASC"), - @NamedQuery (name = "AllContactsByCellphone", query = "SELECT c FROM contacts AS c WHERE c.contactMobileNumber = :mobileNumber ORDER BY c.contactId ASC"), - @NamedQuery (name = "SearchContactById", query = "SELECT c FROM contacts AS c WHERE c.contactId = :contactId"), - @NamedQuery (name = "SearchContactByEmailAddress", query = "SELECT c FROM contacts AS c WHERE LOWER(c.contactEmailAddress) LIKE LOWER(:emailAddress)") - } -) -@SuppressWarnings ("PersistenceUnitPresent") -public class UserContact implements Contact { - - /** - * Serial number - */ - @Transient - private static final long serialVersionUID = 58_744_284_981_863L; - - /** - * Birth day - */ - @Column (name = "contact_birthday") - @Temporal (TemporalType.DATE) - private Date contactBirthday; - - /** - * City - */ - @Basic (optional = false) - @Column (name = "contact_city", nullable = false, length = 100) - private String contactCity; - - /** - * Optional comments - */ - @Lob - @Column (name = "contact_comment") - private String contactComment; - - /** - * Country code - */ - @JoinColumn (name = "contact_country_id", nullable = false, referencedColumnName = "country_id") - @OneToOne (targetEntity = CountryData.class, cascade = CascadeType.REFRESH, optional = false) - private Country contactCountry; - - /** - * When the contact has been created - */ - @Basic (optional = false) - @Temporal (TemporalType.TIMESTAMP) - @Column (name = "contact_created", nullable = false) - private Calendar contactCreated; - - /** - * Email address - */ - @Column (name = "contact_email_address", length = 100, unique = true) - private String contactEmailAddress; - - /** - * Family name - */ - @Basic (optional = false) - @Column (name = "contact_family_name", length = 100, nullable = false) - private String contactFamilyName; - - /** - * Fax number - */ - @JoinColumn (name = "contact_fax_number_id", referencedColumnName = "fax_id", unique = true) - @OneToOne (targetEntity = FaxNumber.class, cascade = CascadeType.ALL) - private DialableFaxNumber contactFaxNumber; - - /** - * First name - */ - @Basic (optional = false) - @Column (name = "contact_first_name", length = 100, nullable = false) - private String contactFirstName; - - /** - * House number - */ - @Basic (optional = false) - @Column (name = "contact_house_number", nullable = false) - private Short contactHouseNumber; - - /** - * House number extension - */ - @Column (name = "contact_house_number_extension", length = 5) - private String contactHouseNumberExtension; - - /** - * Id number - */ - @Id - @GeneratedValue (strategy = GenerationType.IDENTITY) - @Column (name = "contact_id", nullable = false, updatable = false) - private Long contactId; - - /** - * Cellphone number - */ - @JoinColumn (name = "contact_mobile_number_id", referencedColumnName = "mobile_id", unique = true) - @OneToOne (targetEntity = MobileNumber.class, cascade = CascadeType.ALL) - private DialableMobileNumber contactMobileNumber; - - /** - * Flag whether this contact is user's own data - */ - @Basic (optional = false) - @Column (name = "contact_own_contact", nullable = false) - private Boolean contactOwnContact; - - /** - * Contact's personal title (Mr./Mrs.) - */ - @Basic (optional = false) - @Column (name = "contact_personal_title", nullable = false) - @Enumerated (EnumType.STRING) - private PersonalTitle contactPersonalTitle; - - /** - * Phone number - */ - @JoinColumn (name = "contact_landline_number_id", referencedColumnName = "landline_id", unique = true) - @OneToOne (targetEntity = LandLineNumber.class, cascade = CascadeType.ALL) - private DialableLandLineNumber contactPhoneNumber; - - /** - * Street - */ - @Basic (optional = false) - @Column (name = "contact_street", nullable = false) - private String contactStreet; - - /** - * Title (Doctor, etc) - */ - @Column (name = "contact_title") - private String contactTitle; - - /** - * When the contact has been updated - */ - @Temporal (TemporalType.TIMESTAMP) - @Column (name = "contact_updated") - private Calendar contactUpdated; - - /** - * ZIP code - */ - @Basic (optional = false) - @Column (name = "contact_zip_code", nullable = false, length = 6) - private Integer contactZipCode; - - /** - * Default constructor - */ - public UserContact () { - // Default is not user's own contact - this.contactOwnContact = Boolean.FALSE; - } - - /** - * Constructor for title and names - *

- * @param contactTitle Personal title - * @param contactFirstName First name - * @param contactFamilyName Family name - */ - public UserContact (final PersonalTitle contactTitle, final String contactFirstName, final String contactFamilyName) { - // Call default constructor - this(); - - // Set all - this.contactPersonalTitle = contactTitle; - this.contactFirstName = contactFirstName; - this.contactFamilyName = contactFamilyName; - } - - @Override - public boolean equals (final Object object) { - if (this == object) { - return true; - } else if (null == object) { - return false; - } else if (this.getClass() != object.getClass()) { - return false; - } else if (!(object instanceof Contact)) { - // Not correct interface - return false; - } - - final Contact other = (Contact) object; - - if (!Objects.equals(this.getContactId(), other.getContactId())) { - return false; - } else if (!Objects.equals(this.getContactCity(), other.getContactCity())) { - return false; - } else if (!Objects.equals(this.getContactEmailAddress(), other.getContactEmailAddress())) { - return false; - } else if (!Objects.equals(this.getContactFamilyName(), other.getContactFamilyName())) { - return false; - } else if (!Objects.equals(this.getContactFirstName(), other.getContactFirstName())) { - return false; - } else if (!Objects.equals(this.getContactStreet(), other.getContactStreet())) { - return false; - } else if (!Objects.equals(this.getContactTitle(), other.getContactTitle())) { - return false; - } else if (!Objects.equals(this.getContactBirthday(), other.getContactBirthday())) { - return false; - } else if (!Objects.equals(this.getContactCountry(), other.getContactCountry())) { - return false; - } else if (this.getContactPersonalTitle() != other.getContactPersonalTitle()) { - return false; - } else if (!Objects.equals(this.getContactHouseNumber(), other.getContactHouseNumber())) { - return false; - } else if (!Objects.equals(this.getContactHouseNumberExtension(), other.getContactHouseNumberExtension())) { - return false; - } - - return true; - } - - @Override - @SuppressWarnings ("ReturnOfDateField") - public Date getContactBirthday () { - return this.contactBirthday; - } - - @Override - @SuppressWarnings ("AssignmentToDateFieldFromParameter") - public void setContactBirthday (final Date contactBirthday) { - this.contactBirthday = contactBirthday; - } - - @Override - public String getContactCity () { - return this.contactCity; - } - - @Override - public void setContactCity (final String contactCity) { - this.contactCity = contactCity; - } - - @Override - public String getContactComment () { - return this.contactComment; - } - - @Override - public void setContactComment (final String contactComment) { - this.contactComment = contactComment; - } - - @Override - public Country getContactCountry () { - return this.contactCountry; - } - - @Override - public void setContactCountry (final Country contactCountry) { - this.contactCountry = contactCountry; - } - - @Override - @SuppressWarnings ("ReturnOfDateField") - public Calendar getContactCreated () { - return this.contactCreated; - } - - @Override - @SuppressWarnings ("AssignmentToDateFieldFromParameter") - public void setContactCreated (final Calendar contactCreated) { - this.contactCreated = contactCreated; - } - - @Override - public String getContactEmailAddress () { - return this.contactEmailAddress; - } - - @Override - public void setContactEmailAddress (final String contactEmailAddress) { - this.contactEmailAddress = contactEmailAddress; - } - - @Override - public String getContactFamilyName () { - //* NOISY-DEBUG: */ this.getLogger().logTrace("CALLED!"); - return this.contactFamilyName; - } - - @Override - public void setContactFamilyName (final String contactFamilyName) { - this.contactFamilyName = contactFamilyName; - } - - @Override - public DialableFaxNumber getContactFaxNumber () { - return this.contactFaxNumber; - } - - @Override - public void setContactFaxNumber (final DialableFaxNumber contactFaxNumber) { - this.contactFaxNumber = contactFaxNumber; - } - - @Override - public String getContactFirstName () { - return this.contactFirstName; - } - - @Override - public void setContactFirstName (final String contactFirstName) { - this.contactFirstName = contactFirstName; - } - - @Override - public Short getContactHouseNumber () { - return this.contactHouseNumber; - } - - @Override - public void setContactHouseNumber (final Short contactHouseNumber) { - this.contactHouseNumber = contactHouseNumber; - } - - @Override - public String getContactHouseNumberExtension () { - return this.contactHouseNumberExtension; - } - - @Override - public void setContactHouseNumberExtension (final String contactHouseNumberExtension) { - this.contactHouseNumberExtension = contactHouseNumberExtension; - } - - @Override - public Long getContactId () { - return this.contactId; - } - - @Override - public void setContactId (final Long contactId) { - this.contactId = contactId; - } - - @Override - public DialableLandLineNumber getContactLandLineNumber () { - return this.contactPhoneNumber; - } - - @Override - public void setContactLandLineNumber (final DialableLandLineNumber contactPhoneNumber) { - this.contactPhoneNumber = contactPhoneNumber; - } - - @Override - public DialableMobileNumber getContactMobileNumber () { - return this.contactMobileNumber; - } - - @Override - public void setContactMobileNumber (final DialableMobileNumber contactMobileNumber) { - this.contactMobileNumber = contactMobileNumber; - } - - @Override - public void setContactOwnContact (final Boolean contactOwnContact) { - this.contactOwnContact = contactOwnContact; - } - - @Override - public PersonalTitle getContactPersonalTitle () { - return this.contactPersonalTitle; - } - - @Override - public void setContactPersonalTitle (final PersonalTitle contactPersonalTitle) { - this.contactPersonalTitle = contactPersonalTitle; - } - - @Override - public String getContactStreet () { - return this.contactStreet; - } - - @Override - public void setContactStreet (final String contactStreet) { - this.contactStreet = contactStreet; - } - - @Override - public String getContactTitle () { - return this.contactTitle; - } - - @Override - public void setContactTitle (final String contactTitle) { - this.contactTitle = contactTitle; - } - - @Override - @SuppressWarnings ("ReturnOfDateField") - public Calendar getContactUpdated () { - return this.contactUpdated; - } - - @Override - @SuppressWarnings ("AssignmentToDateFieldFromParameter") - public void setContactUpdated (final Calendar contactUpdated) { - this.contactUpdated = contactUpdated; - } - - @Override - public Integer getContactZipCode () { - return this.contactZipCode; - } - - @Override - public void setContactZipCode (final Integer contactZipCode) { - this.contactZipCode = contactZipCode; - } - - @Override - public int hashCode () { - int hash = 5; - - hash = 29 * hash + Objects.hashCode(this.getContactBirthday()); - hash = 29 * hash + Objects.hashCode(this.getContactCity()); - hash = 29 * hash + Objects.hashCode(this.getContactCountry()); - hash = 29 * hash + Objects.hashCode(this.getContactEmailAddress()); - hash = 29 * hash + Objects.hashCode(this.getContactFamilyName()); - hash = 29 * hash + Objects.hashCode(this.getContactFirstName()); - hash = 29 * hash + Objects.hashCode(this.getContactPersonalTitle()); - hash = 29 * hash + Objects.hashCode(this.getContactHouseNumber()); - hash = 29 * hash + Objects.hashCode(this.getContactHouseNumberExtension()); - hash = 29 * hash + Objects.hashCode(this.getContactId()); - hash = 29 * hash + Objects.hashCode(this.getContactStreet()); - hash = 29 * hash + Objects.hashCode(this.getContactTitle()); - - return hash; - } - - @Override - public Boolean isOwnContact () { - return this.contactOwnContact; - } - -} +/* + * Copyright (C) 2016, 2017 Roland Häder + * + * 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.jcontacts.contact; + +import java.util.Calendar; +import java.util.Date; +import java.util.Objects; +import javax.persistence.Basic; +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Index; +import javax.persistence.JoinColumn; +import javax.persistence.Lob; +import javax.persistence.NamedQueries; +import javax.persistence.NamedQuery; +import javax.persistence.OneToOne; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import javax.persistence.Transient; +import org.mxchange.jcontacts.contact.title.PersonalTitle; +import org.mxchange.jcountry.data.Country; +import org.mxchange.jcountry.data.CountryData; +import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber; +import org.mxchange.jphone.phonenumbers.fax.FaxNumber; +import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber; +import org.mxchange.jphone.phonenumbers.landline.LandLineNumber; +import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber; +import org.mxchange.jphone.phonenumbers.mobile.MobileNumber; + +/** + * A general contact class which serves as an entity. + *

+ * @author Roland Häder + * @version 0.0 + */ +@Entity (name = "contacts") +@Table ( + name = "contacts", + indexes = { + @Index ( + name = "contact_personal_title", + columnList = "contact_personal_title" + ) + } +) +@NamedQueries ( + { + @NamedQuery (name = "AllContacts", query = "SELECT c FROM contacts AS c ORDER BY c.contactId ASC"), + @NamedQuery (name = "AllContactEmailAddresses", query = "SELECT c.contactEmailAddress FROM contacts AS c ORDER BY c.contactId ASC"), + @NamedQuery (name = "AllContactsByCellphone", query = "SELECT c FROM contacts AS c WHERE c.contactMobileNumber = :mobileNumber ORDER BY c.contactId ASC"), + @NamedQuery (name = "SearchContactById", query = "SELECT c FROM contacts AS c WHERE c.contactId = :contactId"), + @NamedQuery (name = "SearchContactByEmailAddress", query = "SELECT c FROM contacts AS c WHERE LOWER(c.contactEmailAddress) LIKE LOWER(:emailAddress)") + } +) +@SuppressWarnings ("PersistenceUnitPresent") +public class UserContact implements Contact { + + /** + * Serial number + */ + @Transient + private static final long serialVersionUID = 58_744_284_981_863L; + + /** + * Birth day + */ + @Column (name = "contact_birthday") + @Temporal (TemporalType.DATE) + private Date contactBirthday; + + /** + * City + */ + @Column (name = "contact_city", length = 100) + private String contactCity; + + /** + * Optional comments + */ + @Lob + @Column (name = "contact_comment") + private String contactComment; + + /** + * Country code + */ + @JoinColumn (name = "contact_country_id", nullable = false, referencedColumnName = "country_id") + @OneToOne (targetEntity = CountryData.class, cascade = CascadeType.REFRESH, optional = false) + private Country contactCountry; + + /** + * When the contact has been created + */ + @Basic (optional = false) + @Temporal (TemporalType.TIMESTAMP) + @Column (name = "contact_created", nullable = false) + private Calendar contactCreated; + + /** + * Email address + */ + @Column (name = "contact_email_address", length = 100, unique = true) + private String contactEmailAddress; + + /** + * Family name + */ + @Basic (optional = false) + @Column (name = "contact_family_name", length = 100, nullable = false) + private String contactFamilyName; + + /** + * Fax number + */ + @JoinColumn (name = "contact_fax_number_id", referencedColumnName = "fax_id", unique = true) + @OneToOne (targetEntity = FaxNumber.class, cascade = CascadeType.ALL) + private DialableFaxNumber contactFaxNumber; + + /** + * First name + */ + @Basic (optional = false) + @Column (name = "contact_first_name", length = 100, nullable = false) + private String contactFirstName; + + /** + * House number + */ + @Column (name = "contact_house_number") + private Short contactHouseNumber; + + /** + * House number extension + */ + @Column (name = "contact_house_number_extension", length = 5) + private String contactHouseNumberExtension; + + /** + * Id number + */ + @Id + @GeneratedValue (strategy = GenerationType.IDENTITY) + @Column (name = "contact_id", nullable = false, updatable = false) + private Long contactId; + + /** + * Cellphone number + */ + @JoinColumn (name = "contact_mobile_number_id", referencedColumnName = "mobile_id", unique = true) + @OneToOne (targetEntity = MobileNumber.class, cascade = CascadeType.ALL) + private DialableMobileNumber contactMobileNumber; + + /** + * Flag whether this contact is user's own data + */ + @Basic (optional = false) + @Column (name = "contact_own_contact", nullable = false) + private Boolean contactOwnContact; + + /** + * Contact's personal title (Mr./Mrs.) + */ + @Basic (optional = false) + @Column (name = "contact_personal_title", nullable = false) + @Enumerated (EnumType.STRING) + private PersonalTitle contactPersonalTitle; + + /** + * Phone number + */ + @JoinColumn (name = "contact_landline_number_id", referencedColumnName = "landline_id", unique = true) + @OneToOne (targetEntity = LandLineNumber.class, cascade = CascadeType.ALL) + private DialableLandLineNumber contactPhoneNumber; + + /** + * Street + */ + @Column (name = "contact_street") + private String contactStreet; + + /** + * Title (Doctor, etc) + */ + @Column (name = "contact_title") + private String contactTitle; + + /** + * When the contact has been updated + */ + @Temporal (TemporalType.TIMESTAMP) + @Column (name = "contact_updated") + private Calendar contactUpdated; + + /** + * ZIP code + */ + @Column (name = "contact_zip_code") + private Integer contactZipCode; + + /** + * Default constructor + */ + public UserContact () { + // Default is not user's own contact + this.contactOwnContact = Boolean.FALSE; + } + + /** + * Constructor for title and names + *

+ * @param contactTitle Personal title + * @param contactFirstName First name + * @param contactFamilyName Family name + */ + public UserContact (final PersonalTitle contactTitle, final String contactFirstName, final String contactFamilyName) { + // Call default constructor + this(); + + // Set all + this.contactPersonalTitle = contactTitle; + this.contactFirstName = contactFirstName; + this.contactFamilyName = contactFamilyName; + } + + @Override + public boolean equals (final Object object) { + if (this == object) { + return true; + } else if (null == object) { + return false; + } else if (this.getClass() != object.getClass()) { + return false; + } else if (!(object instanceof Contact)) { + // Not correct interface + return false; + } + + final Contact other = (Contact) object; + + if (!Objects.equals(this.getContactId(), other.getContactId())) { + return false; + } else if (!Objects.equals(this.getContactCity(), other.getContactCity())) { + return false; + } else if (!Objects.equals(this.getContactEmailAddress(), other.getContactEmailAddress())) { + return false; + } else if (!Objects.equals(this.getContactFamilyName(), other.getContactFamilyName())) { + return false; + } else if (!Objects.equals(this.getContactFirstName(), other.getContactFirstName())) { + return false; + } else if (!Objects.equals(this.getContactStreet(), other.getContactStreet())) { + return false; + } else if (!Objects.equals(this.getContactTitle(), other.getContactTitle())) { + return false; + } else if (!Objects.equals(this.getContactBirthday(), other.getContactBirthday())) { + return false; + } else if (!Objects.equals(this.getContactCountry(), other.getContactCountry())) { + return false; + } else if (this.getContactPersonalTitle() != other.getContactPersonalTitle()) { + return false; + } else if (!Objects.equals(this.getContactHouseNumber(), other.getContactHouseNumber())) { + return false; + } else if (!Objects.equals(this.getContactHouseNumberExtension(), other.getContactHouseNumberExtension())) { + return false; + } + + return true; + } + + @Override + @SuppressWarnings ("ReturnOfDateField") + public Date getContactBirthday () { + return this.contactBirthday; + } + + @Override + @SuppressWarnings ("AssignmentToDateFieldFromParameter") + public void setContactBirthday (final Date contactBirthday) { + this.contactBirthday = contactBirthday; + } + + @Override + public String getContactCity () { + return this.contactCity; + } + + @Override + public void setContactCity (final String contactCity) { + this.contactCity = contactCity; + } + + @Override + public String getContactComment () { + return this.contactComment; + } + + @Override + public void setContactComment (final String contactComment) { + this.contactComment = contactComment; + } + + @Override + public Country getContactCountry () { + return this.contactCountry; + } + + @Override + public void setContactCountry (final Country contactCountry) { + this.contactCountry = contactCountry; + } + + @Override + @SuppressWarnings ("ReturnOfDateField") + public Calendar getContactCreated () { + return this.contactCreated; + } + + @Override + @SuppressWarnings ("AssignmentToDateFieldFromParameter") + public void setContactCreated (final Calendar contactCreated) { + this.contactCreated = contactCreated; + } + + @Override + public String getContactEmailAddress () { + return this.contactEmailAddress; + } + + @Override + public void setContactEmailAddress (final String contactEmailAddress) { + this.contactEmailAddress = contactEmailAddress; + } + + @Override + public String getContactFamilyName () { + //* NOISY-DEBUG: */ this.getLogger().logTrace("CALLED!"); + return this.contactFamilyName; + } + + @Override + public void setContactFamilyName (final String contactFamilyName) { + this.contactFamilyName = contactFamilyName; + } + + @Override + public DialableFaxNumber getContactFaxNumber () { + return this.contactFaxNumber; + } + + @Override + public void setContactFaxNumber (final DialableFaxNumber contactFaxNumber) { + this.contactFaxNumber = contactFaxNumber; + } + + @Override + public String getContactFirstName () { + return this.contactFirstName; + } + + @Override + public void setContactFirstName (final String contactFirstName) { + this.contactFirstName = contactFirstName; + } + + @Override + public Short getContactHouseNumber () { + return this.contactHouseNumber; + } + + @Override + public void setContactHouseNumber (final Short contactHouseNumber) { + this.contactHouseNumber = contactHouseNumber; + } + + @Override + public String getContactHouseNumberExtension () { + return this.contactHouseNumberExtension; + } + + @Override + public void setContactHouseNumberExtension (final String contactHouseNumberExtension) { + this.contactHouseNumberExtension = contactHouseNumberExtension; + } + + @Override + public Long getContactId () { + return this.contactId; + } + + @Override + public void setContactId (final Long contactId) { + this.contactId = contactId; + } + + @Override + public DialableLandLineNumber getContactLandLineNumber () { + return this.contactPhoneNumber; + } + + @Override + public void setContactLandLineNumber (final DialableLandLineNumber contactPhoneNumber) { + this.contactPhoneNumber = contactPhoneNumber; + } + + @Override + public DialableMobileNumber getContactMobileNumber () { + return this.contactMobileNumber; + } + + @Override + public void setContactMobileNumber (final DialableMobileNumber contactMobileNumber) { + this.contactMobileNumber = contactMobileNumber; + } + + @Override + public void setContactOwnContact (final Boolean contactOwnContact) { + this.contactOwnContact = contactOwnContact; + } + + @Override + public PersonalTitle getContactPersonalTitle () { + return this.contactPersonalTitle; + } + + @Override + public void setContactPersonalTitle (final PersonalTitle contactPersonalTitle) { + this.contactPersonalTitle = contactPersonalTitle; + } + + @Override + public String getContactStreet () { + return this.contactStreet; + } + + @Override + public void setContactStreet (final String contactStreet) { + this.contactStreet = contactStreet; + } + + @Override + public String getContactTitle () { + return this.contactTitle; + } + + @Override + public void setContactTitle (final String contactTitle) { + this.contactTitle = contactTitle; + } + + @Override + @SuppressWarnings ("ReturnOfDateField") + public Calendar getContactUpdated () { + return this.contactUpdated; + } + + @Override + @SuppressWarnings ("AssignmentToDateFieldFromParameter") + public void setContactUpdated (final Calendar contactUpdated) { + this.contactUpdated = contactUpdated; + } + + @Override + public Integer getContactZipCode () { + return this.contactZipCode; + } + + @Override + public void setContactZipCode (final Integer contactZipCode) { + this.contactZipCode = contactZipCode; + } + + @Override + public int hashCode () { + int hash = 5; + + hash = 29 * hash + Objects.hashCode(this.getContactBirthday()); + hash = 29 * hash + Objects.hashCode(this.getContactCity()); + hash = 29 * hash + Objects.hashCode(this.getContactCountry()); + hash = 29 * hash + Objects.hashCode(this.getContactEmailAddress()); + hash = 29 * hash + Objects.hashCode(this.getContactFamilyName()); + hash = 29 * hash + Objects.hashCode(this.getContactFirstName()); + hash = 29 * hash + Objects.hashCode(this.getContactPersonalTitle()); + hash = 29 * hash + Objects.hashCode(this.getContactHouseNumber()); + hash = 29 * hash + Objects.hashCode(this.getContactHouseNumberExtension()); + hash = 29 * hash + Objects.hashCode(this.getContactId()); + hash = 29 * hash + Objects.hashCode(this.getContactStreet()); + hash = 29 * hash + Objects.hashCode(this.getContactTitle()); + + return hash; + } + + @Override + public Boolean isOwnContact () { + return this.contactOwnContact; + } + +}