} else {
// Not client choosen
this.getLogger().error("No client choosen. Cannot launch."); //NOI18N
+
try {
this.doShutdown();
} catch (final SQLException | IOException ex) {
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);
}
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
}
// 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();
// 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
* @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
* 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