From: Roland Häder Date: Tue, 26 Apr 2016 08:40:34 +0000 (+0200) Subject: added business method isContactFound() X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5cbaefe7a6c62dd6fca7709a1fdea6e5f4f71b8f;p=jcontacts-lib.git added business method isContactFound() --- diff --git a/src/org/mxchange/jcontacts/contact/ContactSessionBeanRemote.java b/src/org/mxchange/jcontacts/contact/ContactSessionBeanRemote.java index 66550fc..0641451 100644 --- a/src/org/mxchange/jcontacts/contact/ContactSessionBeanRemote.java +++ b/src/org/mxchange/jcontacts/contact/ContactSessionBeanRemote.java @@ -1,69 +1,81 @@ -/* - * Copyright (C) 2016 Roland Haeder - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package org.mxchange.jcontacts.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 - *

- * @author Roland Haeder - */ -@Remote -public interface ContactSessionBeanRemote extends Serializable { - - /** - * Updates given contact data - *

- * @param contact Contact data to update - * @param isCellphoneUnlinked Whether a cellphone entry has been unlinked in contact instance - * @param isLandlineUnlinked Whether a land-line entry has been unlinked in contact instance - * @param isFaxUnlinked Whether a fax entry has been unlinked in contact instance - *

- * @return Updated contact instance - */ - Contact updateContactData (final Contact contact, final boolean isCellphoneUnlinked, final boolean isLandlineUnlinked, final boolean isFaxUnlinked); - - /** - * Returns a list of all found contacts - *

- * @return A list of call contacts - */ - List getAllContacts (); - - /** - * Returns a list of all registered email addresses. - *

- * @return A list of all email addresses - */ - List getEmailAddressList (); - - /** - * 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; - -} +/* + * Copyright (C) 2016 Roland Haeder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.mxchange.jcontacts.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 + *

+ * @author Roland Haeder + */ +@Remote +public interface ContactSessionBeanRemote extends Serializable { + + /** + * Checks if the given contact can be found by checking the whole list. + *

+ * @param contact Contact instance to check + *

+ * @return Whether there is already an entry + */ + boolean isContactFound (final Contact contact); + + /** + * Updates given contact data + *

+ * @param contact Contact data to update + * @param isCellphoneUnlinked Whether a cellphone entry has been unlinked in + * contact instance + * @param isLandlineUnlinked Whether a land-line entry has been unlinked in + * contact instance + * @param isFaxUnlinked Whether a fax entry has been unlinked in contact + * instance + *

+ * @return Updated contact instance + */ + Contact updateContactData (final Contact contact, final boolean isCellphoneUnlinked, final boolean isLandlineUnlinked, final boolean isFaxUnlinked); + + /** + * Returns a list of all found contacts + *

+ * @return A list of call contacts + */ + List getAllContacts (); + + /** + * Returns a list of all registered email addresses. + *

+ * @return A list of all email addresses + */ + List getEmailAddressList (); + + /** + * 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; + +}