]> git.mxchange.org Git - jcore.git/blobdiff - src/org/mxchange/jcore/contact/Contact.java
Merge branch 'master' of /media/quix0r/stick/Java Project/jcore
[jcore.git] / src / org / mxchange / jcore / contact / Contact.java
index ba1ddd65e24f6bd75b30ec05bfbf7493f2b04bc4..cf78950760b0a2a312e01dc24fc14fd8381e92a6 100644 (file)
  */
 package org.mxchange.jcore.contact;
 
-import org.mxchange.jcore.FrameworkInterface;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.util.Iterator;
+import java.util.Map;
 import org.mxchange.jcore.client.Client;
+import org.mxchange.jcore.database.storage.Storeable;
 
 /**
+ * A general contact interface
  *
  * @author Roland Haeder
  */
-public interface Contact extends FrameworkInterface {
+public interface Contact extends Storeable {
+       /**
+        * Returns an iterator of all values from this object
+        *
+        * @return An iterator
+        * @throws java.lang.NoSuchMethodException If the invoked method was not found
+        * @throws java.lang.IllegalAccessException If the method cannot be accessed
+        * @throws java.lang.reflect.InvocationTargetException Any other problems?
+        */
+       public Iterator<Map.Entry<Field, Object>> iterator ()throws NoSuchMethodException, IllegalAccessException, InvocationTargetException;
 
        /**
         * Some "getter" for translated gender of the contact
@@ -33,25 +47,32 @@ public interface Contact extends FrameworkInterface {
        public String getTranslatedGender ();
 
        /**
-        * Checks whether the contact is user's own data
+        * Gender of the contact
         *
-        * @return Own data?
+        * @return the gender
         */
-       public boolean isOwnContact ();
+       public Gender getGender ();
 
        /**
         * Gender of the contact
         *
-        * @return the gender
+        * @param gender the gender to set
         */
-       public Gender getGender ();
+       public void setGender (final Gender gender);
 
        /**
-        * Surname
+        * First name
         *
-        * @return the surname
+        * @return the first name
         */
-       public String getSurname ();
+       public String getFirstName ();
+
+       /**
+        * First name
+        *
+        * @param firstName the first name to set
+        */
+       public void setFirstName (final String firstName);
 
        /**
         * Family name
@@ -60,6 +81,13 @@ public interface Contact extends FrameworkInterface {
         */
        public String getFamilyName ();
 
+       /**
+        * Family name
+        *
+        * @param familyName the familyName to set
+        */
+       public void setFamilyName (final String familyName);
+
        /**
         * Companyname
         *
@@ -67,6 +95,13 @@ public interface Contact extends FrameworkInterface {
         */
        public String getCompanyName ();
 
+       /**
+        * Companyname
+        *
+        * @param companyName the companyName to set
+        */
+       public void setCompanyName (final String companyName);
+
        /**
         * Street
         *
@@ -74,19 +109,40 @@ public interface Contact extends FrameworkInterface {
         */
        public String getStreet ();
 
+       /**
+        * Street
+        *
+        * @param street the street to set
+        */
+       public void setStreet (final String street);
+
        /**
         * House number
         *
         * @return the houseNumber
         */
-       public int getHouseNumber ();
+       public Long getHouseNumber ();
+
+       /**
+        * House number
+        *
+        * @param houseNumber the houseNumber to set
+        */
+       public void setHouseNumber (final Long houseNumber);
 
        /**
         * ZIP code
         *
         * @return the zipCode
         */
-       public long getZipCode ();
+       public Long getZipCode ();
+
+       /**
+        * ZIP code
+        *
+        * @param zipCode the zipCode to set
+        */
+       public void setZipCode (final Long zipCode);
 
        /**
         * City
@@ -95,6 +151,13 @@ public interface Contact extends FrameworkInterface {
         */
        public String getCity ();
 
+       /**
+        * City
+        *
+        * @param city the city to set
+        */
+       public void setCity (final String city);
+
        /**
         * Country code
         *
@@ -102,6 +165,13 @@ public interface Contact extends FrameworkInterface {
         */
        public String getCountryCode ();
 
+       /**
+        * Country code
+        *
+        * @param countryCode the countryCode to set
+        */
+       public void setCountryCode (final String countryCode);
+
        /**
         * Email address
         *
@@ -109,6 +179,13 @@ public interface Contact extends FrameworkInterface {
         */
        public String getEmailAddress ();
 
+       /**
+        * Email address
+        *
+        * @param emailAddress the emailAddress to set
+        */
+       public void setEmailAddress (final String emailAddress);
+
        /**
         * Phone number
         *
@@ -116,6 +193,13 @@ public interface Contact extends FrameworkInterface {
         */
        public String getPhoneNumber ();
 
+       /**
+        * Phone number
+        *
+        * @param phoneNumber the phoneNumber to set
+        */
+       public void setPhoneNumber (final String phoneNumber);
+
        /**
         * Fax number
         *
@@ -123,6 +207,13 @@ public interface Contact extends FrameworkInterface {
         */
        public String getFaxNumber ();
 
+       /**
+        * Fax number
+        *
+        * @param faxNumber the faxNumber to set
+        */
+       public void setFaxNumber (final String faxNumber);
+
        /**
         * Cellphone number
         *
@@ -131,64 +222,51 @@ public interface Contact extends FrameworkInterface {
        public String getCellphoneNumber ();
 
        /**
-        * Birth day
+        * Cellphone number
         *
-        * @return the birthday
+        * @param cellphoneNumber the cellphoneNumber to set
         */
-       public String getBirthday ();
+       public void setCellphoneNumber (final String cellphoneNumber);
 
        /**
-        * Comments
+        * Birth day
         *
-        * @return the comment
+        * @return the birthday
         */
-       public String getComment ();
+       public String getBirthday ();
 
        /**
-        * Checks if given boolean value is available and set to same value
+        * Birth day
         *
-        * @param columnName Column name to check
-        * @param bool Boolean value
-        * @return Whether all conditions are met
+        * @param birthday the birthday to set
         */
-       public boolean isValueEqual (final String columnName, final boolean bool);
+       public void setBirthday (final String birthday);
 
        /**
-        * Shows the contact to the user
+        * Comments
         *
-        * @param client Client instance to call back
+        * @return the comment
         */
-       public void show (final Client client);
+       public String getComment ();
 
        /**
-        * Updates address data in this Contact instance
+        * Comments
         *
-        * @param street Street
-        * @param zipCode ZIP code
-        * @param city City
-        * @param countryCode Country code
+        * @param comment the comment to set
         */
-       public void updateAddressData (final String street, final long zipCode, final String city, final String countryCode);
+       public void setComment (final String comment);
 
        /**
-        * Updates name data in this Contact instance
+        * Checks whether the contact is user's own data
         *
-        * @param gender Gender (M, F, C)
-        * @param surname Surname
-        * @param familyName Family name
-        * @param companyName Company name
+        * @return Own data?
         */
-       public void updateNameData (final Gender gender, final String surname, final String familyName, final String companyName);
+       public boolean isOwnContact ();
 
        /**
-        * Updates other data in this Contact instance
+        * Shows the contact to the user
         *
-        * @param phoneNumber Phone number
-        * @param cellNumber Cellphone number
-        * @param faxNumber Fax number
-        * @param email Email address
-        * @param birthday Birthday
-        * @param comment Comments
+        * @param client Client instance to call back
         */
-       public void updateOtherData (final String phoneNumber, final String cellNumber, final String faxNumber, final String email, final String birthday, final String comment);
+       public void show (final Client client);
 }