From: Roland Häder Date: Sun, 15 Oct 2017 21:07:53 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9d11a87f7bc6f87040334965c41a4352ea389737;p=jcountry-lib.git Continued: - splitted general and administrative methods as usual everywhere Signed-off-by: Roland Häder --- diff --git a/src/org/mxchange/jcountry/model/data/AdminCountrySessionBeanRemote.java b/src/org/mxchange/jcountry/model/data/AdminCountrySessionBeanRemote.java new file mode 100644 index 0000000..2adbd20 --- /dev/null +++ b/src/org/mxchange/jcountry/model/data/AdminCountrySessionBeanRemote.java @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2016, 2017 Roland Häder + * + * 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.jcountry.model.data; + +import java.io.Serializable; +import javax.ejb.Remote; +import org.mxchange.jcountry.exceptions.CountryAlreadyAddedException; + +/** + * A remote interface for country informations + *

+ * @author Roland Häder + */ +@Remote +public interface AdminCountrySessionBeanRemote extends Serializable { + + /** + * Adds given country to database. A pre-check is always done and if found, + * a checked exception is thrown. + *

+ * @param country Country instance to add (persist) + *

+ * @return Updated country instance with timestamp and id number + *

+ * @throws org.mxchange.jcountry.exceptions.CountryAlreadyAddedException If the country is already added + */ + Country addCountry (final Country country) throws CountryAlreadyAddedException; + +} diff --git a/src/org/mxchange/jcountry/model/data/CountrySingletonBeanRemote.java b/src/org/mxchange/jcountry/model/data/CountrySingletonBeanRemote.java index 1a3f43a..3e7d7aa 100644 --- a/src/org/mxchange/jcountry/model/data/CountrySingletonBeanRemote.java +++ b/src/org/mxchange/jcountry/model/data/CountrySingletonBeanRemote.java @@ -16,11 +16,9 @@ */ package org.mxchange.jcountry.model.data; -import org.mxchange.jcountry.model.data.Country; import java.io.Serializable; import java.util.List; import javax.ejb.Remote; -import org.mxchange.jcountry.exceptions.CountryAlreadyAddedException; /** * A remote interface for country informations @@ -30,18 +28,6 @@ import org.mxchange.jcountry.exceptions.CountryAlreadyAddedException; @Remote public interface CountrySingletonBeanRemote extends Serializable { - /** - * Adds given country to database. A pre-check is always done and if found, - * a checked exception is thrown. - *

- * @param country Country instance to add (persist) - *

- * @return Updated country instance with timestamp and id number - *

- * @throws org.mxchange.jcountry.exceptions.CountryAlreadyAddedException If the country is already added - */ - Country addCountry (final Country country) throws CountryAlreadyAddedException; - /** * All registered countries *