import java.io.Serializable;
import java.util.List;
import javax.ejb.Remote;
+import org.mxchange.jcontacts.exceptions.ContactAlreadyAddedException;
import org.mxchange.jcontacts.exceptions.ContactNotFoundException;
/**
@Remote
public interface ContactSessionBeanRemote extends Serializable {
+ /**
+ * Adds (persists) given contact instance, if not found. If successfull, the
+ * field contactId contains the running number, otherwise an exception is
+ * thrown.
+ *
+ * @param contact Contact to be added
+ * <p>
+ * @return Updated contact instance
+ * <p>
+ * @throws org.mxchange.jcontacts.exceptions.ContactAlreadyAddedException
+ * Contact already found
+ */
+ Contact addContact (final Contact contact) throws ContactAlreadyAddedException;
+
/**
* Checks if the given contact can be found by checking the whole list.
* <p>