From 98fe46b531d78eef72c0543a990a674168a21f1e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 24 Nov 2019 05:29:41 +0100 Subject: [PATCH] Please cherry-pick: - renamed BaseFinancialsDatabaseBean to BaseFinancialsEnterpriseBean - also moved it to proper "enterprise" package MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../contact/JobsAdminContactSessionBean.java | 2 +- .../model/contact/JobsContactSessionBean.java | 2 +- .../JobsAdminContactPhoneSessionBean.java | 50 ++--- .../JobsAdminBusinessDataSessionBean.java | 2 +- .../JobsBusinessDataSessionBean.java | 2 +- .../JobsAdminBranchOfficeSessionBean.java | 6 +- .../JobsBranchOfficeSessionBean.java | 2 +- .../JobsAdminDepartmentSessionBean.java | 2 +- .../department/JobsDepartmentSessionBean.java | 2 +- .../JobsAdminCompanyEmployeeSessionBean.java | 2 +- .../JobsCompanyEmployeeSessionBean.java | 2 +- .../JobsAdminHeadquarterSessionBean.java | 2 +- .../JobsHeadquarterSessionBean.java | 2 +- .../JobsAdminOpeningTimesSessionBean.java | 2 +- .../JobsOpeningTimesSessionBean.java | 2 +- .../data/JobsAdminCountrySingletonBean.java | 2 +- .../model/data/JobsCountrySingletonBean.java | 2 +- .../BaseJobsEnterpriseBean.java | 2 +- .../JobsAddressbookSessionBean.java | 2 +- .../JobsAdminMobileProviderSessionBean.java | 2 +- .../JobsMobileProviderSingletonBean.java | 2 +- .../phone/JobsAdminPhoneSessionBean.java | 36 ++-- .../phone/JobsPhoneSessionBean.java | 2 +- .../model/user/JobsAdminUserSessionBean.java | 2 +- .../model/user/JobsUserSessionBean.java | 2 +- .../JobsUserActivityLogMessageBean.java | 196 ++++++++---------- .../JobsUserEmailChangeSessionBean.java | 2 +- .../JobsUserPasswordHistorySessionBean.java | 2 +- .../user/login/JobsUserLoginSessionBean.java | 2 +- .../JobsUserRegistrationSessionBean.java | 2 +- .../resendlink/JobsResendLinkSessionBean.java | 2 +- 31 files changed, 167 insertions(+), 175 deletions(-) rename src/java/org/mxchange/jjobs/{beans/ejb => enterprise}/BaseJobsEnterpriseBean.java (99%) diff --git a/src/java/org/mxchange/jcontacts/model/contact/JobsAdminContactSessionBean.java b/src/java/org/mxchange/jcontacts/model/contact/JobsAdminContactSessionBean.java index 4501968..9513937 100644 --- a/src/java/org/mxchange/jcontacts/model/contact/JobsAdminContactSessionBean.java +++ b/src/java/org/mxchange/jcontacts/model/contact/JobsAdminContactSessionBean.java @@ -23,7 +23,7 @@ import javax.persistence.NoResultException; import javax.persistence.Query; import org.mxchange.jcontacts.exceptions.ContactAlreadyAddedException; import org.mxchange.jcontacts.exceptions.ContactNotFoundException; -import org.mxchange.jjobs.beans.ejb.BaseJobsEnterpriseBean; +import org.mxchange.jjobs.enterprise.BaseJobsEnterpriseBean; /** * An administrative contact EJB diff --git a/src/java/org/mxchange/jcontacts/model/contact/JobsContactSessionBean.java b/src/java/org/mxchange/jcontacts/model/contact/JobsContactSessionBean.java index 4a92d19..4e3fe0b 100644 --- a/src/java/org/mxchange/jcontacts/model/contact/JobsContactSessionBean.java +++ b/src/java/org/mxchange/jcontacts/model/contact/JobsContactSessionBean.java @@ -24,7 +24,7 @@ import javax.ejb.Stateless; import javax.persistence.NoResultException; import javax.persistence.Query; import org.mxchange.jcontacts.exceptions.ContactNotFoundException; -import org.mxchange.jjobs.beans.ejb.BaseJobsEnterpriseBean; +import org.mxchange.jjobs.enterprise.BaseJobsEnterpriseBean; /** * A contact EJB diff --git a/src/java/org/mxchange/jcontacts/model/phone/JobsAdminContactPhoneSessionBean.java b/src/java/org/mxchange/jcontacts/model/phone/JobsAdminContactPhoneSessionBean.java index f49b690..87d2819 100644 --- a/src/java/org/mxchange/jcontacts/model/phone/JobsAdminContactPhoneSessionBean.java +++ b/src/java/org/mxchange/jcontacts/model/phone/JobsAdminContactPhoneSessionBean.java @@ -22,7 +22,7 @@ import java.util.Objects; import javax.ejb.EJB; import javax.ejb.Stateless; import org.mxchange.jcontacts.model.contact.ContactSessionBeanRemote; -import org.mxchange.jjobs.beans.ejb.BaseJobsEnterpriseBean; +import org.mxchange.jjobs.enterprise.BaseJobsEnterpriseBean; import org.mxchange.jphone.exceptions.phone.PhoneNumberAlreadyLinkedException; import org.mxchange.jphone.exceptions.phone.PhoneNumberNotLinkedException; import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber; @@ -57,7 +57,7 @@ public class JobsAdminContactPhoneSessionBean extends BaseJobsEnterpriseBean imp } @Override - public org.mxchange.jcontacts.model.contact.Contact linkExistingFaxNumberWithContact (final org.mxchange.jcontacts.model.contact.Contact contact, final org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber faxNumber) throws PhoneNumberAlreadyLinkedException { + public Contact linkExistingFaxNumberWithContact (final Contact contact, final DialableFaxNumber faxNumber) throws PhoneNumberAlreadyLinkedException { // Trace message this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.linkExistingFaxNumberWithContact: contact={1},faxNumber={2} - CALLED!", this.getClass().getSimpleName(), contact, faxNumber)); //NOI18N @@ -71,7 +71,7 @@ public class JobsAdminContactPhoneSessionBean extends BaseJobsEnterpriseBean imp } else if (contact.getContactId() < 1) { // Invalid id number throw new IllegalArgumentException(MessageFormat.format("contact.contactId={0} is not valid.", contact.getContactId())); //NOI18N - } else if (contact.getContactFaxNumber() instanceof org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber) { + } else if (contact.getContactFaxNumber() instanceof DialableFaxNumber) { // Not set cell phone instance throw new PhoneNumberAlreadyLinkedException(faxNumber); } else if (null == faxNumber) { @@ -104,7 +104,7 @@ public class JobsAdminContactPhoneSessionBean extends BaseJobsEnterpriseBean imp contact.setContactFaxNumber(faxNumber); // Update database - final org.mxchange.jcontacts.model.contact.Contact updatedContact = this.contactBean.updateContactData(contact); + final Contact updatedContact = this.contactBean.updateContactData(contact); // Trace message this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.linkExistingFaxNumberWithContact: updatedContact={1} - EXIT!", this.getClass().getSimpleName(), updatedContact)); //NOI18N @@ -114,7 +114,7 @@ public class JobsAdminContactPhoneSessionBean extends BaseJobsEnterpriseBean imp } @Override - public org.mxchange.jcontacts.model.contact.Contact linkExistingLandLineNumberWithContact (final org.mxchange.jcontacts.model.contact.Contact contact, final org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber landLineNumber) throws PhoneNumberAlreadyLinkedException { + public Contact linkExistingLandLineNumberWithContact (final Contact contact, final DialableLandLineNumber landLineNumber) throws PhoneNumberAlreadyLinkedException { // Trace message this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.linkExistingLandLineNumberWithContact: contact={1},landLineNumber={2} - CALLED!", this.getClass().getSimpleName(), contact, landLineNumber)); //NOI18N @@ -128,7 +128,7 @@ public class JobsAdminContactPhoneSessionBean extends BaseJobsEnterpriseBean imp } else if (contact.getContactId() < 1) { // Invalid id number throw new IllegalArgumentException(MessageFormat.format("contact.contactId={0} is not valid.", contact.getContactId())); //NOI18N - } else if (contact.getContactLandLineNumber() instanceof org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber) { + } else if (contact.getContactLandLineNumber() instanceof DialableLandLineNumber) { // Not set cell phone instance throw new PhoneNumberAlreadyLinkedException(landLineNumber); } else if (null == landLineNumber) { @@ -161,7 +161,7 @@ public class JobsAdminContactPhoneSessionBean extends BaseJobsEnterpriseBean imp contact.setContactLandLineNumber(landLineNumber); // Update database - final org.mxchange.jcontacts.model.contact.Contact updatedContact = this.contactBean.updateContactData(contact); + final Contact updatedContact = this.contactBean.updateContactData(contact); // Trace message this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.linkExistingLandLineNumberWithContact: updatedContact={1} - EXIT!", this.getClass().getSimpleName(), updatedContact)); //NOI18N @@ -171,7 +171,7 @@ public class JobsAdminContactPhoneSessionBean extends BaseJobsEnterpriseBean imp } @Override - public org.mxchange.jcontacts.model.contact.Contact linkExistingMobileNumberWithContact (final org.mxchange.jcontacts.model.contact.Contact contact, final org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber mobileNumber) throws PhoneNumberAlreadyLinkedException { + public Contact linkExistingMobileNumberWithContact (final Contact contact, final DialableMobileNumber mobileNumber) throws PhoneNumberAlreadyLinkedException { // Trace message this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.linkExistingMobileNumberWithContact: contact={1},mobileNumber={2} - CALLED!", this.getClass().getSimpleName(), contact, mobileNumber)); //NOI18N @@ -185,7 +185,7 @@ public class JobsAdminContactPhoneSessionBean extends BaseJobsEnterpriseBean imp } else if (contact.getContactId() < 1) { // Invalid id number throw new IllegalArgumentException(MessageFormat.format("contact.contactId={0} is not valid.", contact.getContactId())); //NOI18N - } else if (contact.getContactMobileNumber() instanceof org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber) { + } else if (contact.getContactMobileNumber() instanceof DialableMobileNumber) { // Not set cell phone instance throw new PhoneNumberAlreadyLinkedException(mobileNumber); } else if (null == mobileNumber) { @@ -212,7 +212,7 @@ public class JobsAdminContactPhoneSessionBean extends BaseJobsEnterpriseBean imp contact.setContactMobileNumber(mobileNumber); // Update database - final org.mxchange.jcontacts.model.contact.Contact updatedContact = this.contactBean.updateContactData(contact); + final Contact updatedContact = this.contactBean.updateContactData(contact); // Trace message this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.linkExistingMobileNumberWithContact: updatedContact={1} - EXIT!", this.getClass().getSimpleName(), updatedContact)); //NOI18N @@ -222,7 +222,7 @@ public class JobsAdminContactPhoneSessionBean extends BaseJobsEnterpriseBean imp } @Override - public org.mxchange.jcontacts.model.contact.Contact linkNewFaxNumberWithContact (final org.mxchange.jcontacts.model.contact.Contact contact, final org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber faxNumber) throws PhoneNumberAlreadyLinkedException { + public Contact linkNewFaxNumberWithContact (final Contact contact, final DialableFaxNumber faxNumber) throws PhoneNumberAlreadyLinkedException { // Trace message this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.linkNewFaxNumberWithContact: contact={1},faxNumber={2} - CALLED!", this.getClass().getSimpleName(), contact, faxNumber)); //NOI18N @@ -236,7 +236,7 @@ public class JobsAdminContactPhoneSessionBean extends BaseJobsEnterpriseBean imp } else if (contact.getContactId() < 1) { // Invalid id number throw new IllegalArgumentException(MessageFormat.format("contact.contactId={0} is not valid.", contact.getContactId())); //NOI18N - } else if (contact.getContactFaxNumber() instanceof org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber) { + } else if (contact.getContactFaxNumber() instanceof DialableFaxNumber) { // Not set cell phone instance throw new PhoneNumberAlreadyLinkedException(faxNumber); } else if (null == faxNumber) { @@ -269,7 +269,7 @@ public class JobsAdminContactPhoneSessionBean extends BaseJobsEnterpriseBean imp contact.setContactFaxNumber(faxNumber); // Update database - final org.mxchange.jcontacts.model.contact.Contact updatedContact = this.contactBean.updateContactData(contact); + final Contact updatedContact = this.contactBean.updateContactData(contact); // Trace message this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.linkNewFaxNumberWithContact: updatedContact={1} - EXIT!", this.getClass().getSimpleName(), updatedContact)); //NOI18N @@ -279,7 +279,7 @@ public class JobsAdminContactPhoneSessionBean extends BaseJobsEnterpriseBean imp } @Override - public org.mxchange.jcontacts.model.contact.Contact linkNewLandLineNumberWithContact (final org.mxchange.jcontacts.model.contact.Contact contact, final org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber landLineNumber) throws PhoneNumberAlreadyLinkedException { + public Contact linkNewLandLineNumberWithContact (final Contact contact, final DialableLandLineNumber landLineNumber) throws PhoneNumberAlreadyLinkedException { // Trace message this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.linkNewLandLineNumberWithContact: contact={1},landLineNumber={2} - CALLED!", this.getClass().getSimpleName(), contact, landLineNumber)); //NOI18N @@ -293,7 +293,7 @@ public class JobsAdminContactPhoneSessionBean extends BaseJobsEnterpriseBean imp } else if (contact.getContactId() < 1) { // Invalid id number throw new IllegalArgumentException(MessageFormat.format("contact.contactId={0} is not valid.", contact.getContactId())); //NOI18N - } else if (contact.getContactLandLineNumber() instanceof org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber) { + } else if (contact.getContactLandLineNumber() instanceof DialableLandLineNumber) { // Not set cell phone instance throw new PhoneNumberAlreadyLinkedException(landLineNumber); } else if (null == landLineNumber) { @@ -326,7 +326,7 @@ public class JobsAdminContactPhoneSessionBean extends BaseJobsEnterpriseBean imp contact.setContactLandLineNumber(landLineNumber); // Update database - final org.mxchange.jcontacts.model.contact.Contact updatedContact = this.contactBean.updateContactData(contact); + final Contact updatedContact = this.contactBean.updateContactData(contact); // Trace message this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.linkNewLandLineNumberWithContact: updatedContact={1} - EXIT!", this.getClass().getSimpleName(), updatedContact)); //NOI18N @@ -336,7 +336,7 @@ public class JobsAdminContactPhoneSessionBean extends BaseJobsEnterpriseBean imp } @Override - public org.mxchange.jcontacts.model.contact.Contact linkNewMobileNumberWithContact (final org.mxchange.jcontacts.model.contact.Contact contact, final org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber mobileNumber) throws PhoneNumberAlreadyLinkedException { + public Contact linkNewMobileNumberWithContact (final Contact contact, final DialableMobileNumber mobileNumber) throws PhoneNumberAlreadyLinkedException { // Trace message this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.linkNewMobileNumberWithContact: contact={1},mobileNumber={2} - CALLED!", this.getClass().getSimpleName(), contact, mobileNumber)); //NOI18N @@ -350,7 +350,7 @@ public class JobsAdminContactPhoneSessionBean extends BaseJobsEnterpriseBean imp } else if (contact.getContactId() < 1) { // Invalid id number throw new IllegalArgumentException(MessageFormat.format("contact.contactId={0} is not valid.", contact.getContactId())); //NOI18N - } else if (contact.getContactMobileNumber() instanceof org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber) { + } else if (contact.getContactMobileNumber() instanceof DialableMobileNumber) { // Not set cell phone instance throw new PhoneNumberAlreadyLinkedException(mobileNumber); } else if (null == mobileNumber) { @@ -377,7 +377,7 @@ public class JobsAdminContactPhoneSessionBean extends BaseJobsEnterpriseBean imp contact.setContactMobileNumber(mobileNumber); // Update database - final org.mxchange.jcontacts.model.contact.Contact updatedContact = this.contactBean.updateContactData(contact); + final Contact updatedContact = this.contactBean.updateContactData(contact); // Trace message this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.linkNewMobileNumberWithContact: updatedContact={1} - EXIT!", this.getClass().getSimpleName(), updatedContact)); //NOI18N @@ -387,7 +387,7 @@ public class JobsAdminContactPhoneSessionBean extends BaseJobsEnterpriseBean imp } @Override - public org.mxchange.jcontacts.model.contact.Contact unlinkFaxDataFromContact (final org.mxchange.jcontacts.model.contact.Contact contact, final org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber faxNumber) throws PhoneNumberNotLinkedException { + public Contact unlinkFaxDataFromContact (final Contact contact, final DialableFaxNumber faxNumber) throws PhoneNumberNotLinkedException { // Trace message this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.unlinkFaxDataFromContact: contact={1},faxNumber={2} - CALLED!", this.getClass().getSimpleName(), contact, faxNumber)); //NOI18N @@ -419,7 +419,7 @@ public class JobsAdminContactPhoneSessionBean extends BaseJobsEnterpriseBean imp contact.setContactFaxNumber(null); // Update database - final org.mxchange.jcontacts.model.contact.Contact updatedContact = this.contactBean.updateContactData(contact); + final Contact updatedContact = this.contactBean.updateContactData(contact); // Trace message this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.unlinkFaxDataFromContact: updatedContact={1} - EXIT!", this.getClass().getSimpleName(), updatedContact)); //NOI18N @@ -429,7 +429,7 @@ public class JobsAdminContactPhoneSessionBean extends BaseJobsEnterpriseBean imp } @Override - public org.mxchange.jcontacts.model.contact.Contact unlinkLandLineDataFromContact (final org.mxchange.jcontacts.model.contact.Contact contact, final org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber landLineNumber) throws PhoneNumberNotLinkedException { + public Contact unlinkLandLineDataFromContact (final Contact contact, final DialableLandLineNumber landLineNumber) throws PhoneNumberNotLinkedException { // Trace message this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.unlinkLandLineDataFromContact: contact={1},landLineNumber={2} - CALLED!", this.getClass().getSimpleName(), contact, landLineNumber)); //NOI18N @@ -461,7 +461,7 @@ public class JobsAdminContactPhoneSessionBean extends BaseJobsEnterpriseBean imp contact.setContactLandLineNumber(null); // Update database - final org.mxchange.jcontacts.model.contact.Contact updatedContact = this.contactBean.updateContactData(contact); + final Contact updatedContact = this.contactBean.updateContactData(contact); // Trace message this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.unlinkLandLineDataFromContact: updatedContact={1} - EXIT!", this.getClass().getSimpleName(), updatedContact)); //NOI18N @@ -471,7 +471,7 @@ public class JobsAdminContactPhoneSessionBean extends BaseJobsEnterpriseBean imp } @Override - public org.mxchange.jcontacts.model.contact.Contact unlinkMobileDataFromContact (final org.mxchange.jcontacts.model.contact.Contact contact, final org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber mobileNumber) throws PhoneNumberNotLinkedException { + public Contact unlinkMobileDataFromContact (final Contact contact, final DialableMobileNumber mobileNumber) throws PhoneNumberNotLinkedException { // Trace message this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.unlinkMobileDataFromContact: contact={1},mobileNumber={2} - CALLED!", this.getClass().getSimpleName(), contact, mobileNumber)); //NOI18N @@ -503,7 +503,7 @@ public class JobsAdminContactPhoneSessionBean extends BaseJobsEnterpriseBean imp contact.setContactMobileNumber(null); // Update database - final org.mxchange.jcontacts.model.contact.Contact updatedContact = this.contactBean.updateContactData(contact); + final Contact updatedContact = this.contactBean.updateContactData(contact); // Trace message this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.unlinkMobileDataFromContact: updatedContact={1} - EXIT!", this.getClass().getSimpleName(), updatedContact)); //NOI18N diff --git a/src/java/org/mxchange/jcontactsbusiness/model/basicdata/JobsAdminBusinessDataSessionBean.java b/src/java/org/mxchange/jcontactsbusiness/model/basicdata/JobsAdminBusinessDataSessionBean.java index 12846c0..c67d856 100644 --- a/src/java/org/mxchange/jcontactsbusiness/model/basicdata/JobsAdminBusinessDataSessionBean.java +++ b/src/java/org/mxchange/jcontactsbusiness/model/basicdata/JobsAdminBusinessDataSessionBean.java @@ -25,7 +25,7 @@ import javax.ejb.Stateless; import org.mxchange.jcontactsbusiness.exceptions.basicdata.BasicDataAlreadyAddedException; import org.mxchange.jcontactsbusiness.model.employee.Employable; import org.mxchange.jcontactsbusiness.model.headquarter.Headquarter; -import org.mxchange.jjobs.beans.ejb.BaseJobsEnterpriseBean; +import org.mxchange.jjobs.enterprise.BaseJobsEnterpriseBean; import org.mxchange.jusercore.model.user.User; /** diff --git a/src/java/org/mxchange/jcontactsbusiness/model/basicdata/JobsBusinessDataSessionBean.java b/src/java/org/mxchange/jcontactsbusiness/model/basicdata/JobsBusinessDataSessionBean.java index cda0402..3b0082a 100644 --- a/src/java/org/mxchange/jcontactsbusiness/model/basicdata/JobsBusinessDataSessionBean.java +++ b/src/java/org/mxchange/jcontactsbusiness/model/basicdata/JobsBusinessDataSessionBean.java @@ -20,7 +20,7 @@ import java.text.MessageFormat; import java.util.List; import javax.ejb.Stateless; import javax.persistence.Query; -import org.mxchange.jjobs.beans.ejb.BaseJobsEnterpriseBean; +import org.mxchange.jjobs.enterprise.BaseJobsEnterpriseBean; /** * A stateless session bean for business data diff --git a/src/java/org/mxchange/jcontactsbusiness/model/branchoffice/JobsAdminBranchOfficeSessionBean.java b/src/java/org/mxchange/jcontactsbusiness/model/branchoffice/JobsAdminBranchOfficeSessionBean.java index adbc830..96c1ea4 100644 --- a/src/java/org/mxchange/jcontactsbusiness/model/branchoffice/JobsAdminBranchOfficeSessionBean.java +++ b/src/java/org/mxchange/jcontactsbusiness/model/branchoffice/JobsAdminBranchOfficeSessionBean.java @@ -25,7 +25,7 @@ import org.mxchange.jcontactsbusiness.exceptions.branchoffice.BranchOfficeAlread import org.mxchange.jcontactsbusiness.model.basicdata.BasicData; import org.mxchange.jcontactsbusiness.model.opening_time.OpeningTime; import org.mxchange.jcountry.model.data.Country; -import org.mxchange.jjobs.beans.ejb.BaseJobsEnterpriseBean; +import org.mxchange.jjobs.enterprise.BaseJobsEnterpriseBean; import org.mxchange.jusercore.model.user.User; /** @@ -94,9 +94,9 @@ public class JobsAdminBranchOfficeSessionBean extends BaseJobsEnterpriseBean imp } // Is user instance set? - if (branchOffice.getBranchCountry() instanceof org.mxchange.jcountry.model.data.Country) { + if (branchOffice.getBranchCountry() instanceof Country) { // Get managed instance back - final org.mxchange.jcountry.model.data.Country managedCountry = this.createManaged(branchOffice.getBranchCountry()); + final Country managedCountry = this.createManaged(branchOffice.getBranchCountry()); // Set it back in branch office branchOffice.setBranchCountry(managedCountry); diff --git a/src/java/org/mxchange/jcontactsbusiness/model/branchoffice/JobsBranchOfficeSessionBean.java b/src/java/org/mxchange/jcontactsbusiness/model/branchoffice/JobsBranchOfficeSessionBean.java index d255fe7..0550f3a 100644 --- a/src/java/org/mxchange/jcontactsbusiness/model/branchoffice/JobsBranchOfficeSessionBean.java +++ b/src/java/org/mxchange/jcontactsbusiness/model/branchoffice/JobsBranchOfficeSessionBean.java @@ -20,7 +20,7 @@ import java.text.MessageFormat; import java.util.List; import javax.ejb.Stateless; import javax.persistence.Query; -import org.mxchange.jjobs.beans.ejb.BaseJobsEnterpriseBean; +import org.mxchange.jjobs.enterprise.BaseJobsEnterpriseBean; /** * A stateless session bean for general branch office purposes diff --git a/src/java/org/mxchange/jcontactsbusiness/model/department/JobsAdminDepartmentSessionBean.java b/src/java/org/mxchange/jcontactsbusiness/model/department/JobsAdminDepartmentSessionBean.java index 6a8cb26..8427f84 100644 --- a/src/java/org/mxchange/jcontactsbusiness/model/department/JobsAdminDepartmentSessionBean.java +++ b/src/java/org/mxchange/jcontactsbusiness/model/department/JobsAdminDepartmentSessionBean.java @@ -26,7 +26,7 @@ import org.mxchange.jcontactsbusiness.model.basicdata.BasicData; import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice; import org.mxchange.jcontactsbusiness.model.employee.Employable; import org.mxchange.jcontactsbusiness.model.headquarter.Headquarter; -import org.mxchange.jjobs.beans.ejb.BaseJobsEnterpriseBean; +import org.mxchange.jjobs.enterprise.BaseJobsEnterpriseBean; import org.mxchange.jusercore.model.user.User; /** diff --git a/src/java/org/mxchange/jcontactsbusiness/model/department/JobsDepartmentSessionBean.java b/src/java/org/mxchange/jcontactsbusiness/model/department/JobsDepartmentSessionBean.java index 1501b58..935d5a0 100644 --- a/src/java/org/mxchange/jcontactsbusiness/model/department/JobsDepartmentSessionBean.java +++ b/src/java/org/mxchange/jcontactsbusiness/model/department/JobsDepartmentSessionBean.java @@ -20,7 +20,7 @@ import java.text.MessageFormat; import java.util.List; import javax.ejb.Stateless; import javax.persistence.Query; -import org.mxchange.jjobs.beans.ejb.BaseJobsEnterpriseBean; +import org.mxchange.jjobs.enterprise.BaseJobsEnterpriseBean; /** * A stateless session bean for general department purposes diff --git a/src/java/org/mxchange/jcontactsbusiness/model/employee/JobsAdminCompanyEmployeeSessionBean.java b/src/java/org/mxchange/jcontactsbusiness/model/employee/JobsAdminCompanyEmployeeSessionBean.java index 0d3cb6d..cc808c6 100644 --- a/src/java/org/mxchange/jcontactsbusiness/model/employee/JobsAdminCompanyEmployeeSessionBean.java +++ b/src/java/org/mxchange/jcontactsbusiness/model/employee/JobsAdminCompanyEmployeeSessionBean.java @@ -26,7 +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.jjobs.beans.ejb.BaseJobsEnterpriseBean; +import org.mxchange.jjobs.enterprise.BaseJobsEnterpriseBean; import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber; import org.mxchange.jphone.model.phonenumbers.mobileprovider.MobileProvider; import org.mxchange.jusercore.model.user.User; diff --git a/src/java/org/mxchange/jcontactsbusiness/model/employee/JobsCompanyEmployeeSessionBean.java b/src/java/org/mxchange/jcontactsbusiness/model/employee/JobsCompanyEmployeeSessionBean.java index d505a61..5f7aa67 100644 --- a/src/java/org/mxchange/jcontactsbusiness/model/employee/JobsCompanyEmployeeSessionBean.java +++ b/src/java/org/mxchange/jcontactsbusiness/model/employee/JobsCompanyEmployeeSessionBean.java @@ -20,7 +20,7 @@ import java.text.MessageFormat; import java.util.List; import javax.ejb.Stateless; import javax.persistence.Query; -import org.mxchange.jjobs.beans.ejb.BaseJobsEnterpriseBean; +import org.mxchange.jjobs.enterprise.BaseJobsEnterpriseBean; /** * A stateless bean for general purposes for company employees. diff --git a/src/java/org/mxchange/jcontactsbusiness/model/headquarter/JobsAdminHeadquarterSessionBean.java b/src/java/org/mxchange/jcontactsbusiness/model/headquarter/JobsAdminHeadquarterSessionBean.java index 7f6e77d..5b6df01 100644 --- a/src/java/org/mxchange/jcontactsbusiness/model/headquarter/JobsAdminHeadquarterSessionBean.java +++ b/src/java/org/mxchange/jcontactsbusiness/model/headquarter/JobsAdminHeadquarterSessionBean.java @@ -24,7 +24,7 @@ import javax.ejb.Stateless; import org.mxchange.jcontactsbusiness.exceptions.headquarter.HeadquarterAlreadyAddedException; import org.mxchange.jcontactsbusiness.model.opening_time.OpeningTime; import org.mxchange.jcountry.model.data.Country; -import org.mxchange.jjobs.beans.ejb.BaseJobsEnterpriseBean; +import org.mxchange.jjobs.enterprise.BaseJobsEnterpriseBean; import org.mxchange.jusercore.model.user.User; /** diff --git a/src/java/org/mxchange/jcontactsbusiness/model/headquarter/JobsHeadquarterSessionBean.java b/src/java/org/mxchange/jcontactsbusiness/model/headquarter/JobsHeadquarterSessionBean.java index 85a1417..56574da 100644 --- a/src/java/org/mxchange/jcontactsbusiness/model/headquarter/JobsHeadquarterSessionBean.java +++ b/src/java/org/mxchange/jcontactsbusiness/model/headquarter/JobsHeadquarterSessionBean.java @@ -20,7 +20,7 @@ import java.text.MessageFormat; import java.util.List; import javax.ejb.Stateless; import javax.persistence.Query; -import org.mxchange.jjobs.beans.ejb.BaseJobsEnterpriseBean; +import org.mxchange.jjobs.enterprise.BaseJobsEnterpriseBean; /** * A stateless session bean for general headquarter purposes diff --git a/src/java/org/mxchange/jcontactsbusiness/model/opening_time/JobsAdminOpeningTimesSessionBean.java b/src/java/org/mxchange/jcontactsbusiness/model/opening_time/JobsAdminOpeningTimesSessionBean.java index bc266c1..4eb66a3 100644 --- a/src/java/org/mxchange/jcontactsbusiness/model/opening_time/JobsAdminOpeningTimesSessionBean.java +++ b/src/java/org/mxchange/jcontactsbusiness/model/opening_time/JobsAdminOpeningTimesSessionBean.java @@ -19,7 +19,7 @@ package org.mxchange.jcontactsbusiness.model.opening_time; import java.text.MessageFormat; import java.util.Date; import javax.ejb.Stateless; -import org.mxchange.jjobs.beans.ejb.BaseJobsEnterpriseBean; +import org.mxchange.jjobs.enterprise.BaseJobsEnterpriseBean; /** * A stateless session bean for administrative opening times purposes diff --git a/src/java/org/mxchange/jcontactsbusiness/model/opening_time/JobsOpeningTimesSessionBean.java b/src/java/org/mxchange/jcontactsbusiness/model/opening_time/JobsOpeningTimesSessionBean.java index 82444dc..e3b1e6b 100644 --- a/src/java/org/mxchange/jcontactsbusiness/model/opening_time/JobsOpeningTimesSessionBean.java +++ b/src/java/org/mxchange/jcontactsbusiness/model/opening_time/JobsOpeningTimesSessionBean.java @@ -20,7 +20,7 @@ import java.text.MessageFormat; import java.util.List; import javax.ejb.Stateless; import javax.persistence.Query; -import org.mxchange.jjobs.beans.ejb.BaseJobsEnterpriseBean; +import org.mxchange.jjobs.enterprise.BaseJobsEnterpriseBean; /** * A stateless session bean for general opening times purposes diff --git a/src/java/org/mxchange/jcountry/model/data/JobsAdminCountrySingletonBean.java b/src/java/org/mxchange/jcountry/model/data/JobsAdminCountrySingletonBean.java index b4ee6da..d041096 100644 --- a/src/java/org/mxchange/jcountry/model/data/JobsAdminCountrySingletonBean.java +++ b/src/java/org/mxchange/jcountry/model/data/JobsAdminCountrySingletonBean.java @@ -22,7 +22,7 @@ import javax.ejb.Stateless; import javax.persistence.NoResultException; import javax.persistence.Query; import org.mxchange.jcountry.exceptions.CountryAlreadyAddedException; -import org.mxchange.jjobs.beans.ejb.BaseJobsEnterpriseBean; +import org.mxchange.jjobs.enterprise.BaseJobsEnterpriseBean; /** * A stateless EJB for administrative country purposes diff --git a/src/java/org/mxchange/jcountry/model/data/JobsCountrySingletonBean.java b/src/java/org/mxchange/jcountry/model/data/JobsCountrySingletonBean.java index 8220021..4350d5d 100644 --- a/src/java/org/mxchange/jcountry/model/data/JobsCountrySingletonBean.java +++ b/src/java/org/mxchange/jcountry/model/data/JobsCountrySingletonBean.java @@ -21,7 +21,7 @@ import java.util.List; import javax.ejb.Singleton; import javax.ejb.Startup; import javax.persistence.Query; -import org.mxchange.jjobs.beans.ejb.BaseJobsEnterpriseBean; +import org.mxchange.jjobs.enterprise.BaseJobsEnterpriseBean; /** * A singleton EJB for country informations diff --git a/src/java/org/mxchange/jjobs/beans/ejb/BaseJobsEnterpriseBean.java b/src/java/org/mxchange/jjobs/enterprise/BaseJobsEnterpriseBean.java similarity index 99% rename from src/java/org/mxchange/jjobs/beans/ejb/BaseJobsEnterpriseBean.java rename to src/java/org/mxchange/jjobs/enterprise/BaseJobsEnterpriseBean.java index fbe1a43..4b1714a 100644 --- a/src/java/org/mxchange/jjobs/beans/ejb/BaseJobsEnterpriseBean.java +++ b/src/java/org/mxchange/jjobs/enterprise/BaseJobsEnterpriseBean.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.mxchange.jjobs.beans.ejb; +package org.mxchange.jjobs.enterprise; import java.text.MessageFormat; import java.util.Date; diff --git a/src/java/org/mxchange/jjobs/model/addressbook/JobsAddressbookSessionBean.java b/src/java/org/mxchange/jjobs/model/addressbook/JobsAddressbookSessionBean.java index b5730d8..31f97c3 100644 --- a/src/java/org/mxchange/jjobs/model/addressbook/JobsAddressbookSessionBean.java +++ b/src/java/org/mxchange/jjobs/model/addressbook/JobsAddressbookSessionBean.java @@ -28,7 +28,7 @@ import org.mxchange.jaddressbook.exceptions.AddressbookNotFoundException; import org.mxchange.jaddressbook.model.addressbook.Addressbook; import org.mxchange.jaddressbook.model.addressbook.UserAddressbook; import org.mxchange.jaddressbook.model.addressbook.entry.AddressbookEntry; -import org.mxchange.jjobs.beans.ejb.BaseJobsEnterpriseBean; +import org.mxchange.jjobs.enterprise.BaseJobsEnterpriseBean; import org.mxchange.jusercore.model.user.User; /** diff --git a/src/java/org/mxchange/jphone/model/phonenumbers/mobileprovider/JobsAdminMobileProviderSessionBean.java b/src/java/org/mxchange/jphone/model/phonenumbers/mobileprovider/JobsAdminMobileProviderSessionBean.java index 20907b5..4919f86 100644 --- a/src/java/org/mxchange/jphone/model/phonenumbers/mobileprovider/JobsAdminMobileProviderSessionBean.java +++ b/src/java/org/mxchange/jphone/model/phonenumbers/mobileprovider/JobsAdminMobileProviderSessionBean.java @@ -19,7 +19,7 @@ package org.mxchange.jphone.model.phonenumbers.mobileprovider; import java.text.MessageFormat; import java.util.Date; import javax.ejb.Stateless; -import org.mxchange.jjobs.beans.ejb.BaseJobsEnterpriseBean; +import org.mxchange.jjobs.enterprise.BaseJobsEnterpriseBean; import org.mxchange.jphone.exceptions.mobileprovider.MobileProviderAlreadyAddedException; /** diff --git a/src/java/org/mxchange/jphone/model/phonenumbers/mobileprovider/JobsMobileProviderSingletonBean.java b/src/java/org/mxchange/jphone/model/phonenumbers/mobileprovider/JobsMobileProviderSingletonBean.java index 4684721..08ae441 100644 --- a/src/java/org/mxchange/jphone/model/phonenumbers/mobileprovider/JobsMobileProviderSingletonBean.java +++ b/src/java/org/mxchange/jphone/model/phonenumbers/mobileprovider/JobsMobileProviderSingletonBean.java @@ -21,7 +21,7 @@ import java.util.List; import javax.ejb.Singleton; import javax.ejb.Startup; import javax.persistence.Query; -import org.mxchange.jjobs.beans.ejb.BaseJobsEnterpriseBean; +import org.mxchange.jjobs.enterprise.BaseJobsEnterpriseBean; /** * A singleton EJB for mobile provider informations diff --git a/src/java/org/mxchange/jphone/model/phonenumbers/phone/JobsAdminPhoneSessionBean.java b/src/java/org/mxchange/jphone/model/phonenumbers/phone/JobsAdminPhoneSessionBean.java index 5eb9c37..f935f61 100644 --- a/src/java/org/mxchange/jphone/model/phonenumbers/phone/JobsAdminPhoneSessionBean.java +++ b/src/java/org/mxchange/jphone/model/phonenumbers/phone/JobsAdminPhoneSessionBean.java @@ -19,9 +19,13 @@ package org.mxchange.jphone.model.phonenumbers.phone; import java.text.MessageFormat; import java.util.Date; import javax.ejb.Stateless; -import org.mxchange.jjobs.beans.ejb.BaseJobsEnterpriseBean; +import org.mxchange.jjobs.enterprise.BaseJobsEnterpriseBean; +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; /** @@ -46,7 +50,7 @@ public class JobsAdminPhoneSessionBean extends BaseJobsEnterpriseBean implements } @Override - public void deleteFaxData (final org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber faxNumber) { + public void deleteFaxData (final DialableFaxNumber faxNumber) { // Trace message this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.deleteFaxData: faxNumber={1} - CALLED!", this.getClass().getSimpleName(), faxNumber)); @@ -84,7 +88,7 @@ public class JobsAdminPhoneSessionBean extends BaseJobsEnterpriseBean implements } // Get a managed instance - final org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber managedNumber = this.getEntityManager().getReference(faxNumber.getClass(), faxNumber.getPhoneId()); + final DialableFaxNumber managedNumber = this.getEntityManager().getReference(faxNumber.getClass(), faxNumber.getPhoneId()); // Remove it from database this.getEntityManager().remove(managedNumber); @@ -94,7 +98,7 @@ public class JobsAdminPhoneSessionBean extends BaseJobsEnterpriseBean implements } @Override - public void deleteLandLineData (final org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber landLineNumber) { + public void deleteLandLineData (final DialableLandLineNumber landLineNumber) { // Trace message this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.deleteLandLineData: landLineNumber={1} - CALLED!", this.getClass().getSimpleName(), landLineNumber)); @@ -132,7 +136,7 @@ public class JobsAdminPhoneSessionBean extends BaseJobsEnterpriseBean implements } // Get a managed instance - final org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber managedNumber = this.getEntityManager().getReference(landLineNumber.getClass(), landLineNumber.getPhoneId()); + final DialableLandLineNumber managedNumber = this.getEntityManager().getReference(landLineNumber.getClass(), landLineNumber.getPhoneId()); // Remove it from database this.getEntityManager().remove(managedNumber); @@ -142,7 +146,7 @@ public class JobsAdminPhoneSessionBean extends BaseJobsEnterpriseBean implements } @Override - public void deleteMobileData (final org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber mobileNumber) { + public void deleteMobileData (final DialableMobileNumber mobileNumber) { // Trace message this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.deleteMobileData: mobileNumber={1} - CALLED!", this.getClass().getSimpleName(), mobileNumber)); @@ -174,7 +178,7 @@ public class JobsAdminPhoneSessionBean extends BaseJobsEnterpriseBean implements } // Get a managed instance - final org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber managedNumber = this.getEntityManager().getReference(mobileNumber.getClass(), mobileNumber.getPhoneId()); + final DialableMobileNumber managedNumber = this.getEntityManager().getReference(mobileNumber.getClass(), mobileNumber.getPhoneId()); // Remove it from database this.getEntityManager().remove(managedNumber); @@ -184,7 +188,7 @@ public class JobsAdminPhoneSessionBean extends BaseJobsEnterpriseBean implements } @Override - public org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber updateFaxData (final org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber faxNumber) { + public DialableFaxNumber updateFaxData (final DialableFaxNumber faxNumber) { // Trace message this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateFaxData: faxNumber={1} - CALLED!", this.getClass().getSimpleName(), faxNumber)); @@ -222,10 +226,10 @@ public class JobsAdminPhoneSessionBean extends BaseJobsEnterpriseBean implements } // Get contact from it and find it - final org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber managedNumber = this.getEntityManager().find(faxNumber.getClass(), faxNumber.getPhoneId()); + final DialableFaxNumber managedNumber = this.getEntityManager().find(faxNumber.getClass(), faxNumber.getPhoneId()); // Should be found - assert (managedNumber instanceof org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber) : MessageFormat.format("Cell phone number with id {0} not found, but should be.", faxNumber.getPhoneId()); //NOI18N + assert (managedNumber instanceof DialableFaxNumber) : MessageFormat.format("Cell phone number with id {0} not found, but should be.", faxNumber.getPhoneId()); //NOI18N // Debug message this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.updateFaxData: managedNumber.phoneId={1}", this.getClass().getSimpleName(), managedNumber.getPhoneId())); //NOI18N @@ -242,7 +246,7 @@ public class JobsAdminPhoneSessionBean extends BaseJobsEnterpriseBean implements } @Override - public org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber updateLandLineData (final org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber landLineNumber) { + public DialableLandLineNumber updateLandLineData (final DialableLandLineNumber landLineNumber) { // Trace message this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateLandLineData: landLineNumber={1} - CALLED!", this.getClass().getSimpleName(), landLineNumber)); @@ -280,10 +284,10 @@ public class JobsAdminPhoneSessionBean extends BaseJobsEnterpriseBean implements } // Get contact from it and find it - final org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber managedNumber = this.getEntityManager().find(landLineNumber.getClass(), landLineNumber.getPhoneId()); + final DialableLandLineNumber managedNumber = this.getEntityManager().find(landLineNumber.getClass(), landLineNumber.getPhoneId()); // Should be found - assert (managedNumber instanceof org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber) : MessageFormat.format("Cell phone number with id {0} not found, but should be.", landLineNumber.getPhoneId()); //NOI18N + assert (managedNumber instanceof DialableLandLineNumber) : MessageFormat.format("Cell phone number with id {0} not found, but should be.", landLineNumber.getPhoneId()); //NOI18N // Debug message this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.updateLandLineData: managedNumber.phoneId={1}", this.getClass().getSimpleName(), managedNumber.getPhoneId())); //NOI18N @@ -300,7 +304,7 @@ public class JobsAdminPhoneSessionBean extends BaseJobsEnterpriseBean implements } @Override - public org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber updateMobileData (final org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber mobileNumber) { + public DialableMobileNumber updateMobileData (final DialableMobileNumber mobileNumber) { // Trace message this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateMobileData: mobileNumber={1} - CALLED!", this.getClass().getSimpleName(), mobileNumber)); @@ -332,10 +336,10 @@ public class JobsAdminPhoneSessionBean extends BaseJobsEnterpriseBean implements } // Get contact from it and find it - final org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber managedNumber = this.getEntityManager().find(mobileNumber.getClass(), mobileNumber.getPhoneId()); + final DialableMobileNumber managedNumber = this.getEntityManager().find(mobileNumber.getClass(), mobileNumber.getPhoneId()); // Should be found - assert (managedNumber instanceof org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber) : MessageFormat.format("Cell phone number with id {0} not found, but should be.", mobileNumber.getPhoneId()); //NOI18N + assert (managedNumber instanceof DialableMobileNumber) : MessageFormat.format("Cell phone number with id {0} not found, but should be.", mobileNumber.getPhoneId()); //NOI18N // Debug message this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.updateMobileData: managedNumber.phoneId={1}", this.getClass().getSimpleName(), managedNumber.getPhoneId())); //NOI18N diff --git a/src/java/org/mxchange/jphone/model/phonenumbers/phone/JobsPhoneSessionBean.java b/src/java/org/mxchange/jphone/model/phonenumbers/phone/JobsPhoneSessionBean.java index c6a29e4..49bff00 100644 --- a/src/java/org/mxchange/jphone/model/phonenumbers/phone/JobsPhoneSessionBean.java +++ b/src/java/org/mxchange/jphone/model/phonenumbers/phone/JobsPhoneSessionBean.java @@ -20,7 +20,7 @@ import java.text.MessageFormat; import java.util.List; import javax.ejb.Stateless; import javax.persistence.Query; -import org.mxchange.jjobs.beans.ejb.BaseJobsEnterpriseBean; +import org.mxchange.jjobs.enterprise.BaseJobsEnterpriseBean; import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber; import org.mxchange.jphone.model.phonenumbers.fax.FaxNumber; import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber; diff --git a/src/java/org/mxchange/jusercore/model/user/JobsAdminUserSessionBean.java b/src/java/org/mxchange/jusercore/model/user/JobsAdminUserSessionBean.java index ae9c93a..8daa0dc 100644 --- a/src/java/org/mxchange/jusercore/model/user/JobsAdminUserSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/user/JobsAdminUserSessionBean.java @@ -21,7 +21,7 @@ import java.util.Date; import javax.ejb.EJB; import javax.ejb.Stateless; import org.mxchange.jcontacts.model.contact.Contact; -import org.mxchange.jjobs.beans.ejb.BaseJobsEnterpriseBean; +import org.mxchange.jjobs.enterprise.BaseJobsEnterpriseBean; import org.mxchange.jusercore.exceptions.EmailAddressAlreadyRegisteredException; import org.mxchange.jusercore.exceptions.UserNameAlreadyRegisteredException; import org.mxchange.jusercore.exceptions.UserNotFoundException; diff --git a/src/java/org/mxchange/jusercore/model/user/JobsUserSessionBean.java b/src/java/org/mxchange/jusercore/model/user/JobsUserSessionBean.java index 4b060e4..eb12a67 100644 --- a/src/java/org/mxchange/jusercore/model/user/JobsUserSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/user/JobsUserSessionBean.java @@ -27,7 +27,7 @@ import javax.persistence.PersistenceException; import javax.persistence.Query; import org.mxchange.jcontacts.model.contact.Contact; import org.mxchange.jcontacts.model.contact.Contacts; -import org.mxchange.jjobs.beans.ejb.BaseJobsEnterpriseBean; +import org.mxchange.jjobs.enterprise.BaseJobsEnterpriseBean; import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber; import org.mxchange.jphone.model.phonenumbers.fax.FaxNumbers; import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber; diff --git a/src/java/org/mxchange/jusercore/model/user/activity/JobsUserActivityLogMessageBean.java b/src/java/org/mxchange/jusercore/model/user/activity/JobsUserActivityLogMessageBean.java index 1999b58..15dc9bc 100644 --- a/src/java/org/mxchange/jusercore/model/user/activity/JobsUserActivityLogMessageBean.java +++ b/src/java/org/mxchange/jusercore/model/user/activity/JobsUserActivityLogMessageBean.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017, 2018 Free Software Foundation + * Copyright (C) 2016 - 2018 Free Software Foundation * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -16,148 +16,136 @@ */ package org.mxchange.jusercore.model.user.activity; +import java.io.Serializable; import java.text.MessageFormat; -import java.util.List; -import javax.ejb.EJBException; -import javax.ejb.Stateless; +import javax.ejb.ActivationConfigProperty; +import javax.ejb.MessageDriven; import javax.jms.JMSException; +import javax.jms.Message; +import javax.jms.MessageListener; import javax.jms.ObjectMessage; -import javax.persistence.Query; -import org.mxchange.jjobs.beans.ejb.BaseJobsEnterpriseBean; +import org.mxchange.jfinancials.enterprise.BaseJobsEnterpriseBean; import org.mxchange.jusercore.model.user.User; /** - * A stateless, session-scoped EJB for user-activity + * A message-driven bean for adding user activity log *

* @author Roland Häder */ -@Stateless (name = "userActivity", description = "A stateless, session-scored user-activity bean.") -public class JobsUserActivityLogMessageBean extends BaseJobsEnterpriseBean implements UserActivityLogSessionBeanRemote { +@MessageDriven ( + name = "userActivityLog", + description = "A message-driven bean for adding user activity log", + activationConfig = { + @ActivationConfigProperty ( + propertyName = "destinationLookup", + propertyValue = "jms/jfinancials-user-activity-log" + ), + @ActivationConfigProperty ( + propertyName = "destinationType", + propertyValue = "javax.jms.Queue" + ) + } +) +public class JobsUserActivityLogMessageBean extends BaseJobsEnterpriseBean implements MessageListener { /** * Serial number */ - private static final long serialVersionUID = 1_268_376_401_659L; + private static final long serialVersionUID = 14_920_686_785_732_054L; /** * Default constructor */ public JobsUserActivityLogMessageBean () { - // Invoke super constructor - super("jms/jjobs-queue-factory", "jms/jjobs-user-activity-log"); //NOI18N + // Call super constructor + super(); } @Override - public void addUserActivityLog (final LogableUserActivity userActivity) { + public void onMessage (final Message message) { // Trace message - this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.addUserActivityLog: userActivity={1} - CALLED!", this.getClass().getSimpleName(), userActivity)); //NOI18N + this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.onMessage: message={1} - CALLED!", this.getClass().getSimpleName(), message)); //NOI18N - // Validate parameter - if (null == userActivity) { - // Throw NPE - throw new NullPointerException("userActivity is null"); //NOI18N - } else if (userActivity.getActivityContactFamilyName() == null) { - // Throw it again - throw new NullPointerException("userActivity.activityContactFamilyName is null"); //NOI18N - } else if (userActivity.getActivityContactFamilyName().isEmpty()) { - // Throw IAE - throw new IllegalArgumentException("userActivity.activityContactFamilyName is empty"); //NOI18N - } else if (userActivity.getActivityContactFirstName() == null) { - // Throw NPE - throw new NullPointerException("userActivity.activityContactFirstName is null"); //NOI18N - } else if (userActivity.getActivityContactFirstName().isEmpty()) { - // Throw IAE - throw new IllegalArgumentException("userActivity.activityContactFirstName is empty"); //NOI18N - } else if (userActivity.getActivityContactPersonalTitle() == null) { + // The parameter should be valid + if (null == message) { // Throw NPE - throw new NullPointerException("userActivity.activityContactPersonalTitle is null"); //NOI18N - } else if ((userActivity.getActivityMessage() != null) && (userActivity.getActivityMessage().isEmpty())) { - // Throw IAE - throw new IllegalArgumentException("userActivity.activityMessage is empty"); //NOI18N - } else if (userActivity.getActivityType() == null) { - // Throw NPE - throw new NullPointerException("userActivity.activityType is null"); //NOI18N - } else if (userActivity.getActivityType().isEmpty()) { - // Throw IAE - throw new IllegalArgumentException("userActivity.activityType is empty"); //NOI18N - } else if (userActivity.getActivityUserName() == null) { - // Throw NPE - throw new NullPointerException("userActivity.activityUserName is null"); //NOI18N - } else if (userActivity.getActivityUserName().isEmpty()) { - // Throw IAE - throw new IllegalArgumentException("userActivity.activityUserName is empty"); //NOI18N - } else if (userActivity.getActivityId() != null) { - // Throw it again - throw new IllegalArgumentException("userActivity.activityId should never be set."); //NOI18N + throw new NullPointerException("message is null"); //NOI18N + } else if (!(message instanceof ObjectMessage)) { + // Not implementing right interface + throw new IllegalArgumentException(MessageFormat.format("message={0} does not implemented ObjectMessage", message)); //NOI18N } - try { - // Send out email change - final ObjectMessage message = this.getSession().createObjectMessage(); - message.setObject(userActivity); + // Securely cast it + final ObjectMessage objectMessage = (ObjectMessage) message; - // Send message - this.sendMessage(message); + // Init variable + final Serializable serializable; + + try { + // Get object from message + serializable = objectMessage.getObject(); } catch (final JMSException ex) { - // Throw again - throw new EJBException(ex); + // Log it and don't continue any further + this.getLoggerBeanLocal().logException(ex); + return; } - // Trace message - this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.addUserActivityLog: EXIT!", this.getClass().getSimpleName())); //NOI18N - } + // Debug message + this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.onMessage: serializable={1}", this.getClass().getSimpleName(), serializable)); //NOI18N - @Override - @SuppressWarnings ("unchecked") - public List fetchAllUserActivityLog () { - // Trace message - this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.fetchAllUserActivityLog: CALLED!", this.getClass().getSimpleName())); //NOI18N - - // Get named query - final Query query = this.getEntityManager().createNamedQuery("AllUserActivityLog"); //NOI18N - - // Get list from it - List list = query.getResultList(); - - // Trace message - this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.fetchAllUserActivityLog: list.size()={1} - EXIT!", this.getClass().getSimpleName(), list.size())); //NOI18N + // Okay, is it the right interface? + if (null == serializable) { + // Throw NPE + throw new NullPointerException("serializable is null"); //NOI18N + } else if (!(serializable instanceof LogableUserActivity)) { + // Not correct object send + throw new IllegalArgumentException(MessageFormat.format("serializable={0} does not implement LogableUserActivity", serializable)); //NOI18N + } - // Return it - return list; - } + // Securely cast it + final LogableUserActivity userActivity = (LogableUserActivity) serializable; - @Override - @SuppressWarnings ("unchecked") - public List fetchAllUsersActivityLog (final User user) { - // Trace message - this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.fetchAllUsersActivityLog: CALLED!", this.getClass().getSimpleName())); //NOI18N - - // Validate parameters - if (null == user) { - // Abort here - throw new NullPointerException("user is null"); //NOI18N - } else if (user.getUserId() == null) { - // Id is set - throw new NullPointerException("user.userId is null"); //NOI18N - } else if (user.getUserId() < 1) { - // Not valid id number - throw new IllegalArgumentException(MessageFormat.format("user.userId={0} is not valid", user.getUserId())); //NOI18N + // Should be valid + if (null == userActivity) { + // Throw NPE + throw new NullPointerException("userActivity is null"); //NOI18N + } else if (userActivity.getActivityId() instanceof Long) { + // Id number should not be set + throw new IllegalArgumentException(MessageFormat.format("userActivity.activityId={0} should be null", userActivity.getActivityId())); //NOI18N + } else if (userActivity.getActivityUser() == null) { + // Throw NPE again + throw new NullPointerException("userActivity.activityUser is null"); //NOI18N + } else if (userActivity.getActivityUser().getUserId() == null) { + // Throw NPE again + throw new NullPointerException("userActivity.activityUser.userId is null"); //NOI18N + } else if (userActivity.getActivityUser().getUserId() < 1) { + // Throw NPE again + throw new IllegalArgumentException(MessageFormat.format("userActivity.activityUser.userId={0} is not valid", userActivity.getActivityUser().getUserId())); //NOI18N + } else if (userActivity.getActivityType() == null) { + // Throw again ... + throw new NullPointerException("userActivity.activityType is null"); //NOI18N + } else if (userActivity.getActivityType().isEmpty()) { + // Empty type + throw new IllegalArgumentException("userActivity.activityType is empty"); //NOI18N + } else if ((userActivity.getActivityMessage() instanceof String) && (userActivity.getActivityMessage().isEmpty())) { + // Set but empty message + throw new IllegalArgumentException("userActivity.activityMessage is empty"); //NOI18N + } else if (userActivity.getActivityTimestamp() == null) { + // Throw NPE again + throw new NullPointerException("userActivity.activityTimestamp is null"); //NOI18N } - // Get named query - final Query query = this.getEntityManager().createNamedQuery("SearchAllUsersActivity"); //NOI18N + // Make user instance managed + final User managedUser = this.createManaged(userActivity.getActivityUser()); - // Set parameter - query.setParameter("activityUser", user); //NOI18N + // Set it back + userActivity.setActivityUser(managedUser); - // Get list from it - List list = query.getResultList(); + // All fine, persist it + this.getEntityManager().persist(userActivity); // Trace message - this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.fetchAllUsersActivityLog: list.size()={1} - EXIT!", this.getClass().getSimpleName(), list.size())); //NOI18N - - // Return it - return list; + this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.onMessage: EXIT!", this.getClass().getSimpleName())); //NOI18N } } diff --git a/src/java/org/mxchange/jusercore/model/user/email_address/JobsUserEmailChangeSessionBean.java b/src/java/org/mxchange/jusercore/model/user/email_address/JobsUserEmailChangeSessionBean.java index 0de0009..26e66fe 100644 --- a/src/java/org/mxchange/jusercore/model/user/email_address/JobsUserEmailChangeSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/user/email_address/JobsUserEmailChangeSessionBean.java @@ -24,7 +24,7 @@ import javax.ejb.EJBException; import javax.ejb.Stateless; import javax.persistence.NoResultException; import javax.persistence.Query; -import org.mxchange.jjobs.beans.ejb.BaseJobsEnterpriseBean; +import org.mxchange.jjobs.enterprise.BaseJobsEnterpriseBean; import org.mxchange.jusercore.model.email_address.ChangeableEmailAddress; import org.mxchange.jusercore.model.email_address.EmailAddressChange; import org.mxchange.jusercore.model.user.UserSessionBeanRemote; diff --git a/src/java/org/mxchange/jusercore/model/user/password_history/JobsUserPasswordHistorySessionBean.java b/src/java/org/mxchange/jusercore/model/user/password_history/JobsUserPasswordHistorySessionBean.java index 728e68d..0a5a993 100644 --- a/src/java/org/mxchange/jusercore/model/user/password_history/JobsUserPasswordHistorySessionBean.java +++ b/src/java/org/mxchange/jusercore/model/user/password_history/JobsUserPasswordHistorySessionBean.java @@ -20,7 +20,7 @@ import java.text.MessageFormat; import java.util.List; import javax.ejb.Stateless; import javax.persistence.Query; -import org.mxchange.jjobs.beans.ejb.BaseJobsEnterpriseBean; +import org.mxchange.jjobs.enterprise.BaseJobsEnterpriseBean; import org.mxchange.jusercore.model.user.User; /** diff --git a/src/java/org/mxchange/juserlogincore/model/user/login/JobsUserLoginSessionBean.java b/src/java/org/mxchange/juserlogincore/model/user/login/JobsUserLoginSessionBean.java index 1b3f620..51879cb 100644 --- a/src/java/org/mxchange/juserlogincore/model/user/login/JobsUserLoginSessionBean.java +++ b/src/java/org/mxchange/juserlogincore/model/user/login/JobsUserLoginSessionBean.java @@ -19,7 +19,7 @@ package org.mxchange.juserlogincore.model.user.login; import java.text.MessageFormat; import javax.ejb.EJB; import javax.ejb.Stateless; -import org.mxchange.jjobs.beans.ejb.BaseJobsEnterpriseBean; +import org.mxchange.jjobs.enterprise.BaseJobsEnterpriseBean; import org.mxchange.jusercore.exceptions.UserNotFoundException; import org.mxchange.jusercore.exceptions.UserStatusLockedException; import org.mxchange.jusercore.exceptions.UserStatusUnconfirmedException; diff --git a/src/java/org/mxchange/juserlogincore/model/user/register/JobsUserRegistrationSessionBean.java b/src/java/org/mxchange/juserlogincore/model/user/register/JobsUserRegistrationSessionBean.java index 069e17a..9065f00 100644 --- a/src/java/org/mxchange/juserlogincore/model/user/register/JobsUserRegistrationSessionBean.java +++ b/src/java/org/mxchange/juserlogincore/model/user/register/JobsUserRegistrationSessionBean.java @@ -23,7 +23,7 @@ import javax.ejb.Stateless; import javax.persistence.NoResultException; import javax.persistence.Query; import org.mxchange.jcontacts.model.contact.Contact; -import org.mxchange.jjobs.beans.ejb.BaseJobsEnterpriseBean; +import org.mxchange.jjobs.enterprise.BaseJobsEnterpriseBean; import org.mxchange.jusercore.exceptions.EmailAddressAlreadyRegisteredException; import org.mxchange.jusercore.exceptions.UserNameAlreadyRegisteredException; import org.mxchange.jusercore.model.user.AdminUserSessionBeanRemote; diff --git a/src/java/org/mxchange/juserlogincore/model/user/resendlink/JobsResendLinkSessionBean.java b/src/java/org/mxchange/juserlogincore/model/user/resendlink/JobsResendLinkSessionBean.java index 0331596..e28762f 100644 --- a/src/java/org/mxchange/juserlogincore/model/user/resendlink/JobsResendLinkSessionBean.java +++ b/src/java/org/mxchange/juserlogincore/model/user/resendlink/JobsResendLinkSessionBean.java @@ -20,7 +20,7 @@ import java.text.MessageFormat; import java.util.Locale; import javax.ejb.EJB; import javax.ejb.Stateless; -import org.mxchange.jjobs.beans.ejb.BaseJobsEnterpriseBean; +import org.mxchange.jjobs.enterprise.BaseJobsEnterpriseBean; import org.mxchange.jusercore.exceptions.UserNotFoundException; import org.mxchange.jusercore.exceptions.UserStatusConfirmedException; import org.mxchange.jusercore.exceptions.UserStatusLockedException; -- 2.39.5