From 25360d418289c566b8ccc09831839f0edff5bb0e 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/JobsContactSessionBean.java | 4 ++-- .../mxchange/jcountry/data/JobsCountrySingletonBean.java | 2 +- .../mobileprovider/JobsMobileProviderSingletonBean.java | 2 +- .../phone/JobsAdminContactPhoneSessionBean.java | 3 ++- .../model/email_address/JobsEmailChangeSessionBean.java | 2 +- .../mxchange/jusercore/model/user/JobsUserSessionBean.java | 6 +++--- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/java/org/mxchange/jcontacts/contact/JobsContactSessionBean.java b/src/java/org/mxchange/jcontacts/contact/JobsContactSessionBean.java index e104fea..db7dce1 100644 --- a/src/java/org/mxchange/jcontacts/contact/JobsContactSessionBean.java +++ b/src/java/org/mxchange/jcontacts/contact/JobsContactSessionBean.java @@ -143,7 +143,7 @@ public class JobsContactSessionBean extends BaseJobsDatabaseBean implements Cont 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(); @@ -162,7 +162,7 @@ public class JobsContactSessionBean extends BaseJobsDatabaseBean implements Cont 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/JobsCountrySingletonBean.java b/src/java/org/mxchange/jcountry/data/JobsCountrySingletonBean.java index 3b31995..f6d4678 100644 --- a/src/java/org/mxchange/jcountry/data/JobsCountrySingletonBean.java +++ b/src/java/org/mxchange/jcountry/data/JobsCountrySingletonBean.java @@ -77,7 +77,7 @@ public class JobsCountrySingletonBean extends BaseJobsDatabaseBean implements Co @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(); diff --git a/src/java/org/mxchange/jphone/phonenumbers/mobileprovider/JobsMobileProviderSingletonBean.java b/src/java/org/mxchange/jphone/phonenumbers/mobileprovider/JobsMobileProviderSingletonBean.java index 2e28ab5..80fe7f1 100644 --- a/src/java/org/mxchange/jphone/phonenumbers/mobileprovider/JobsMobileProviderSingletonBean.java +++ b/src/java/org/mxchange/jphone/phonenumbers/mobileprovider/JobsMobileProviderSingletonBean.java @@ -40,7 +40,7 @@ public class JobsMobileProviderSingletonBean extends BaseJobsDatabaseBean implem @SuppressWarnings ("unchecked") public List allMobileProvider () { // Init query - Query query = this.getEntityManager().createNamedQuery("AllMobileProvider", List.class); //NOI18N + Query query = this.getEntityManager().createNamedQuery("AllMobileProvider", CellphoneProvider.class); //NOI18N // Return it return query.getResultList(); diff --git a/src/java/org/mxchange/jphone/phonenumbers/phone/JobsAdminContactPhoneSessionBean.java b/src/java/org/mxchange/jphone/phonenumbers/phone/JobsAdminContactPhoneSessionBean.java index 69f38b0..16ac9a6 100644 --- a/src/java/org/mxchange/jphone/phonenumbers/phone/JobsAdminContactPhoneSessionBean.java +++ b/src/java/org/mxchange/jphone/phonenumbers/phone/JobsAdminContactPhoneSessionBean.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.jjobs.database.BaseJobsDatabaseBean; import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber; @@ -58,7 +59,7 @@ public class JobsAdminContactPhoneSessionBean extends BaseJobsDatabaseBean imple 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/JobsEmailChangeSessionBean.java b/src/java/org/mxchange/jusercore/model/email_address/JobsEmailChangeSessionBean.java index 880d952..faff72d 100644 --- a/src/java/org/mxchange/jusercore/model/email_address/JobsEmailChangeSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/email_address/JobsEmailChangeSessionBean.java @@ -63,7 +63,7 @@ public class JobsEmailChangeSessionBean extends BaseJobsDatabaseBean implements 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/JobsUserSessionBean.java b/src/java/org/mxchange/jusercore/model/user/JobsUserSessionBean.java index 7c4badb..e358d95 100644 --- a/src/java/org/mxchange/jusercore/model/user/JobsUserSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/user/JobsUserSessionBean.java @@ -117,7 +117,7 @@ public class JobsUserSessionBean extends BaseJobsDatabaseBean implements UserSes 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 @@ -141,7 +141,7 @@ public class JobsUserSessionBean extends BaseJobsDatabaseBean implements UserSes 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 @@ -164,7 +164,7 @@ public class JobsUserSessionBean extends BaseJobsDatabaseBean implements UserSes 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