From 769913fbab913057ddc245a9c974dcb391ec5276 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 29 Jul 2016 16:13:54 +0200 Subject: [PATCH] Continued a bit: (please cherry-pick) - the class type is a hint for what kind of classes are in the List - so no List is in List ... ;-) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder Signed-off-by: Roland Häder --- .../mxchange/jcontacts/contact/PizzaContactSessionBean.java | 4 ++-- .../mxchange/jcountry/data/PizzaCountrySingletonBean.java | 4 ++-- .../mobileprovider/PizzaMobileProviderSingletonBean.java | 2 +- .../phone/PizzaAdminContactPhoneSessionBean.java | 3 ++- .../model/email_address/PizzaEmailChangeSessionBean.java | 2 +- .../mxchange/jusercore/model/user/PizzaUserSessionBean.java | 6 +++--- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/java/org/mxchange/jcontacts/contact/PizzaContactSessionBean.java b/src/java/org/mxchange/jcontacts/contact/PizzaContactSessionBean.java index a7dc1b7..e8dbbd3 100644 --- a/src/java/org/mxchange/jcontacts/contact/PizzaContactSessionBean.java +++ b/src/java/org/mxchange/jcontacts/contact/PizzaContactSessionBean.java @@ -171,7 +171,7 @@ public class PizzaContactSessionBean extends BasePizzaDatabaseBean implements Co this.getLoggerBeanLocal().logTrace("getAllContacts - CALLED!"); //NOI18N // Create query instance - Query query = this.getEntityManager().createNamedQuery("AllContacts", List.class); //NOI18N + Query query = this.getEntityManager().createNamedQuery("AllContacts", UserContact.class); //NOI18N // Get list List contacts = query.getResultList(); @@ -190,7 +190,7 @@ public class PizzaContactSessionBean extends BasePizzaDatabaseBean implements Co this.getLoggerBeanLocal().logTrace("getEmailAddressList - CALLED!"); //NOI18N // Create query instance - Query query = this.getEntityManager().createNamedQuery("AllContactEmailAddresses", List.class); //NOI18N + Query query = this.getEntityManager().createNamedQuery("AllContactEmailAddresses", String.class); //NOI18N // Get list List emailAddresses = query.getResultList(); diff --git a/src/java/org/mxchange/jcountry/data/PizzaCountrySingletonBean.java b/src/java/org/mxchange/jcountry/data/PizzaCountrySingletonBean.java index f71df88..de0e24a 100644 --- a/src/java/org/mxchange/jcountry/data/PizzaCountrySingletonBean.java +++ b/src/java/org/mxchange/jcountry/data/PizzaCountrySingletonBean.java @@ -77,7 +77,7 @@ public class PizzaCountrySingletonBean extends BasePizzaDatabaseBean implements @SuppressWarnings ("unchecked") public List allCountries () { // Init query - Query query = this.getEntityManager().createNamedQuery("AllCountries", List.class); //NOI18N + Query query = this.getEntityManager().createNamedQuery("AllCountries", CountryData.class); //NOI18N // Return it return query.getResultList(); @@ -110,7 +110,7 @@ public class PizzaCountrySingletonBean extends BasePizzaDatabaseBean implements boolean isAdded = false; // Get query instance - Query query = this.getEntityManager().createNamedQuery("SearchCountryByCodeI18nKey", Country.class); //NOI18N + Query query = this.getEntityManager().createNamedQuery("SearchCountryByCodeI18nKey", CountryData.class); //NOI18N // Assign all parameters query.setParameter("code", country.getCountryCode()); //NOI18N diff --git a/src/java/org/mxchange/jphone/phonenumbers/mobileprovider/PizzaMobileProviderSingletonBean.java b/src/java/org/mxchange/jphone/phonenumbers/mobileprovider/PizzaMobileProviderSingletonBean.java index df30806..3c12ca3 100644 --- a/src/java/org/mxchange/jphone/phonenumbers/mobileprovider/PizzaMobileProviderSingletonBean.java +++ b/src/java/org/mxchange/jphone/phonenumbers/mobileprovider/PizzaMobileProviderSingletonBean.java @@ -44,7 +44,7 @@ public class PizzaMobileProviderSingletonBean extends BasePizzaDatabaseBean impl this.getLoggerBeanLocal().logTrace("allMobileProvider: CALLED!"); //NOI18N // Init query - Query query = this.getEntityManager().createNamedQuery("AllMobileProvider", List.class); //NOI18N + Query query = this.getEntityManager().createNamedQuery("AllMobileProvider", CellphoneProvider.class); //NOI18N // Get list List list = query.getResultList(); diff --git a/src/java/org/mxchange/jphone/phonenumbers/phone/PizzaAdminContactPhoneSessionBean.java b/src/java/org/mxchange/jphone/phonenumbers/phone/PizzaAdminContactPhoneSessionBean.java index 8a04591..258d5f7 100644 --- a/src/java/org/mxchange/jphone/phonenumbers/phone/PizzaAdminContactPhoneSessionBean.java +++ b/src/java/org/mxchange/jphone/phonenumbers/phone/PizzaAdminContactPhoneSessionBean.java @@ -22,6 +22,7 @@ import javax.ejb.Stateless; import javax.persistence.NoResultException; import javax.persistence.Query; import org.mxchange.jcontacts.contact.Contact; +import org.mxchange.jcontacts.contact.UserContact; import org.mxchange.jcontacts.phone.AdminContactsPhoneSessionBeanRemote; import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber; import org.mxchange.pizzaaplication.database.BasePizzaDatabaseBean; @@ -61,7 +62,7 @@ public class PizzaAdminContactPhoneSessionBean extends BasePizzaDatabaseBean imp List contacts = null; // Get query object from all found contact-cellphone links - Query query = this.getEntityManager().createNamedQuery("AllContactsByCellphone", List.class); //NOI18N + Query query = this.getEntityManager().createNamedQuery("AllContactsByCellphone", UserContact.class); //NOI18N // Set parameter query.setParameter("cellPhone", cellPhone); //NOI18N diff --git a/src/java/org/mxchange/jusercore/model/email_address/PizzaEmailChangeSessionBean.java b/src/java/org/mxchange/jusercore/model/email_address/PizzaEmailChangeSessionBean.java index d09c539..6f6629f 100644 --- a/src/java/org/mxchange/jusercore/model/email_address/PizzaEmailChangeSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/email_address/PizzaEmailChangeSessionBean.java @@ -63,7 +63,7 @@ public class PizzaEmailChangeSessionBean extends BasePizzaDatabaseBean implement this.getLoggerBeanLocal().logTrace("allQueuedAddressesAsList: CALLED!"); //NOI18N // Get named query - Query query = this.getEntityManager().createNamedQuery("AllEmailAddressChanges", List.class); //NOI18N + Query query = this.getEntityManager().createNamedQuery("AllEmailAddressChanges", String.class); //NOI18N // Get all entries List emailAddresses = query.getResultList(); diff --git a/src/java/org/mxchange/jusercore/model/user/PizzaUserSessionBean.java b/src/java/org/mxchange/jusercore/model/user/PizzaUserSessionBean.java index 41ddd30..2f8b79f 100644 --- a/src/java/org/mxchange/jusercore/model/user/PizzaUserSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/user/PizzaUserSessionBean.java @@ -120,7 +120,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS this.getLoggerBeanLocal().logTrace("allMemberPublicVisibleUsers: CALLED!"); //NOI18N // Get named query - Query query = this.getEntityManager().createNamedQuery("AllMemberPublicUsers", List.class); //NOI18N + Query query = this.getEntityManager().createNamedQuery("AllMemberPublicUsers", LoginUser.class); //NOI18N // Set parameters query.setParameter("status", UserAccountStatus.CONFIRMED); //NOI18N @@ -144,7 +144,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS this.getLoggerBeanLocal().logTrace("allPublicUsers: CALLED!"); //NOI18N // Get named query - Query query = this.getEntityManager().createNamedQuery("AllPublicUsers", List.class); //NOI18N + Query query = this.getEntityManager().createNamedQuery("AllPublicUsers", LoginUser.class); //NOI18N // Set parameters query.setParameter("status", UserAccountStatus.CONFIRMED); //NOI18N @@ -167,7 +167,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS this.getLoggerBeanLocal().logTrace("allUsers: CALLED!"); //NOI18N // Get named query - Query query = this.getEntityManager().createNamedQuery("AllUsers", List.class); //NOI18N + Query query = this.getEntityManager().createNamedQuery("AllUsers", LoginUser.class); //NOI18N // Get result List users = query.getResultList(); -- 2.39.5