Signed-off-by:Roland Häder <roland@mxchange.org>
// Get manager and cast it
ManageableContact manager = (ManageableContact) this.getManager();
// Get manager and cast it
ManageableContact manager = (ManageableContact) this.getManager();
- // Own address data
- String street = manager.enterOwnStreet();
+ // Own street and number
+ String streetNumber = manager.enterOwnStreet();
// Get zip code
int zipCode = manager.enterOwnZipCode();
// Get zip code
int zipCode = manager.enterOwnZipCode();
String countryCode = manager.enterOwnCountryCode();
// Update address data
String countryCode = manager.enterOwnCountryCode();
// Update address data
- contact.updateAddressData(street, zipCode, city, countryCode);
+ contact.setStreet(streetNumber);
+ contact.setZipCode(zipCode);
+ contact.setCity(city);
+ contact.setCountryCode(countryCode);
// Trace message
this.getLogger().trace("EXIT!"); //NOI18N
// Trace message
this.getLogger().trace("EXIT!"); //NOI18N
String companyName = manager.enterOwnCompanyName();
// Update contact instance
String companyName = manager.enterOwnCompanyName();
// Update contact instance
- contact.updateNameData(gender, surname, familyName, companyName);
+ contact.setGender(gender);
+ contact.setSurname(surname);
+ contact.setFamilyName(familyName);
+ contact.setCompanyName(companyName);
// Trace message
this.getLogger().trace("EXIT!"); //NOI18N
// Trace message
this.getLogger().trace("EXIT!"); //NOI18N
String phoneNumber = manager.enterOwnPhoneNumber();
// Phone number
String phoneNumber = manager.enterOwnPhoneNumber();
// Phone number
- String cellNumber = manager.enterOwnCellNumber();
+ String cellphonePhoneNumber = manager.enterOwnCellNumber();
// Fax number
String faxNumber = manager.enterOwnFaxNumber();
// Fax number
String faxNumber = manager.enterOwnFaxNumber();
String comment = manager.enterOwnComment();
// Update contact instance
String comment = manager.enterOwnComment();
// Update contact instance
- contact.updateOtherData(phoneNumber, cellNumber, faxNumber, email, null, comment);
+ contact.setPhoneNumber(phoneNumber);
+ contact.setCellphoneNumber(cellphonePhoneNumber);
+ contact.setFaxNumber(faxNumber);
+ contact.setEmailAddress(email);
+ contact.setComment(comment);
// Trace message
this.getLogger().trace("EXIT!"); //NOI18N
// Trace message
this.getLogger().trace("EXIT!"); //NOI18N
package org.mxchange.addressbook.contact.user;
import java.text.MessageFormat;
package org.mxchange.addressbook.contact.user;
import java.text.MessageFormat;
+import org.mxchange.addressbook.contact.book.BookContact;
import org.mxchange.jcore.contact.Contact;
import org.mxchange.jcore.contact.Gender;
import org.mxchange.jcore.contact.Contact;
import org.mxchange.jcore.contact.Gender;
-import org.mxchange.addressbook.contact.book.BookContact;
import org.mxchange.jcore.database.storage.csv.StoreableCsv;
/**
import org.mxchange.jcore.database.storage.csv.StoreableCsv;
/**
this.getLogger().trace(MessageFormat.format("gender={0},surname={1},familyName={2},companyName={3} - CALLED!", gender, surname, familyName, companyName)); //NOI18N
// Update all data
this.getLogger().trace(MessageFormat.format("gender={0},surname={1},familyName={2},companyName={3} - CALLED!", gender, surname, familyName, companyName)); //NOI18N
// Update all data
- this.updateNameData(gender, surname, familyName, companyName);
+ this.setGender(gender);
+ this.setSurname(surname);
+ this.setFamilyName(familyName);
+ this.setCompanyName(companyName);
// Trace message
this.getLogger().trace("EXIT!"); //NOI18N
// Trace message
this.getLogger().trace("EXIT!"); //NOI18N
assert (contact instanceof Contact) : "First token was not boolean"; //NOI18N
// Update data
assert (contact instanceof Contact) : "First token was not boolean"; //NOI18N
// Update data
- contact.updateNameData(gender, null, null, null);
+ contact.setGender(gender);
break;
case 2: // Surname
break;
case 2: // Surname
assert (gender instanceof Gender) : "gender instance is not set"; //NOI18N
// Update data
assert (gender instanceof Gender) : "gender instance is not set"; //NOI18N
// Update data
- contact.updateNameData(gender, strippedToken, null, null);
+ contact.setSurname(strippedToken);
break;
case 3: // Family name
break;
case 3: // Family name
assert (gender instanceof Gender) : "gender instance is not set"; //NOI18N
// Update data
assert (gender instanceof Gender) : "gender instance is not set"; //NOI18N
// Update data
- contact.updateNameData(gender, null, strippedToken, null);
+ contact.setFamilyName(strippedToken);
break;
case 4: // Company name
break;
case 4: // Company name
assert (gender instanceof Gender) : "gender instance is not set"; //NOI18N
// Update data
assert (gender instanceof Gender) : "gender instance is not set"; //NOI18N
// Update data
- contact.updateNameData(gender, null, null, strippedToken);
+ contact.setCompanyName(strippedToken);
break;
case 5: // Street number
assert (contact instanceof Contact) : "First token was not boolean"; //NOI18N
// Update data
break;
case 5: // Street number
assert (contact instanceof Contact) : "First token was not boolean"; //NOI18N
// Update data
- contact.updateAddressData(strippedToken, 0, null, null);
+ contact.setHouseNumber(num);
break;
case 6: // ZIP code
assert (contact instanceof Contact) : "First token was not boolean"; //NOI18N
// Update data
break;
case 6: // ZIP code
assert (contact instanceof Contact) : "First token was not boolean"; //NOI18N
// Update data
- contact.updateAddressData(null, num, null, null);
+ contact.setZipCode(num);
break;
case 7: // City name
assert (contact instanceof Contact) : "First token was not boolean"; //NOI18N
// Update data
break;
case 7: // City name
assert (contact instanceof Contact) : "First token was not boolean"; //NOI18N
// Update data
- contact.updateAddressData(null, 0, strippedToken, null);
+ contact.setCity(strippedToken);
break;
case 8: // Country code
assert (contact instanceof Contact) : "First token was not boolean"; //NOI18N
// Update data
break;
case 8: // Country code
assert (contact instanceof Contact) : "First token was not boolean"; //NOI18N
// Update data
- contact.updateAddressData(null, 0, null, strippedToken);
+ contact.setCountryCode(strippedToken);
break;
case 9: // Phone number
assert (contact instanceof Contact) : "First token was not boolean"; //NOI18N
// Update data
break;
case 9: // Phone number
assert (contact instanceof Contact) : "First token was not boolean"; //NOI18N
// Update data
- contact.updateOtherData(strippedToken, null, null, null, null, null);
+ contact.setPhoneNumber(strippedToken);
break;
case 10: // Fax number
assert (contact instanceof Contact) : "First token was not boolean"; //NOI18N
// Update data
break;
case 10: // Fax number
assert (contact instanceof Contact) : "First token was not boolean"; //NOI18N
// Update data
- contact.updateOtherData(null, strippedToken, null, null, null, null);
+ contact.setFaxNumber(strippedToken);
break;
case 11: // Cellphone number
assert (contact instanceof Contact) : "First token was not boolean"; //NOI18N
// Update data
break;
case 11: // Cellphone number
assert (contact instanceof Contact) : "First token was not boolean"; //NOI18N
// Update data
- contact.updateOtherData(null, null, strippedToken, null, null, null);
+ contact.setCellphoneNumber(strippedToken);
break;
case 12: // Email address
assert (contact instanceof Contact) : "First token was not boolean"; //NOI18N
// Update data
break;
case 12: // Email address
assert (contact instanceof Contact) : "First token was not boolean"; //NOI18N
// Update data
- contact.updateOtherData(null, null, null, strippedToken, null, null);
+ contact.setEmailAddress(strippedToken);
break;
case 13: // Birthday
assert (contact instanceof Contact) : "First token was not boolean"; //NOI18N
// Update data
break;
case 13: // Birthday
assert (contact instanceof Contact) : "First token was not boolean"; //NOI18N
// Update data
- contact.updateOtherData(null, null, null, null, strippedToken, null);
+ contact.setBirthday(strippedToken);
assert (contact instanceof Contact) : "First token was not boolean"; //NOI18N
// Update data
assert (contact instanceof Contact) : "First token was not boolean"; //NOI18N
// Update data
- contact.updateOtherData(null, null, null, null, null, strippedToken);
+ contact.setComment(strippedToken);
break;
default: // New data entry
break;
default: // New data entry