From: Roland Häder Date: Sat, 9 Sep 2017 12:49:54 +0000 (+0200) Subject: Please cherry-pick: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=18ff950757317976955484ac5a9d7d778551b95e;p=pizzaservice-ejb.git Please cherry-pick: - re-package season has started: now all core project's entity packages do always have following format: tld.domain.project.model.foo.SomeFoo; - also fixed persistence unit Signed-off-by: Roland Häder --- diff --git a/src/conf/persistence.xml b/src/conf/persistence.xml index 9122a45..ed0d8de 100644 --- a/src/conf/persistence.xml +++ b/src/conf/persistence.xml @@ -1,21 +1,22 @@ - jdbc/shop - org.mxchange.jcontacts.contact.UserContact - org.mxchange.jcontactsbusiness.basicdata.CompanyBasicData - org.mxchange.jcontactsbusiness.branchoffice.CompanyBranchOffice - org.mxchange.jcontactsbusiness.department.CompanyDepartment - org.mxchange.jcontactsbusiness.employee.CompanyEmployee - org.mxchange.jcontactsbusiness.headquarters.CompanyHeadquartersData - org.mxchange.jcontactsbusiness.jobposition.EmployeePosition - org.mxchange.jcontactsbusiness.logo.CompanyLogo - org.mxchange.jcontactsbusiness.opening_times.BusinessOpeningTimes - org.mxchange.jcountry.data.CountryData - org.mxchange.jphone.phonenumbers.fax.FaxNumber - org.mxchange.jphone.phonenumbers.landline.LandLineNumber - org.mxchange.jphone.phonenumbers.mobile.MobileNumber - org.mxchange.jphone.phonenumbers.mobileprovider.CellphoneProvider + jdbc/pizzaservice + org.mxchange.jcontacts.model.contact.UserContact + org.mxchange.jcontactsbusiness.model.basicdata.CompanyBasicData + org.mxchange.jcontactsbusiness.model.branchoffice.CompanyBranchOffice + org.mxchange.jcontactsbusiness.model.department.CompanyDepartment + org.mxchange.jcontactsbusiness.model.employee.CompanyEmployee + org.mxchange.jcontactsbusiness.model.headquarters.CompanyHeadquartersData + org.mxchange.jcontactsbusiness.model.jobposition.EmployeePosition + org.mxchange.jcontactsbusiness.model.logo.CompanyLogo + org.mxchange.jcontactsbusiness.model.opening_times.BusinessOpeningTimes + org.mxchange.jcountry.model.data.CountryData + org.mxchange.jcustomercore.model.customer.ContactCustomer + org.mxchange.jphone.model.phonenumbers.fax.FaxNumber + org.mxchange.jphone.model.phonenumbers.landline.LandLineNumber + org.mxchange.jphone.model.phonenumbers.mobile.MobileNumber + org.mxchange.jphone.model.phonenumbers.mobileprovider.CellphoneProvider org.mxchange.jproduct.model.category.ProductCategory org.mxchange.jproduct.model.product.GenericProduct org.mxchange.jshopcore.model.basket.items.BasketItem @@ -25,7 +26,6 @@ org.mxchange.jusercore.model.user.LoginUser org.mxchange.jusercore.model.user.activity.UserActivityLog org.mxchange.jusercore.model.user.password_history.UserPasswordHistory - org.mxchange.jcustomercore.model.customer.ContactCustomer false diff --git a/src/java/org/mxchange/jcontacts/model/contact/PizzaContactSessionBean.java b/src/java/org/mxchange/jcontacts/model/contact/PizzaContactSessionBean.java index 854f43a..c4170ae 100644 --- a/src/java/org/mxchange/jcontacts/model/contact/PizzaContactSessionBean.java +++ b/src/java/org/mxchange/jcontacts/model/contact/PizzaContactSessionBean.java @@ -247,9 +247,6 @@ public class PizzaContactSessionBean extends BasePizzaDatabaseBean implements Co // Get contact Contact next = iterator.next(); - // Debug message - this.getLoggerBeanLocal().logDebug(MessageFormat.format("lookupContact: next={0}", next)); //NOI18N - // Is same contact? if ((Objects.equals(contact, next)) || (ContactUtils.isSameContact(contact, next))) { // Debug message @@ -264,14 +261,14 @@ public class PizzaContactSessionBean extends BasePizzaDatabaseBean implements Co // Trace message this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.isContactFound: foundContact={1} - EXIT!", this.getClass().getSimpleName(), foundContact)); //NOI18N - // Return status + // Return found contact return foundContact; } @Override - public Contact updateContactData (final Contact contact, final boolean isMobileUnlinked, final boolean isLandlineUnlinked, final boolean isFaxUnlinked) { + public Contact updateContactData (final Contact contact, final boolean isCellphoneUnlinked, final boolean isLandlineUnlinked, final boolean isFaxUnlinked) { // Log trace message - this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateContactData: contact={1},isMobileUnlinked={2},isLandlineUnlinked={3},isFaxUnlinked={4} - CALLED!", this.getClass().getSimpleName(), contact, isMobileUnlinked, isLandlineUnlinked, isFaxUnlinked)); //NOI18N + this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateContactData: contact={1},isCellphoneUnlinked={2},isLandlineUnlinked={3},isFaxUnlinked={4} - CALLED!", this.getClass().getSimpleName(), contact, isCellphoneUnlinked, isLandlineUnlinked, isFaxUnlinked)); //NOI18N // The contact instance must be valid if (null == contact) { @@ -285,14 +282,17 @@ public class PizzaContactSessionBean extends BasePizzaDatabaseBean implements Co throw new IllegalStateException(MessageFormat.format("contact.contactId={0} is not valid.", contact.getContactId())); //NOI18N } - // Merge cellphone, land-line and fix - Contact managedContact = this.mergeContactData(contact); + // Set updated timestamp + this.setAllContactPhoneEntriesUpdated(contact, isCellphoneUnlinked, isLandlineUnlinked, isFaxUnlinked); + + // Merge mobile, land-line and fix + Contact detachedContact = this.mergeContactData(contact); // Trace message - this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateContactData: managedContact={1} - EXIT!", this.getClass().getSimpleName(), managedContact)); //NOI18N + this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateContactData: detachedContact={1} - EXIT!", this.getClass().getSimpleName(), detachedContact)); //NOI18N // Return it - return managedContact; + return detachedContact; } @Override @@ -313,18 +313,18 @@ public class PizzaContactSessionBean extends BasePizzaDatabaseBean implements Co } // Is cell phone/land-line/fax number unlinked? - boolean isMobileUnlinked = (contact.getContactMobileNumber() == null); + boolean isCellphoneUnlinked = (contact.getContactMobileNumber() == null); boolean isLandLineUnlinked = (contact.getContactLandLineNumber() == null); boolean isFaxUnlinked = (contact.getContactFaxNumber() == null); // Call other Method - Contact managedContact = this.updateContactData(contact, isMobileUnlinked, isLandLineUnlinked, isFaxUnlinked); + Contact detachedContact = this.updateContactData(contact, isCellphoneUnlinked, isLandLineUnlinked, isFaxUnlinked); // Trace message - this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateContactData: managedContact={1} - EXIT!", this.getClass().getSimpleName(), managedContact)); //NOI18N + this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateContactData: detachedContact={1} - EXIT!", this.getClass().getSimpleName(), detachedContact)); //NOI18N // Return it - return managedContact; + return detachedContact; } } diff --git a/src/java/org/mxchange/jcontactsbusiness/model/branchoffice/PizzaAdminBranchOfficeSessionBean.java b/src/java/org/mxchange/jcontactsbusiness/model/branchoffice/PizzaAdminBranchOfficeSessionBean.java index 1bd1cac..001fba6 100644 --- a/src/java/org/mxchange/jcontactsbusiness/model/branchoffice/PizzaAdminBranchOfficeSessionBean.java +++ b/src/java/org/mxchange/jcontactsbusiness/model/branchoffice/PizzaAdminBranchOfficeSessionBean.java @@ -25,8 +25,6 @@ import org.mxchange.jcontactsbusiness.branchoffice.AdminBranchOfficeSessionBeanR import org.mxchange.jcontactsbusiness.branchoffice.BranchOfficeSessionBeanRemote; import org.mxchange.jcontactsbusiness.exceptions.branchoffice.BranchOfficeAlreadyAddedException; import org.mxchange.jcontactsbusiness.model.basicdata.BusinessBasicData; -import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice; -import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOfficeUtils; import org.mxchange.jcountry.model.data.Country; import org.mxchange.jusercore.model.user.User; import org.mxchange.pizzaaplication.database.BasePizzaDatabaseBean; diff --git a/src/java/org/mxchange/jphone/model/phonenumbers/phone/PizzaAdminPhoneSessionBean.java b/src/java/org/mxchange/jphone/model/phonenumbers/phone/PizzaAdminPhoneSessionBean.java index 360720c..de0958e 100644 --- a/src/java/org/mxchange/jphone/model/phonenumbers/phone/PizzaAdminPhoneSessionBean.java +++ b/src/java/org/mxchange/jphone/model/phonenumbers/phone/PizzaAdminPhoneSessionBean.java @@ -25,7 +25,6 @@ import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber; import org.mxchange.jphone.model.phonenumbers.landline.LandLineNumbers; import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber; import org.mxchange.jphone.model.phonenumbers.mobile.MobileNumbers; -import org.mxchange.jphone.model.phonenumbers.phone.AdminPhoneSessionBeanRemote; import org.mxchange.pizzaaplication.database.BasePizzaDatabaseBean; /**