From e696fecfb2c620b21a3da8418bea6ec5f1f7bacb 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 --- .../jcontacts/contact/AddressbookContactSessionBean.java | 4 ++-- .../jcountry/data/AddressbookCountrySingletonBean.java | 2 +- .../AddressbookMobileProviderSingletonBean.java | 2 +- .../phone/AddressbookAdminContactPhoneSessionBean.java | 3 ++- .../email_address/AddressbookEmailChangeSessionBean.java | 2 +- .../jusercore/model/user/AddressbookUserSessionBean.java | 6 +++--- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/java/org/mxchange/jcontacts/contact/AddressbookContactSessionBean.java b/src/java/org/mxchange/jcontacts/contact/AddressbookContactSessionBean.java index 8b1aadd..b60576b 100644 --- a/src/java/org/mxchange/jcontacts/contact/AddressbookContactSessionBean.java +++ b/src/java/org/mxchange/jcontacts/contact/AddressbookContactSessionBean.java @@ -143,7 +143,7 @@ public class AddressbookContactSessionBean extends BaseAddressbookDatabaseBean i 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 AddressbookContactSessionBean extends BaseAddressbookDatabaseBean i 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/AddressbookCountrySingletonBean.java b/src/java/org/mxchange/jcountry/data/AddressbookCountrySingletonBean.java index b7a7dab..9358bcf 100644 --- a/src/java/org/mxchange/jcountry/data/AddressbookCountrySingletonBean.java +++ b/src/java/org/mxchange/jcountry/data/AddressbookCountrySingletonBean.java @@ -77,7 +77,7 @@ public class AddressbookCountrySingletonBean extends BaseDatabaseBean 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(); diff --git a/src/java/org/mxchange/jphone/phonenumbers/mobileprovider/AddressbookMobileProviderSingletonBean.java b/src/java/org/mxchange/jphone/phonenumbers/mobileprovider/AddressbookMobileProviderSingletonBean.java index 6809c0e..7fd7d89 100644 --- a/src/java/org/mxchange/jphone/phonenumbers/mobileprovider/AddressbookMobileProviderSingletonBean.java +++ b/src/java/org/mxchange/jphone/phonenumbers/mobileprovider/AddressbookMobileProviderSingletonBean.java @@ -40,7 +40,7 @@ public class AddressbookMobileProviderSingletonBean extends BaseDatabaseBean imp @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/AddressbookAdminContactPhoneSessionBean.java b/src/java/org/mxchange/jphone/phonenumbers/phone/AddressbookAdminContactPhoneSessionBean.java index 7d3edd7..6f580b5 100644 --- a/src/java/org/mxchange/jphone/phonenumbers/phone/AddressbookAdminContactPhoneSessionBean.java +++ b/src/java/org/mxchange/jphone/phonenumbers/phone/AddressbookAdminContactPhoneSessionBean.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.jcoreee.database.BaseDatabaseBean; import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber; @@ -58,7 +59,7 @@ public class AddressbookAdminContactPhoneSessionBean extends BaseDatabaseBean im 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/AddressbookEmailChangeSessionBean.java b/src/java/org/mxchange/jusercore/model/email_address/AddressbookEmailChangeSessionBean.java index 65e2801..9bde865 100644 --- a/src/java/org/mxchange/jusercore/model/email_address/AddressbookEmailChangeSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/email_address/AddressbookEmailChangeSessionBean.java @@ -63,7 +63,7 @@ public class AddressbookEmailChangeSessionBean extends BaseAddressbookDatabaseBe 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/AddressbookUserSessionBean.java b/src/java/org/mxchange/jusercore/model/user/AddressbookUserSessionBean.java index 44fd081..059d530 100644 --- a/src/java/org/mxchange/jusercore/model/user/AddressbookUserSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/user/AddressbookUserSessionBean.java @@ -117,7 +117,7 @@ public class AddressbookUserSessionBean extends BaseAddressbookDatabaseBean impl 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 AddressbookUserSessionBean extends BaseAddressbookDatabaseBean impl 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 AddressbookUserSessionBean extends BaseAddressbookDatabaseBean impl 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