@Remote
public interface ContactSessionBeanRemote extends Serializable {
+ /**
+ * Checks whether the given email address is already registered. The email
+ * address should be validated by EmailAddressValidator before calling this
+ * method.
+ * <p>
+ * @param emailAddress Email address to check
+ * <p>
+ * @return Whether the email address is already registered
+ */
+ boolean isEmailAddressRegistered (final String emailAddress);
+
/**
* Adds (persists) given contact instance, if not found. If successfull, the
* field contactId contains the running number, otherwise an exception is
*/
Contact findContactById (final Long contactId) throws ContactNotFoundException;
+ /**
+ * Returns a contact instance which has the given email address.
+ * <p>
+ * @param emailAddress Email address
+ * <p>
+ * @return Contact instance
+ * <p>
+ * @throws ContactNotFoundException If the contact was not found
+ */
+ Contact findContactByEmailAddress (final String emailAddress) throws ContactNotFoundException;
+
}