]> git.mxchange.org Git - jcountry-lib.git/blobdiff - src/org/mxchange/jcountry/data/CountrySingletonBeanRemote.java
Let addCountry() return the updated instance which should have a countryId field...
[jcountry-lib.git] / src / org / mxchange / jcountry / data / CountrySingletonBeanRemote.java
index e019ca028889d930fdc23e113c7b5abf0e937118..da3732c4c2c4d22a73b762955b3aaef9fedf9c52 100644 (file)
@@ -18,14 +18,29 @@ package org.mxchange.jcountry.data;
 
 import java.io.Serializable;
 import java.util.List;
+import javax.ejb.Remote;
+import org.mxchange.jcountry.exceptions.CountryAlreadyAddedException;
 
 /**
  * A remote interface for country informations
  * <p>
  * @author Roland Haeder<roland@mxchange.org>
  */
+@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.
+        * <p>
+        * @param country Country instance to add (persist)
+        * <p>
+        * @return Updated country instance with timestamp and id number
+        * <p>
+        * @throws org.mxchange.jcountry.exceptions.CountryAlreadyAddedException If the country is already added
+        */
+       Country addCountry (final Country country) throws CountryAlreadyAddedException;
+
        /**
         * All registered countries
         * <p>