From: Roland Häder Date: Sun, 15 Oct 2017 21:14:07 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=06ab4dd392408925c062047dbce3d1033138537d;p=jcontacts-lib.git Continued: - removed findContactById() as this was a performance problem and it should be done all on WAR side (relying on JCache then) - removed findContactByEmailAddress() as this was no longer used outside the EJB's own method and would be a performance problem, too. - the application then needs to rely on it's cache or fetch whole list and check that list then (but I recommend first as 2nd is "same in green color) Signed-off-by: Roland Häder --- diff --git a/src/org/mxchange/jcontacts/model/contact/ContactSessionBeanRemote.java b/src/org/mxchange/jcontacts/model/contact/ContactSessionBeanRemote.java index dd82f00..097863a 100644 --- a/src/org/mxchange/jcontacts/model/contact/ContactSessionBeanRemote.java +++ b/src/org/mxchange/jcontacts/model/contact/ContactSessionBeanRemote.java @@ -19,7 +19,6 @@ package org.mxchange.jcontacts.model.contact; import java.io.Serializable; import java.util.List; import javax.ejb.Remote; -import org.mxchange.jcontacts.exceptions.ContactNotFoundException; /** * A remote interface for general contact purposes @@ -89,26 +88,4 @@ public interface ContactSessionBeanRemote extends Serializable { */ List allEmailAddresses (); - /** - * Returns a contact instance which has the given id number. - *

- * @param contactId Contact id - *

- * @return Contact instance - *

- * @throws ContactNotFoundException If the contact was not found - */ - Contact findContactById (final Long contactId) throws ContactNotFoundException; - - /** - * Returns a contact instance which has the given email address. - *

- * @param emailAddress Email address - *

- * @return Contact instance - *

- * @throws ContactNotFoundException If the contact was not found - */ - Contact findContactByEmailAddress (final String emailAddress) throws ContactNotFoundException; - } diff --git a/src/org/mxchange/jcontacts/model/phone/AdminContactsPhoneSessionBeanRemote.java b/src/org/mxchange/jcontacts/model/phone/AdminContactsPhoneSessionBeanRemote.java index 35ee2b2..a6417ff 100644 --- a/src/org/mxchange/jcontacts/model/phone/AdminContactsPhoneSessionBeanRemote.java +++ b/src/org/mxchange/jcontacts/model/phone/AdminContactsPhoneSessionBeanRemote.java @@ -19,8 +19,8 @@ package org.mxchange.jcontacts.model.phone; import java.io.Serializable; import javax.ejb.Remote; import org.mxchange.jcontacts.model.contact.Contact; -import org.mxchange.jphone.exceptions.PhoneNumberAlreadyLinkedException; -import org.mxchange.jphone.exceptions.PhoneNumberNotLinkedException; +import org.mxchange.jphone.exceptions.phone.PhoneNumberAlreadyLinkedException; +import org.mxchange.jphone.exceptions.phone.PhoneNumberNotLinkedException; import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber; import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber; import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber;