2 * Copyright (C) 2017, 2018 Free Software Foundation
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Affero General Public License as
6 * published by the Free Software Foundation, either version 3 of the
7 * License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Affero General Public License for more details.
14 * You should have received a copy of the GNU Affero General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 package org.mxchange.jfinancials.beans.business.basicdata;
19 import java.io.Serializable;
20 import org.mxchange.jcontactsbusiness.exceptions.basicdata.BasicDataNotFoundException;
21 import org.mxchange.jcontactsbusiness.model.basicdata.BasicData;
24 * An interface for session-scoped financial controller
26 * @author Roland Häder<roland@mxchange.org>
28 public interface FinancialsBasicDataWebRequestController extends Serializable {
31 * Checks if given email address is already registered by other basic
34 * @param emailAddress Email address
36 * @return Whether the email address has been already registered
38 Boolean isEmailAddressRegistered (final String emailAddress);
41 * Retrieves a single business data entity for given id number or throws a
42 * proper exception if not found.
44 * @param basicDataId Company basic data id to lookup
46 * @return Business contact instance
48 * @throws BasicDataNotFoundException If the id number could not be looked
49 * up and solved into an entity
51 BasicData findBasicDataById (final Long basicDataId) throws BasicDataNotFoundException;
54 * Checks whether given company name already exists
56 * @param companyName Company name to check
58 * @return Whether the company name exists
60 Boolean isCompanyNameUsed (final String companyName);