]> git.mxchange.org Git - jaddressbook-share-lib.git/commitdiff
Some fixes + updated jcore.jar
authorRoland Haeder <roland@mxchange.org>
Thu, 17 Sep 2015 06:23:55 +0000 (08:23 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 17 Sep 2015 06:23:55 +0000 (08:23 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

lib/jcore.jar
src/org/mxchange/addressbook/application/AddressbookApplication.java
src/org/mxchange/addressbook/client/console/ConsoleClient.java
src/org/mxchange/addressbook/manager/contact/AddressbookContactManager.java
src/org/mxchange/addressbook/model/contact/book/BookContact.java
src/org/mxchange/addressbook/model/contact/user/UserContact.java

index 4426c96e512eef4eac4d14f9f802bb47fc8361a4..107bb124479ac807cac4bf7d732d29970746d24a 100644 (file)
Binary files a/lib/jcore.jar and b/lib/jcore.jar differ
index 2e16df4e97e8d90b547d2e4efed1304578d13ee2..7dbbf57d6ec3ddede05fc5629bd23b1a50000018 100644 (file)
@@ -182,6 +182,7 @@ public class AddressbookApplication extends BaseFrameworkSystem implements Appli
                } else {
                        // Not client choosen
                        this.getLogger().error("No client choosen. Cannot launch."); //NOI18N
+
                        try {
                                this.doShutdown();
                        } catch (final SQLException | IOException ex) {
@@ -256,10 +257,10 @@ public class AddressbookApplication extends BaseFrameworkSystem implements Appli
        public void doShutdown () throws SQLException, IOException {
                // Trace message
                this.getLogger().trace("CALLED!"); //NOI18N
-               
+
                // Shutdown client
                this.getClient().doShutdown();
-               
+
                this.getLogger().info("End of program (last line)"); //NOI18N
                System.exit(0);
        }
index 082e49b9f3c04e00c59f9080c30f38be3fc77c20..ecfbd4dfa4d8e21aa2576a31ce6fb13341127014 100644 (file)
@@ -37,6 +37,7 @@ import org.mxchange.jcore.application.Application;
 import org.mxchange.jcore.exceptions.UnhandledUserChoiceException;
 import org.mxchange.jcore.model.contact.Contact;
 import org.mxchange.jcore.model.contact.gender.Gender;
+import org.mxchange.jcore.model.contact.gender.GenderUtils;
 
 /**
  * A client for the console
@@ -109,7 +110,7 @@ public class ConsoleClient extends BaseAddressbookClient implements AddressbookC
                }
 
                // Get translated gender as the user may want to see "Mr.", "Mrs."
-               String gender = contact.getTranslatedGender();
+               String gender = GenderUtils.getTranslatedGender(contact);
 
                // Get company name
                String companyName = contact.getCompanyName();
index c7aed6ab601404f43d036a9c5fd3348b3b6b7fb9..65bdd970a945ee40b2212bfdcc1f3d5c354db4ff 100644 (file)
@@ -710,7 +710,7 @@ public class AddressbookContactManager extends BaseManager implements Manageable
                // Then iterate over all
                while (iterator.hasNext()) {
                        // Get next element
-                       String key = iterator.next();
+                       String key = iterator.next().toLowerCase();
 
                        // Does the key start with AddressbookContactManager.columnName ?
                        if (key.startsWith("ContactManager.columnName")) { //NOI18N
index c34066f48ec9bb33c15bd550de3225d74c742ecd..65ef941bffd745f84cd0f9fc555ef1c307d2fd25 100644 (file)
@@ -26,6 +26,10 @@ import org.mxchange.jcore.model.contact.Contact;
  * @version 0.0
  */
 public class BookContact extends BaseContact implements Contact {
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 27_834_738_781L;
 
        /**
         * Default constructor, may only be used from database backend
index ef51cb4e45e7c2143854aaf4328a3629857277d5..8642ae115c532b55bd102efa264e18aa90160db7 100644 (file)
@@ -27,6 +27,10 @@ import org.mxchange.jcore.model.contact.gender.Gender;
  * TODO After a Collection has been used in ContactManager, change to BaseContact
  */
 public class UserContact extends BookContact implements Contact {
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 36_725_784_819_501L;
 
        /**
         * Creates own contact entry