]> git.mxchange.org Git - pizzaservice-ejb.git/commitdiff
Continued a bit:
authorRoland Häder <roland@mxchange.org>
Fri, 28 Jul 2017 22:10:52 +0000 (00:10 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 28 Jul 2017 22:10:52 +0000 (00:10 +0200)
- renamed classes as this is the naming convention
- fixed super bean class

Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/jcontactsbusiness/FinancialsAdminBusinessDataSessionBean.java [deleted file]
src/java/org/mxchange/jcontactsbusiness/FinancialsBusinessDataSessionBean.java [deleted file]
src/java/org/mxchange/jcontactsbusiness/PizzaAdminBusinessDataSessionBean.java [new file with mode: 0644]
src/java/org/mxchange/jcontactsbusiness/PizzaBusinessDataSessionBean.java [new file with mode: 0644]
src/java/org/mxchange/juserlogincore/model/user/login/PizzaUserLoginSessionBean.java

diff --git a/src/java/org/mxchange/jcontactsbusiness/FinancialsAdminBusinessDataSessionBean.java b/src/java/org/mxchange/jcontactsbusiness/FinancialsAdminBusinessDataSessionBean.java
deleted file mode 100644 (file)
index e579e78..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2017 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 <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jcontactsbusiness;
-
-import java.text.MessageFormat;
-import java.util.List;
-import javax.ejb.Stateless;
-import javax.persistence.Query;
-import org.mxchange.jfinancials.database.BaseFinancialsDatabaseBean;
-
-/**
- * An administrative stateless session bean for business data
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-@Stateless (name = "adminBusinessData", description = "An administrative statless bean for handling business data (all)")
-public class FinancialsAdminBusinessDataSessionBean extends BaseFinancialsDatabaseBean implements BusinessDataAdminSessionBeanRemote {
-
-       /**
-        * Serial number
-        */
-       private static final long serialVersionUID = 56_389_504_892_184_572L;
-
-       /**
-        * Default constructor
-        */
-       public FinancialsAdminBusinessDataSessionBean () {
-               // Call super constructor
-               super();
-       }
-
-       @Override
-       @SuppressWarnings ("unchecked")
-       public List<BusinessBasicData> allBusinessContacts () {
-               // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allBusinessContacts: CALLED!", this.getClass().getSimpleName())); //NOI18N
-
-               // Get query
-               Query query = this.getEntityManager().createNamedQuery("AllBusinessData"); //NOI18N
-
-               // Get list from it
-               List<BusinessBasicData> list = query.getResultList();
-
-               // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allBusinessContacts: list.size()={1} - EXIT!", this.getClass().getSimpleName(), list.size())); //NOI18N
-
-               // Return it
-               return list;
-       }
-
-}
diff --git a/src/java/org/mxchange/jcontactsbusiness/FinancialsBusinessDataSessionBean.java b/src/java/org/mxchange/jcontactsbusiness/FinancialsBusinessDataSessionBean.java
deleted file mode 100644 (file)
index 320e573..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (C) 2017 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 <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jcontactsbusiness;
-
-import java.text.MessageFormat;
-import javax.ejb.Stateless;
-import javax.persistence.NoResultException;
-import javax.persistence.Query;
-import org.mxchange.jcontactsbusiness.exceptions.BusinessDataNotFoundException;
-import org.mxchange.jfinancials.database.BaseFinancialsDatabaseBean;
-
-/**
- * A stateless session bean for business data
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-@Stateless (name = "businessData", description = "A general statless bean for handling business data (all)")
-public class FinancialsBusinessDataSessionBean extends BaseFinancialsDatabaseBean implements BusinessDataSessionBeanRemote {
-
-       /**
-        * Serial number
-        */
-       private static final long serialVersionUID = 56_389_504_892_184_571L;
-
-       /**
-        * Default constructor
-        */
-       public FinancialsBusinessDataSessionBean () {
-               // Call super constructor
-               super();
-       }
-
-       @Override
-       public BusinessBasicData findBusinessDataById (final Long businessDataId) throws BusinessDataNotFoundException {
-               // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.findBusinessDataById: CALLED!", this.getClass().getSimpleName())); //NOI18N
-
-               // Get query
-               Query query = this.getEntityManager().createNamedQuery("SearchBusinessDataById", CompanyBasicData.class); //NOI18N
-
-               // Set parameter
-               query.setParameter("businessDataId", businessDataId); //NOI18N
-
-               // Get single instance
-               BusinessBasicData businessData = null;
-
-               // Try to find a result
-               try {
-                       // Find a single result
-                       businessData = (BusinessBasicData) query.getSingleResult();
-
-                       // Log trace message
-                       this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.findBusinessDataById: Found contact={1}", this.getClass().getSimpleName(), businessData)); //NOI18N
-               } catch (final NoResultException ex) {
-                       // No result found
-                       throw new BusinessDataNotFoundException(businessDataId, ex);
-               }
-
-               // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.findBusinessDataById: businessData={1} - EXIT!", this.getClass().getSimpleName(), businessData)); //NOI18N
-
-               // Return it
-               return businessData;
-       }
-
-}
diff --git a/src/java/org/mxchange/jcontactsbusiness/PizzaAdminBusinessDataSessionBean.java b/src/java/org/mxchange/jcontactsbusiness/PizzaAdminBusinessDataSessionBean.java
new file mode 100644 (file)
index 0000000..4dfaeaa
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2017 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 <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jcontactsbusiness;
+
+import java.text.MessageFormat;
+import java.util.List;
+import javax.ejb.Stateless;
+import javax.persistence.Query;
+import org.mxchange.pizzaaplication.database.BasePizzaDatabaseBean;
+
+/**
+ * An administrative stateless session bean for business data
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@Stateless (name = "adminBusinessData", description = "An administrative statless bean for handling business data (all)")
+public class PizzaAdminBusinessDataSessionBean extends BasePizzaDatabaseBean implements BusinessDataAdminSessionBeanRemote {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 56_389_504_892_184_572L;
+
+       /**
+        * Default constructor
+        */
+       public PizzaAdminBusinessDataSessionBean () {
+               // Call super constructor
+               super();
+       }
+
+       @Override
+       @SuppressWarnings ("unchecked")
+       public List<BusinessBasicData> allBusinessContacts () {
+               // Trace message
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allBusinessContacts: CALLED!", this.getClass().getSimpleName())); //NOI18N
+
+               // Get query
+               Query query = this.getEntityManager().createNamedQuery("AllBusinessData"); //NOI18N
+
+               // Get list from it
+               List<BusinessBasicData> list = query.getResultList();
+
+               // Trace message
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allBusinessContacts: list.size()={1} - EXIT!", this.getClass().getSimpleName(), list.size())); //NOI18N
+
+               // Return it
+               return list;
+       }
+
+}
diff --git a/src/java/org/mxchange/jcontactsbusiness/PizzaBusinessDataSessionBean.java b/src/java/org/mxchange/jcontactsbusiness/PizzaBusinessDataSessionBean.java
new file mode 100644 (file)
index 0000000..1eea667
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2017 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 <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jcontactsbusiness;
+
+import java.text.MessageFormat;
+import javax.ejb.Stateless;
+import javax.persistence.NoResultException;
+import javax.persistence.Query;
+import org.mxchange.jcontactsbusiness.exceptions.BusinessDataNotFoundException;
+import org.mxchange.pizzaaplication.database.BasePizzaDatabaseBean;
+
+/**
+ * A stateless session bean for business data
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@Stateless (name = "businessData", description = "A general statless bean for handling business data (all)")
+public class PizzaBusinessDataSessionBean extends BasePizzaDatabaseBean implements BusinessDataSessionBeanRemote {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 56_389_504_892_184_571L;
+
+       /**
+        * Default constructor
+        */
+       public PizzaBusinessDataSessionBean () {
+               // Call super constructor
+               super();
+       }
+
+       @Override
+       public BusinessBasicData findBusinessDataById (final Long businessDataId) throws BusinessDataNotFoundException {
+               // Trace message
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.findBusinessDataById: CALLED!", this.getClass().getSimpleName())); //NOI18N
+
+               // Get query
+               Query query = this.getEntityManager().createNamedQuery("SearchBusinessDataById", CompanyBasicData.class); //NOI18N
+
+               // Set parameter
+               query.setParameter("businessDataId", businessDataId); //NOI18N
+
+               // Get single instance
+               BusinessBasicData businessData = null;
+
+               // Try to find a result
+               try {
+                       // Find a single result
+                       businessData = (BusinessBasicData) query.getSingleResult();
+
+                       // Log trace message
+                       this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.findBusinessDataById: Found contact={1}", this.getClass().getSimpleName(), businessData)); //NOI18N
+               } catch (final NoResultException ex) {
+                       // No result found
+                       throw new BusinessDataNotFoundException(businessDataId, ex);
+               }
+
+               // Trace message
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.findBusinessDataById: businessData={1} - EXIT!", this.getClass().getSimpleName(), businessData)); //NOI18N
+
+               // Return it
+               return businessData;
+       }
+
+}
index 80f7c16c36f2638dc1336b46b962028da54e4536..115bdcb93e7271a081f45a3f1b83d04d6f52d46b 100644 (file)
@@ -36,7 +36,7 @@ import org.mxchange.pizzaaplication.database.BasePizzaDatabaseBean;
  * <p>
  * @author Roland Häder<roland@mxchange.org>
  */
-@Stateless (name = "userLogin", description = "A bean handling the user login for Financials project")
+@Stateless (name = "userLogin", description = "A bean handling the user login for Pizza project")
 public class PizzaUserLoginSessionBean extends BasePizzaDatabaseBean implements UserLoginSessionBeanRemote {
 
        /**