From 9d11a87f7bc6f87040334965c41a4352ea389737 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 15 Oct 2017 23:07:53 +0200 Subject: [PATCH] Continued: - splitted general and administrative methods as usual everywhere MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../data/AdminCountrySessionBeanRemote.java | 43 +++++++++++++++++++ .../data/CountrySingletonBeanRemote.java | 14 ------ 2 files changed, 43 insertions(+), 14 deletions(-) create mode 100644 src/org/mxchange/jcountry/model/data/AdminCountrySessionBeanRemote.java 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 *

-- 2.39.5