X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2Forg%2Fmxchange%2Fjcontacts%2Fcontact%2FContact.java;h=0832aedf3b6589e21c960c902cc03e015d6b4705;hb=03209c3c702f981ee2d04685037b9574da905829;hp=6c1f583c22594b4fbc8e228afdc8caf0499f0532;hpb=a4a43cf6db10c0552a783a9899a2824c1657d0b8;p=jcontacts-core.git diff --git a/src/org/mxchange/jcontacts/contact/Contact.java b/src/org/mxchange/jcontacts/contact/Contact.java index 6c1f583..0832aed 100644 --- a/src/org/mxchange/jcontacts/contact/Contact.java +++ b/src/org/mxchange/jcontacts/contact/Contact.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015 Roland Haeder + * Copyright (C) 2016 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 @@ -20,9 +20,13 @@ import java.io.Serializable; import java.util.Calendar; import java.util.Date; import org.mxchange.jcontacts.contact.gender.Gender; +import org.mxchange.jcountry.data.Country; +import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber; +import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber; +import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber; /** - * A general contact interface + * A general contact POJI *

* @author Roland Haeder */ @@ -33,271 +37,284 @@ public interface Contact extends Serializable { *

* @param contact Source instance */ - public void copyAll (final Contact contact); + void copyAll (final Contact contact); /** * Birth day *

* @return the birthday */ - public Date getBirthday (); + Date getContactBirthday (); /** * Birth day *

* @param birthday the birthday to set */ - public void setBirthday (final Date birthday); + void setContactBirthday (final Date birthday); /** - * Cellphone number + * Getter for cellphone number *

- * @return the cellphoneNumber + * @return Cellphone number */ - public String getCellphoneNumber (); + DialableCellphoneNumber getContactCellphoneNumber (); /** - * Cellphone number + * Setter for cellphone number *

- * @param cellphoneNumber the cellphoneNumber to set + * @param cellphoneNumber Cellphone number */ - public void setCellphoneNumber (final String cellphoneNumber); + void setContactCellphoneNumber (final DialableCellphoneNumber cellphoneNumber); /** * City *

* @return the city */ - public String getCity (); + String getContactCity (); /** * City *

* @param city the city to set */ - public void setCity (final String city); + void setContactCity (final String city); /** * Comments *

* @return the comment */ - public String getComment (); + String getContactComment (); /** * Comments *

* @param comment the comment to set */ - public void setComment (final String comment); - - /** - * Company name - *

- * @return the companyName - */ - public String getCompanyName (); - - /** - * Company name - *

- * @param companyName the companyName to set - */ - public void setCompanyName (final String companyName); + void setContactComment (final String comment); /** * Id number *

* @return the contactId */ - public Long getContactId (); + Long getContactId (); /** * Id number *

* @param id the contactId to set */ - public void setContactId (final Long id); + void setContactId (final Long id); /** * Country code *

* @return the countryCode */ - public String getCountryCode (); + Country getContactCountry (); /** * Country code *

- * @param countryCode the countryCode to set + * @param contactCountry the countryCode to set */ - public void setCountryCode (final String countryCode); + void setContactCountry (final Country contactCountry); /** * Getter for "created" timestamp *

* @return "created" timestamp */ - public Calendar getCreated (); + Calendar getContactCreated (); /** * Setter for "created" timestamp *

* @param created "created" timestamp */ - public void setCreated (final Calendar created); + void setContactCreated (final Calendar created); /** * Email address *

* @return the emailAddress */ - public String getEmailAddress (); + String getContactEmailAddress (); /** * Email address *

* @param emailAddress the emailAddress to set */ - public void setEmailAddress (final String emailAddress); + void setContactEmailAddress (final String emailAddress); /** * Family name *

* @return the familyName */ - public String getFamilyName (); + String getContactFamilyName (); /** * Family name *

* @param familyName the familyName to set */ - public void setFamilyName (final String familyName); + void setContactFamilyName (final String familyName); /** * Fax number *

* @return the faxNumber */ - public String getFaxNumber (); + DialableFaxNumber getContactFaxNumber (); /** * Fax number *

* @param faxNumber the faxNumber to set */ - public void setFaxNumber (final String faxNumber); + void setContactFaxNumber (final DialableFaxNumber faxNumber); /** * First name *

* @return the first name */ - public String getFirstName (); + String getContactFirstName (); /** * First name *

* @param firstName the first name to set */ - public void setFirstName (final String firstName); + void setContactFirstName (final String firstName); /** * Gender of the contact *

* @return the gender */ - public Gender getGender (); + Gender getContactGender (); /** * Gender of the contact *

* @param gender the gender to set */ - public void setGender (final Gender gender); + void setContactGender (final Gender gender); /** * House number *

* @return the houseNumber */ - public Short getHouseNumber (); + Short getContactHouseNumber (); /** * House number *

* @param houseNumber the houseNumber to set */ - public void setHouseNumber (final Short houseNumber); + void setContactHouseNumber (final Short houseNumber); /** * Setter for own contact *

* @param ownContact Own contact */ - public void setOwnContact (final Boolean ownContact); + void setContactOwnContact (final Boolean ownContact); /** - * Phone number + * Getter for phone number *

- * @return the phoneNumber + * @return Phone number */ - public String getPhoneNumber (); + DialableLandLineNumber getContactLandLineNumber (); /** - * Phone number + * Setter for phone number *

- * @param phoneNumber the phoneNumber to set + * @param phoneNumber Phone number */ - public void setPhoneNumber (final String phoneNumber); + void setContactLandLineNumber (final DialableLandLineNumber phoneNumber); /** * Street *

* @return the street */ - public String getStreet (); + String getContactStreet (); /** * Street *

* @param street the street to set */ - public void setStreet (final String street); + void setContactStreet (final String street); + + /** + * Getter for contact's title + *

+ * @return Contact's title + */ + String getContactTitle (); + + /** + * Setter for contact's title + *

+ * @param contactTitle Contact's title + */ + void setContactTitle (final String contactTitle); /** * Getter for "updated" timestamp *

* @return "updated" timestamp */ - public Calendar getUpdated (); + Calendar getContactUpdated (); /** * Getter for "updated" timestamp *

* @param updated "updated" timestamp */ - public void setUpdated (final Calendar updated); + void setContactUpdated (final Calendar updated); /** * ZIP code *

* @return the zipCode */ - public Long getZipCode (); + Integer getContactZipCode (); /** * ZIP code *

* @param zipCode the zipCode to set */ - public void setZipCode (final Long zipCode); + void setContactZipCode (final Integer zipCode); /** * Checks whether the contact is user's own data *

* @return Own data? */ - public Boolean isOwnContact (); + Boolean isOwnContact (); + + /** + * Check if contacts are same or throw an exception + *

+ * @param object Other possible contact class + *

+ * @return Whether both contacts are same + */ + @Override + boolean equals (final Object object); + + @Override + int hashCode (); }