]> git.mxchange.org Git - jjobs-ejb.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Thu, 19 Jan 2023 05:10:33 +0000 (06:10 +0100)
committerRoland Häder <roland@mxchange.org>
Thu, 19 Jan 2023 05:10:33 +0000 (06:10 +0100)
- added stateless session EJB for skills
- fixed serial numbers

src/java/org/mxchange/jcontacts/model/contact/JobsContactSessionBean.java
src/java/org/mxchange/jjobs/model/skill/JobsSkillSessionBean.java [new file with mode: 0644]
src/java/org/mxchange/jusercore/model/user/JobsAdminUserSessionBean.java
src/java/org/mxchange/jusercore/model/user/JobsUserSessionBean.java

index e5c54b77ed8a6ca6bfa24e60b1ee2766db234c71..70f508a596d2fca2435f24c983bc10de5be70ec0 100644 (file)
@@ -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 (file)
index 0000000..7aebd61
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2023 Roland Häder<roland@mxchange.org>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+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
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@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<Skillable> 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<Skillable> 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;
+       }
+
+}
index 34fc60103db80876f4f010890d5263fd1d33ad37..5f52db8edbcb8e39ca65280f1f78e9ec4c1d0cc0 100644 (file)
@@ -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
index 7a4339379b74f79d265a486dbe738ee1b2f5e2d5..b9df598ed8a15ab2eee33a6c961013bba3c32c8b 100644 (file)
@@ -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