From: Roland Häder Date: Thu, 19 Jan 2023 05:10:33 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6b2311657ab62ae86cb373125b584e8b49230d54;p=jjobs-ejb.git Continued: - added stateless session EJB for skills - fixed serial numbers --- diff --git a/src/java/org/mxchange/jcontacts/model/contact/JobsContactSessionBean.java b/src/java/org/mxchange/jcontacts/model/contact/JobsContactSessionBean.java index e5c54b7..70f508a 100644 --- a/src/java/org/mxchange/jcontacts/model/contact/JobsContactSessionBean.java +++ b/src/java/org/mxchange/jcontacts/model/contact/JobsContactSessionBean.java @@ -35,7 +35,7 @@ public class JobsContactSessionBean extends BaseJobsEnterpriseBean implements Co /** * Serial number */ - private static final long serialVersionUID = 542_145_347_916L; + private static final long serialVersionUID = 542_145_348_001L; /** * Default constructor diff --git a/src/java/org/mxchange/jjobs/model/skill/JobsSkillSessionBean.java b/src/java/org/mxchange/jjobs/model/skill/JobsSkillSessionBean.java new file mode 100644 index 0000000..7aebd61 --- /dev/null +++ b/src/java/org/mxchange/jjobs/model/skill/JobsSkillSessionBean.java @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2023 Roland Häder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package org.mxchange.jjobs.model.skill; + +import java.text.MessageFormat; +import java.util.List; +import javax.ejb.Stateless; +import javax.persistence.Query; +import org.mxchange.jjobs.enterprise.BaseJobsEnterpriseBean; + +/** + * A user EJB + *

+ * @author Roland Häder + */ +@Stateless (name = "skill", description = "A bean handling the user data") +public class JobsSkillSessionBean extends BaseJobsEnterpriseBean implements SkillSessionBeanRemote { + + /** + * Serial number + */ + private static final long serialVersionUID = 542_145_358_001L; + + /** + * Default constructor + */ + public JobsSkillSessionBean () { + // Call super constructor + super("jms/jjobs-queue-factory", "jms/jjobs-email-queue"); //NOI18N + } + + @Override + @SuppressWarnings ("unchecked") + public List fetchAllSkills () { + // Trace message + this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allSkills: CALLED!", this.getClass().getSimpleName())); //NOI18N + + // Get named query + final Query query = this.getEntityManager().createNamedQuery("AllSkills", JobSkill.class); //NOI18N + + // Get result + final List users = query.getResultList(); + + // Trace message + this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allSkills: users.size()={1} - EXIT!", this.getClass().getSimpleName(), users.size())); //NOI18N + + // Return full list + return users; + } + +} diff --git a/src/java/org/mxchange/jusercore/model/user/JobsAdminUserSessionBean.java b/src/java/org/mxchange/jusercore/model/user/JobsAdminUserSessionBean.java index 34fc601..5f52db8 100644 --- a/src/java/org/mxchange/jusercore/model/user/JobsAdminUserSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/user/JobsAdminUserSessionBean.java @@ -41,7 +41,7 @@ public class JobsAdminUserSessionBean extends BaseJobsEnterpriseBean implements /** * Serial number */ - private static final long serialVersionUID = 542_145_347_916L; + private static final long serialVersionUID = 542_145_349_001L; /** * Regular user bean diff --git a/src/java/org/mxchange/jusercore/model/user/JobsUserSessionBean.java b/src/java/org/mxchange/jusercore/model/user/JobsUserSessionBean.java index 7a43393..b9df598 100644 --- a/src/java/org/mxchange/jusercore/model/user/JobsUserSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/user/JobsUserSessionBean.java @@ -51,7 +51,7 @@ public class JobsUserSessionBean extends BaseJobsEnterpriseBean implements UserS /** * Serial number */ - private static final long serialVersionUID = 542_145_347_916L; + private static final long serialVersionUID = 542_145_350_001L; /** * Default constructor