From 77fec8b631dfd297f9227ab3036a11b1f36142c1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 6 Oct 2022 16:40:23 +0200 Subject: [PATCH] Please cherry-pick: - updated references to packages and classes --- ...inancialsAdminBranchOfficeSessionBean.java | 3 +- .../FinancialsAdminDepartmentSessionBean.java | 3 +- .../FinancialsAdminEmployeeSessionBean.java | 3 +- ...FinancialsAdminHeadquarterSessionBean.java | 3 +- .../BaseFinancialsEnterpriseBean.java | 40 +++++++++---------- .../BaseFinancialsProductEnterpriseBean.java | 8 ++-- .../FinancialsAdminMobileSessionBean.java | 3 +- .../FinancialsAdminPhoneSessionBean.java | 8 ++-- .../model/user/FinancialsUserSessionBean.java | 17 ++++---- 9 files changed, 47 insertions(+), 41 deletions(-) diff --git a/src/java/org/mxchange/jcontactsbusiness/model/branchoffice/FinancialsAdminBranchOfficeSessionBean.java b/src/java/org/mxchange/jcontactsbusiness/model/branchoffice/FinancialsAdminBranchOfficeSessionBean.java index d20738a..d407200 100644 --- a/src/java/org/mxchange/jcontactsbusiness/model/branchoffice/FinancialsAdminBranchOfficeSessionBean.java +++ b/src/java/org/mxchange/jcontactsbusiness/model/branchoffice/FinancialsAdminBranchOfficeSessionBean.java @@ -27,6 +27,7 @@ import org.mxchange.jcontactsbusiness.exceptions.branchoffice.BranchOfficeAlread import org.mxchange.jcontactsbusiness.exceptions.branchoffice.BranchOfficeNotFoundException; import org.mxchange.jcontactsbusiness.model.basicdata.BasicData; import org.mxchange.jcontactsbusiness.model.opening_time.OpeningTime; +import org.mxchange.jcontactsbusiness.model.utils.BranchOfficeUtils; import org.mxchange.jcountry.model.data.Country; import org.mxchange.jfinancials.enterprise.BaseFinancialsEnterpriseBean; import org.mxchange.jusercore.model.user.User; @@ -203,7 +204,7 @@ public class FinancialsAdminBranchOfficeSessionBean extends BaseFinancialsEnterp // Check all single addresses for (final BranchOffice bo : branchOffices) { // Is the same address found? - if (Objects.equals(bo.getBranchId(), branchOffice.getBranchId()) || BranchOffices.isSameAddress(bo, branchOffice)) { + if (Objects.equals(bo.getBranchId(), branchOffice.getBranchId()) || BranchOfficeUtils.isSameAddress(bo, branchOffice)) { // Found one isFound = true; break; diff --git a/src/java/org/mxchange/jcontactsbusiness/model/department/FinancialsAdminDepartmentSessionBean.java b/src/java/org/mxchange/jcontactsbusiness/model/department/FinancialsAdminDepartmentSessionBean.java index 092f88f..afa901b 100644 --- a/src/java/org/mxchange/jcontactsbusiness/model/department/FinancialsAdminDepartmentSessionBean.java +++ b/src/java/org/mxchange/jcontactsbusiness/model/department/FinancialsAdminDepartmentSessionBean.java @@ -27,6 +27,7 @@ import org.mxchange.jcontactsbusiness.exceptions.department.DepartmentNotFoundEx import org.mxchange.jcontactsbusiness.model.basicdata.BasicData; import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice; import org.mxchange.jcontactsbusiness.model.headquarter.Headquarter; +import org.mxchange.jcontactsbusiness.model.utils.DepartmentUtils; import org.mxchange.jfinancials.enterprise.BaseFinancialsEnterpriseBean; import org.mxchange.jusercore.model.user.User; @@ -208,7 +209,7 @@ public class FinancialsAdminDepartmentSessionBean extends BaseFinancialsEnterpri // Check all single addresses for (final Department dep : departments) { // Is the same address found? - if (Departments.isSameDepartment(dep, department)) { + if (DepartmentUtils.isSameDepartment(dep, department)) { // Found one isFound = true; break; diff --git a/src/java/org/mxchange/jcontactsbusiness/model/employee/FinancialsAdminEmployeeSessionBean.java b/src/java/org/mxchange/jcontactsbusiness/model/employee/FinancialsAdminEmployeeSessionBean.java index d073c97..5f70aac 100644 --- a/src/java/org/mxchange/jcontactsbusiness/model/employee/FinancialsAdminEmployeeSessionBean.java +++ b/src/java/org/mxchange/jcontactsbusiness/model/employee/FinancialsAdminEmployeeSessionBean.java @@ -26,6 +26,7 @@ import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice; import org.mxchange.jcontactsbusiness.model.department.Department; import org.mxchange.jcontactsbusiness.model.headquarter.Headquarter; import org.mxchange.jcontactsbusiness.model.jobposition.HireableJobPosition; +import org.mxchange.jcontactsbusiness.model.utils.EmployeeUtils; import org.mxchange.jfinancials.enterprise.BaseFinancialsEnterpriseBean; import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber; import org.mxchange.jphone.model.phonenumbers.mobileprovider.MobileProvider; @@ -233,7 +234,7 @@ public class FinancialsAdminEmployeeSessionBean extends BaseFinancialsEnterprise // Check all entries for (final Employable otherEmployee : this.employeeBean.fetchAllEmployees()) { // Is same found? - if (Employees.isSameEmployeeFound(employee, otherEmployee)) { + if (EmployeeUtils.isSameEmployeeFound(employee, otherEmployee)) { // Found it isFound = true; break; diff --git a/src/java/org/mxchange/jcontactsbusiness/model/headquarter/FinancialsAdminHeadquarterSessionBean.java b/src/java/org/mxchange/jcontactsbusiness/model/headquarter/FinancialsAdminHeadquarterSessionBean.java index 7a95ae3..23228c1 100644 --- a/src/java/org/mxchange/jcontactsbusiness/model/headquarter/FinancialsAdminHeadquarterSessionBean.java +++ b/src/java/org/mxchange/jcontactsbusiness/model/headquarter/FinancialsAdminHeadquarterSessionBean.java @@ -24,6 +24,7 @@ import javax.ejb.Stateless; import org.mxchange.jcontacts.model.contact.Contact; import org.mxchange.jcontactsbusiness.exceptions.headquarter.HeadquarterAlreadyAddedException; import org.mxchange.jcontactsbusiness.model.opening_time.OpeningTime; +import org.mxchange.jcontactsbusiness.model.utils.HeadquarterUtils; import org.mxchange.jcountry.model.data.Country; import org.mxchange.jfinancials.enterprise.BaseFinancialsEnterpriseBean; import org.mxchange.jusercore.model.user.User; @@ -149,7 +150,7 @@ public class FinancialsAdminHeadquarterSessionBean extends BaseFinancialsEnterpr // Check all single addresses for (final Headquarter hq : headquarters) { // Is the same address found? - if (Headquarters.isSameAddress(hq, headquarter)) { + if (HeadquarterUtils.isSameAddress(hq, headquarter)) { // Found one isFound = true; break; diff --git a/src/java/org/mxchange/jfinancials/enterprise/BaseFinancialsEnterpriseBean.java b/src/java/org/mxchange/jfinancials/enterprise/BaseFinancialsEnterpriseBean.java index b54bcde..a0cd964 100644 --- a/src/java/org/mxchange/jfinancials/enterprise/BaseFinancialsEnterpriseBean.java +++ b/src/java/org/mxchange/jfinancials/enterprise/BaseFinancialsEnterpriseBean.java @@ -28,30 +28,30 @@ import javax.mail.Address; import javax.mail.internet.AddressException; import javax.mail.internet.InternetAddress; import org.mxchange.jcontacts.model.contact.Contact; -import org.mxchange.jcontacts.model.contact.Contacts; +import org.mxchange.jcontacts.model.utils.ContactUtils; import org.mxchange.jcontactsbusiness.model.basicdata.BasicData; import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice; -import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffices; import org.mxchange.jcontactsbusiness.model.department.Department; -import org.mxchange.jcontactsbusiness.model.department.Departments; import org.mxchange.jcontactsbusiness.model.employee.Employable; import org.mxchange.jcontactsbusiness.model.headquarter.Headquarter; import org.mxchange.jcontactsbusiness.model.jobposition.HireableJobPosition; import org.mxchange.jcontactsbusiness.model.opening_time.OpeningTime; +import org.mxchange.jcontactsbusiness.model.utils.BranchOfficeUtils; +import org.mxchange.jcontactsbusiness.model.utils.DepartmentUtils; import org.mxchange.jcoreee.bean.ejb.BaseEnterpriseBean; import org.mxchange.jcountry.model.data.Country; import org.mxchange.jfinancials.model.receipt.BillableReceipt; import org.mxchange.jmailee.model.delivery.wrapper.EmailDeliveryWrapper; import org.mxchange.jmailee.model.delivery.wrapper.WrapableEmailDelivery; import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber; -import org.mxchange.jphone.model.phonenumbers.fax.FaxNumbers; 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.mobileprovider.MobileProvider; +import org.mxchange.jphone.model.utils.FaxNumberUtils; +import org.mxchange.jphone.model.utils.LandLineNumberUtils; +import org.mxchange.jphone.model.utils.MobileNumberUtils; import org.mxchange.jusercore.model.user.User; -import org.mxchange.jusercore.model.user.Users; +import org.mxchange.jusercore.model.utils.UserUtils; /** * A helper class for beans that access the database. @@ -767,7 +767,7 @@ public abstract class BaseFinancialsEnterpriseBean extends BaseEnterpriseBean { this.getLoggerBeanLocal().logDebug(MessageFormat.format("mergeBranchOfficeData: foundContact.contactId={0}", foundBranchOffice.getBranchId())); //NOI18N // Copy all - BranchOffices.copyBranchOfficeData(detachedBranchOffice, foundBranchOffice); + BranchOfficeUtils.copyBranchOfficeData(detachedBranchOffice, foundBranchOffice); // Merge contact instance final BranchOffice managedBranchOffice = this.getEntityManager().merge(foundBranchOffice); @@ -812,7 +812,7 @@ public abstract class BaseFinancialsEnterpriseBean extends BaseEnterpriseBean { this.getLoggerBeanLocal().logDebug(MessageFormat.format("mergeContactData: foundContact.contactId={0}", foundContact.getContactId())); //NOI18N // Copy all - Contacts.copyContactData(detachedContact, foundContact); + ContactUtils.copyContactData(detachedContact, foundContact); // Merge contact instance final Contact managedContact = this.getEntityManager().merge(foundContact); @@ -865,7 +865,7 @@ public abstract class BaseFinancialsEnterpriseBean extends BaseEnterpriseBean { assert (foundMobile instanceof DialableMobileNumber) : MessageFormat.format("Mobile number with id {0} not found but should be.", foundMobile.getMobileId()); //NOI18N // Copy all - MobileNumbers.copyMobileNumberData(detachedContact.getContactMobileNumber(), foundMobile); + MobileNumberUtils.copyMobileNumberData(detachedContact.getContactMobileNumber(), foundMobile); // Then merge it, too final DialableMobileNumber managedMobile = this.getEntityManager().merge(foundMobile); @@ -889,7 +889,7 @@ public abstract class BaseFinancialsEnterpriseBean extends BaseEnterpriseBean { assert (foundFax instanceof DialableFaxNumber) : MessageFormat.format("Fax number with id {0} not found but should be.", foundFax.getPhoneId()); //NOI18N // Copy all - FaxNumbers.copyFaxNumberData(detachedContact.getContactFaxNumber(), foundFax); + FaxNumberUtils.copyFaxNumberData(detachedContact.getContactFaxNumber(), foundFax); // Then merge it, too final DialableFaxNumber managedFax = this.getEntityManager().merge(foundFax); @@ -913,7 +913,7 @@ public abstract class BaseFinancialsEnterpriseBean extends BaseEnterpriseBean { assert (foundLandLine instanceof DialableLandLineNumber) : MessageFormat.format("Land line number with id {0} not found but should be.", foundLandLine.getPhoneId()); //NOI18N // Copy all - LandLineNumbers.copyLandLineNumberData(detachedContact.getContactLandLineNumber(), foundLandLine); + LandLineNumberUtils.copyLandLineNumberData(detachedContact.getContactLandLineNumber(), foundLandLine); // Then merge it, too final DialableLandLineNumber managedLandLine = this.getEntityManager().merge(foundLandLine); @@ -959,7 +959,7 @@ public abstract class BaseFinancialsEnterpriseBean extends BaseEnterpriseBean { this.getLoggerBeanLocal().logDebug(MessageFormat.format("mergeDepartmentData: foundContact.contactId={0}", foundDepartment.getDepartmentId())); //NOI18N // Copy all - Departments.copyDepartmentData(detachedDepartment, foundDepartment); + DepartmentUtils.copyDepartmentData(detachedDepartment, foundDepartment); // Merge contact instance final Department managedDepartment = this.getEntityManager().merge(foundDepartment); @@ -1008,7 +1008,7 @@ public abstract class BaseFinancialsEnterpriseBean extends BaseEnterpriseBean { DialableFaxNumber detachedNumber = null; // Is there a difference? - if (!FaxNumbers.isSameFaxNumber(faxNumber, fetchedNumber)) { + if (!FaxNumberUtils.isSameFaxNumber(faxNumber, fetchedNumber)) { // @TODO Copy all to foundNumber, then merge // Merge this entry @@ -1057,7 +1057,7 @@ public abstract class BaseFinancialsEnterpriseBean extends BaseEnterpriseBean { DialableLandLineNumber detachedNumber = null; // Is there a difference? - if (!LandLineNumbers.isSameLandLineNumber(landLineNumber, fetchedNumber)) { + if (!LandLineNumberUtils.isSameLandLineNumber(landLineNumber, fetchedNumber)) { // @TODO Copy all to foundNumber, then merge // Merge this entry @@ -1106,7 +1106,7 @@ public abstract class BaseFinancialsEnterpriseBean extends BaseEnterpriseBean { DialableMobileNumber detachedNumber = null; // Is there a difference? - if (!MobileNumbers.isSameMobileNumber(mobileNumber, fetchedNumber)) { + if (!MobileNumberUtils.isSameMobileNumber(mobileNumber, fetchedNumber)) { // @TODO Copy all to foundNumber, then merge // Merge this entry @@ -1187,7 +1187,7 @@ public abstract class BaseFinancialsEnterpriseBean extends BaseEnterpriseBean { } // Set all values - final Properties variables = Users.getAllUserFields(user); + final Properties variables = UserUtils.getAllUserFields(user); // Set base URL and random password variables.put("baseUrl", baseUrl); //NOI18N @@ -1256,7 +1256,7 @@ public abstract class BaseFinancialsEnterpriseBean extends BaseEnterpriseBean { this.getLoggerBeanLocal().logDebug(MessageFormat.format("setAllContactPhoneEntries: other.contactMobileNumber={0}", other.getContactMobileNumber())); //NOI18N // Is other mobile not set? - if ((other.getContactMobileNumber() == null) || (MobileNumbers.isSameMobileNumber(contact.getContactMobileNumber(), other.getContactMobileNumber()))) { + if ((other.getContactMobileNumber() == null) || (MobileNumberUtils.isSameMobileNumber(contact.getContactMobileNumber(), other.getContactMobileNumber()))) { // Debug message this.getLoggerBeanLocal().logDebug("setAllContactPhoneEntries: Copying mobile entry ..."); //NOI18N @@ -1274,7 +1274,7 @@ public abstract class BaseFinancialsEnterpriseBean extends BaseEnterpriseBean { this.getLoggerBeanLocal().logDebug(MessageFormat.format("setAllContactPhoneEntries: other.contactLandLineNumber={0}", other.getContactLandLineNumber())); //NOI18N // Is other mobile not set? - if ((other.getContactLandLineNumber() == null) || (LandLineNumbers.isSameLandLineNumber(contact.getContactLandLineNumber(), other.getContactLandLineNumber()))) { + if ((other.getContactLandLineNumber() == null) || (LandLineNumberUtils.isSameLandLineNumber(contact.getContactLandLineNumber(), other.getContactLandLineNumber()))) { // Debug message this.getLoggerBeanLocal().logDebug("setAllContactPhoneEntries: Copying land-line entry ..."); //NOI18N @@ -1292,7 +1292,7 @@ public abstract class BaseFinancialsEnterpriseBean extends BaseEnterpriseBean { this.getLoggerBeanLocal().logDebug(MessageFormat.format("setAllContactPhoneEntries: other.contactFaxNumber={0}", other.getContactFaxNumber())); //NOI18N // Is other mobile not set? - if ((other.getContactFaxNumber() == null) || (FaxNumbers.isSameFaxNumber(contact.getContactFaxNumber(), other.getContactFaxNumber()))) { + if ((other.getContactFaxNumber() == null) || (FaxNumberUtils.isSameFaxNumber(contact.getContactFaxNumber(), other.getContactFaxNumber()))) { // Debug message this.getLoggerBeanLocal().logDebug("setAllContactPhoneEntries: Copying fax entry ..."); //NOI18N diff --git a/src/java/org/mxchange/jfinancials/enterprise/product/BaseFinancialsProductEnterpriseBean.java b/src/java/org/mxchange/jfinancials/enterprise/product/BaseFinancialsProductEnterpriseBean.java index c83618e..ec0ce0b 100644 --- a/src/java/org/mxchange/jfinancials/enterprise/product/BaseFinancialsProductEnterpriseBean.java +++ b/src/java/org/mxchange/jfinancials/enterprise/product/BaseFinancialsProductEnterpriseBean.java @@ -19,10 +19,10 @@ package org.mxchange.jfinancials.enterprise.product; import java.text.MessageFormat; import java.util.Date; import org.mxchange.jfinancials.enterprise.BaseFinancialsEnterpriseBean; -import org.mxchange.jproduct.model.category.Categories; import org.mxchange.jproduct.model.category.Category; import org.mxchange.jproduct.model.product.Product; -import org.mxchange.jproduct.model.product.Products; +import org.mxchange.jproduct.model.utils.CategoryUtils; +import org.mxchange.jproduct.model.utils.ProductUtils; /** * A general bean for product-related methods that can be generalized. @@ -157,7 +157,7 @@ public abstract class BaseFinancialsProductEnterpriseBean extends BaseFinancials this.getLoggerBeanLocal().logDebug(MessageFormat.format("mergeProductData: foundProduct.productId={0}", foundProduct.getProductId())); //NOI18N // Copy all - Products.copyProductData(detachedProduct, foundProduct); + ProductUtils.copyProductData(detachedProduct, foundProduct); // Merge product instance final Product managedProduct = this.getEntityManager().merge(foundProduct); @@ -208,7 +208,7 @@ public abstract class BaseFinancialsProductEnterpriseBean extends BaseFinancials this.getLoggerBeanLocal().logDebug(MessageFormat.format("mergeCategoryData: foundCategory.categoryId={0}", foundCategory.getCategoryId())); //NOI18N // Copy all - Categories.copyCategoryData(detachedCategory, foundCategory); + CategoryUtils.copyCategoryData(detachedCategory, foundCategory); // Merge category instance final Category managedCategory = this.getEntityManager().merge(foundCategory); diff --git a/src/java/org/mxchange/jphone/model/phonenumbers/mobile/FinancialsAdminMobileSessionBean.java b/src/java/org/mxchange/jphone/model/phonenumbers/mobile/FinancialsAdminMobileSessionBean.java index b150896..1250a42 100644 --- a/src/java/org/mxchange/jphone/model/phonenumbers/mobile/FinancialsAdminMobileSessionBean.java +++ b/src/java/org/mxchange/jphone/model/phonenumbers/mobile/FinancialsAdminMobileSessionBean.java @@ -20,6 +20,7 @@ import java.text.MessageFormat; import java.util.Date; import javax.ejb.Stateless; import org.mxchange.jfinancials.enterprise.BaseFinancialsEnterpriseBean; +import org.mxchange.jphone.model.utils.MobileNumberUtils; /** * An EJB for administrative mobile number purposes @@ -126,7 +127,7 @@ public class FinancialsAdminMobileSessionBean extends BaseFinancialsEnterpriseBe this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.updateMobileData: managedNumber.phoneId={1}", this.getClass().getSimpleName(), managedNumber.getMobileId())); //NOI18N // Set updated timestamp - MobileNumbers.copyMobileNumberData(mobileNumber, managedNumber); + MobileNumberUtils.copyMobileNumberData(mobileNumber, managedNumber); managedNumber.setMobileEntryUpdated(new Date()); // Trace message diff --git a/src/java/org/mxchange/jphone/model/phonenumbers/phone/FinancialsAdminPhoneSessionBean.java b/src/java/org/mxchange/jphone/model/phonenumbers/phone/FinancialsAdminPhoneSessionBean.java index fa09506..8e50954 100644 --- a/src/java/org/mxchange/jphone/model/phonenumbers/phone/FinancialsAdminPhoneSessionBean.java +++ b/src/java/org/mxchange/jphone/model/phonenumbers/phone/FinancialsAdminPhoneSessionBean.java @@ -21,9 +21,9 @@ import java.util.Date; import javax.ejb.Stateless; import org.mxchange.jfinancials.enterprise.BaseFinancialsEnterpriseBean; import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber; -import org.mxchange.jphone.model.phonenumbers.fax.FaxNumbers; import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber; -import org.mxchange.jphone.model.phonenumbers.landline.LandLineNumbers; +import org.mxchange.jphone.model.utils.FaxNumberUtils; +import org.mxchange.jphone.model.utils.LandLineNumberUtils; /** * An EJB for administrative phone purposes @@ -190,7 +190,7 @@ public class FinancialsAdminPhoneSessionBean extends BaseFinancialsEnterpriseBea this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.updateFaxData: managedNumber.phoneId={1}", this.getClass().getSimpleName(), managedNumber.getPhoneId())); //NOI18N // Set updated timestamp - FaxNumbers.copyFaxNumberData(faxNumber, managedNumber); + FaxNumberUtils.copyFaxNumberData(faxNumber, managedNumber); managedNumber.setPhoneEntryUpdated(new Date()); // Trace message @@ -248,7 +248,7 @@ public class FinancialsAdminPhoneSessionBean extends BaseFinancialsEnterpriseBea this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.updateLandLineData: managedNumber.phoneId={1}", this.getClass().getSimpleName(), managedNumber.getPhoneId())); //NOI18N // Set updated timestamp - LandLineNumbers.copyLandLineNumberData(landLineNumber, managedNumber); + LandLineNumberUtils.copyLandLineNumberData(landLineNumber, managedNumber); managedNumber.setPhoneEntryUpdated(new Date()); // Trace message diff --git a/src/java/org/mxchange/jusercore/model/user/FinancialsUserSessionBean.java b/src/java/org/mxchange/jusercore/model/user/FinancialsUserSessionBean.java index 30f5b4d..3782b70 100644 --- a/src/java/org/mxchange/jusercore/model/user/FinancialsUserSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/user/FinancialsUserSessionBean.java @@ -26,11 +26,11 @@ import javax.persistence.Query; import org.mxchange.jcontacts.model.contact.Contact; import org.mxchange.jfinancials.enterprise.BaseFinancialsEnterpriseBean; import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber; -import org.mxchange.jphone.model.phonenumbers.fax.FaxNumbers; 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.utils.FaxNumberUtils; +import org.mxchange.jphone.model.utils.LandLineNumberUtils; +import org.mxchange.jphone.model.utils.MobileNumberUtils; import org.mxchange.jusercore.exceptions.UserNotFoundException; import org.mxchange.jusercore.exceptions.UserStatusConfirmedException; import org.mxchange.jusercore.exceptions.UserStatusLockedException; @@ -38,6 +38,7 @@ import org.mxchange.jusercore.exceptions.UserStatusUnconfirmedException; import org.mxchange.jusercore.model.user.password_history.PasswordHistory; import org.mxchange.jusercore.model.user.password_history.UserPasswordHistory; import org.mxchange.jusercore.model.user.status.UserAccountStatus; +import org.mxchange.jusercore.model.utils.UserUtils; /** * A user EJB @@ -292,7 +293,7 @@ public class FinancialsUserSessionBean extends BaseFinancialsEnterpriseBean impl assert (foundUser instanceof User) : MessageFormat.format("User with id {0} not found, but should be.", detachedUser.getUserId()); //NOI18N // Copy all data - Users.copyUserData(detachedUser, foundUser); + UserUtils.copyUserData(detachedUser, foundUser); // Merge user final User managedUser = this.getEntityManager().merge(foundUser); @@ -416,7 +417,7 @@ public class FinancialsUserSessionBean extends BaseFinancialsEnterpriseBean impl assert (managedUser instanceof User) : MessageFormat.format("User with id {0} not found, but should be.", user.getUserId()); //NOI18N // Copy all data - Users.copyUserData(user, managedUser); + UserUtils.copyUserData(user, managedUser); // Set as updated managedUser.setUserEntryUpdated(new Date()); @@ -445,7 +446,7 @@ public class FinancialsUserSessionBean extends BaseFinancialsEnterpriseBean impl assert (foundMobile instanceof DialableMobileNumber) : MessageFormat.format("Mobile number with id {0} not found but should be.", foundMobile.getMobileId()); //NOI18N // Copy all - MobileNumbers.copyMobileNumberData(managedUser.getUserContact().getContactMobileNumber(), foundMobile); + MobileNumberUtils.copyMobileNumberData(managedUser.getUserContact().getContactMobileNumber(), foundMobile); // Then merge it, too final DialableMobileNumber managedMobile = this.getEntityManager().merge(foundMobile); @@ -472,7 +473,7 @@ public class FinancialsUserSessionBean extends BaseFinancialsEnterpriseBean impl assert (foundFax instanceof DialableFaxNumber) : MessageFormat.format("Fax number with id {0} not found but should be.", foundFax.getPhoneId()); //NOI18N // Copy all - FaxNumbers.copyFaxNumberData(managedUser.getUserContact().getContactFaxNumber(), foundFax); + FaxNumberUtils.copyFaxNumberData(managedUser.getUserContact().getContactFaxNumber(), foundFax); // Then merge it, too final DialableFaxNumber managedFax = this.getEntityManager().merge(foundFax); @@ -499,7 +500,7 @@ public class FinancialsUserSessionBean extends BaseFinancialsEnterpriseBean impl assert (foundLandLine instanceof DialableLandLineNumber) : MessageFormat.format("Land line number with id {0} not found but should be.", foundLandLine.getPhoneId()); //NOI18N // Copy all - LandLineNumbers.copyLandLineNumberData(managedUser.getUserContact().getContactLandLineNumber(), foundLandLine); + LandLineNumberUtils.copyLandLineNumberData(managedUser.getUserContact().getContactLandLineNumber(), foundLandLine); // Then merge it, too final DialableLandLineNumber managedLandLine = this.getEntityManager().merge(foundLandLine); -- 2.39.5