From ecec0f0a4b6db053cb8bd1f5867a2703a046d0b3 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sat, 9 Apr 2016 20:09:34 +0200 Subject: [PATCH] Continued with update: - renamed class - added SMS provider bean - added required dependency on jphone-lib.jar --- PizzaService-ejb/lib/jphone-lib.jar | Bin 0 -> 1622 bytes PizzaService-ejb/nbproject/build-impl.xml | 12 +++-- .../nbproject/genfiles.properties | 4 +- PizzaService-ejb/nbproject/project.properties | 3 ++ PizzaService-ejb/nbproject/project.xml | 1 + ...an.java => PizzaCountrySingletonBean.java} | 2 +- .../PizzaSmsProviderSingletonBean.java | 49 ++++++++++++++++++ 7 files changed, 64 insertions(+), 7 deletions(-) create mode 100644 PizzaService-ejb/lib/jphone-lib.jar rename PizzaService-ejb/src/java/org/mxchange/jcountry/data/{PizzaServiceCountrySingletonBean.java => PizzaCountrySingletonBean.java} (93%) create mode 100644 PizzaService-ejb/src/java/org/mxchange/jphone/phonenumbers/smsprovider/PizzaSmsProviderSingletonBean.java diff --git a/PizzaService-ejb/lib/jphone-lib.jar b/PizzaService-ejb/lib/jphone-lib.jar new file mode 100644 index 0000000000000000000000000000000000000000..bdeff312e2b7e935c3c355e13294565acd4c0a3e GIT binary patch literal 1622 zcmbVM%Wl&^6upzAP2<)jLfOD76`NMbaX`F_kld;fRUQpZ=@w1gA(_Y?N48THcHJN$ zHhclA!UnNq!-5Z}#Fn2xh(D;fV<*NANocv!jP3Ec=RSOoo7Hqi0ayT7di(k@#4HCH zsBi5V+IFL&pPd3UBj_SRjd!13^${*t0apaA8;$MCR%@?RuhgmF&za|I`^@#YBOVlQ zl*+1Nh}enIr)HNG@eE(yFWpgrBh{Os;cjSHW-f?8U;e7m^1<5JUN z#ZAZUJ1+H+dQDYSC7EHY7Ayt8aXb2SggQjnM`o9b4x0g$DiaB$a@PeWnn1`Y8I9WEK|#hITN_Nx>oDaL#hvaZs|4d`RfF7E#48-AGnM_ z<1fI&+N3@wx)v`x7H<6!k}EA|;F_$$Eo8qIdpoHTnHqsBy942Ko9%Otw=HG};rPLT zd00S@{*lglZ9Oa>V^se)!wESM$OjFwZ~*n4c8{4pfkJS^9lga|PA&eDVqWtE2&8bO zvF{{9aKPvAX&#?aki~_9#ytn9Z9FBgDD_KHh4gf>BN8nSKMi?}^c+h6kLx7yO9yEu z$JcR>Tw}k2cyP%Oz=xX@XJ|6`H@pp{nv6NZ$g31XlBbp~HDw MfTt;dA95h!H>k&u?f?J) literal 0 HcmV?d00001 diff --git a/PizzaService-ejb/nbproject/build-impl.xml b/PizzaService-ejb/nbproject/build-impl.xml index e675881..b66085e 100644 --- a/PizzaService-ejb/nbproject/build-impl.xml +++ b/PizzaService-ejb/nbproject/build-impl.xml @@ -833,6 +833,7 @@ exists or setup the property manually. For example like this: + @@ -845,11 +846,12 @@ exists or setup the property manually. For example like this: + - + @@ -857,9 +859,10 @@ exists or setup the property manually. For example like this: - - - + + + + @@ -870,6 +873,7 @@ exists or setup the property manually. For example like this: + diff --git a/PizzaService-ejb/nbproject/genfiles.properties b/PizzaService-ejb/nbproject/genfiles.properties index 60ce269..19eb5bc 100644 --- a/PizzaService-ejb/nbproject/genfiles.properties +++ b/PizzaService-ejb/nbproject/genfiles.properties @@ -3,6 +3,6 @@ build.xml.script.CRC32=cabe2e92 build.xml.stylesheet.CRC32=5910fda3@1.51.1 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=5de26d8a -nbproject/build-impl.xml.script.CRC32=4fc94a79 +nbproject/build-impl.xml.data.CRC32=6890d152 +nbproject/build-impl.xml.script.CRC32=5087c2fa nbproject/build-impl.xml.stylesheet.CRC32=6096d939@1.55.1 diff --git a/PizzaService-ejb/nbproject/project.properties b/PizzaService-ejb/nbproject/project.properties index ad9fa13..d455a03 100644 --- a/PizzaService-ejb/nbproject/project.properties +++ b/PizzaService-ejb/nbproject/project.properties @@ -28,6 +28,7 @@ file.reference.jcoreee.jar=lib/jcoreee.jar file.reference.jcountry-core.jar=lib/jcountry-core.jar file.reference.jcountry-lib.jar=lib/jcountry-lib.jar file.reference.jphone-core.jar=lib/jphone-core.jar +file.reference.jphone-lib.jar=lib/jphone-lib.jar file.reference.jshop-core.jar=lib/jshop-core.jar file.reference.jshop-ee-lib.jar=lib/jshop-ee-lib.jar includes=** @@ -52,6 +53,7 @@ javac.classpath=\ ${reference.PizzaService-lib.jar}:\ ${file.reference.jcontacts-core.jar}:\ ${file.reference.jphone-core.jar}:\ + ${file.reference.jphone-lib.jar}:\ ${file.reference.jshop-core.jar}:\ ${file.reference.jshop-ee-lib.jar}:\ ${file.reference.cdi-api.jar} @@ -98,6 +100,7 @@ source.reference.jcoreee.jar=../../jcoreee/src/ source.reference.jcountry-core.jar=../jcountry-core/src/ source.reference.jcountry-lib.jar=../jcountry-lib/src/ source.reference.jphone-core.jar=../jphone-core/src/ +source.reference.jphone-lib.jar=../jphone-lib/src/ source.reference.jshop-core.jar=../../jshop-core/src/ source.reference.jshop-ee-lib.jar=../../jshop-ee-lib/src/ source.root=src diff --git a/PizzaService-ejb/nbproject/project.xml b/PizzaService-ejb/nbproject/project.xml index fca16a2..3a5f797 100644 --- a/PizzaService-ejb/nbproject/project.xml +++ b/PizzaService-ejb/nbproject/project.xml @@ -12,6 +12,7 @@ reference.PizzaService-lib.jar file.reference.jcontacts-core.jar file.reference.jphone-core.jar + file.reference.jphone-lib.jar file.reference.jshop-core.jar file.reference.jshop-ee-lib.jar file.reference.cdi-api.jar diff --git a/PizzaService-ejb/src/java/org/mxchange/jcountry/data/PizzaServiceCountrySingletonBean.java b/PizzaService-ejb/src/java/org/mxchange/jcountry/data/PizzaCountrySingletonBean.java similarity index 93% rename from PizzaService-ejb/src/java/org/mxchange/jcountry/data/PizzaServiceCountrySingletonBean.java rename to PizzaService-ejb/src/java/org/mxchange/jcountry/data/PizzaCountrySingletonBean.java index eb52b9c..c0d42e1 100644 --- a/PizzaService-ejb/src/java/org/mxchange/jcountry/data/PizzaServiceCountrySingletonBean.java +++ b/PizzaService-ejb/src/java/org/mxchange/jcountry/data/PizzaCountrySingletonBean.java @@ -29,7 +29,7 @@ import org.mxchange.jcoreee.database.BaseDatabaseBean; */ @Startup @Singleton (name = "country", mappedName = "ejb/pizzaservice-singleton-country", description = "A singleton session bean for country informations") -public class PizzaServiceCountrySingletonBean extends BaseDatabaseBean implements CountrySingletonBeanRemote { +public class PizzaCountrySingletonBean extends BaseDatabaseBean implements CountrySingletonBeanRemote { /** * Serial number diff --git a/PizzaService-ejb/src/java/org/mxchange/jphone/phonenumbers/smsprovider/PizzaSmsProviderSingletonBean.java b/PizzaService-ejb/src/java/org/mxchange/jphone/phonenumbers/smsprovider/PizzaSmsProviderSingletonBean.java new file mode 100644 index 0000000..c0d59e1 --- /dev/null +++ b/PizzaService-ejb/src/java/org/mxchange/jphone/phonenumbers/smsprovider/PizzaSmsProviderSingletonBean.java @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2016 Roland Haeder + * + * 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.jphone.phonenumbers.smsprovider; + +import java.util.List; +import javax.ejb.Singleton; +import javax.ejb.Startup; +import javax.persistence.Query; +import org.mxchange.jcoreee.database.BaseDatabaseBean; + +/** + * A singleton bean for SMS provider informations + *

+ * @author Roland Haeder + */ +@Startup +@Singleton (name = "smsprovider", mappedName = "ejb/pizzaservice-singleton-smsprovider", description = "A singleton session bean for SMS provider informations") +public class PizzaSmsProviderSingletonBean extends BaseDatabaseBean implements SmsProviderSingletonBeanRemote { + + /** + * Serial number + */ + private static final long serialVersionUID = 15_846_983_298_691_207L; + + @Override + @SuppressWarnings ("unchecked") + public List allSmsProvider () { + // Init query + Query query = this.getEntityManager().createNamedQuery("AllSmsProvider", List.class); //NOI18N + + // Return it + return query.getResultList(); + } + +} -- 2.39.5