]> git.mxchange.org Git - jjobs-ejb.git/commitdiff
addCountry() now must return the updated instance (with timestamp and valid countryId...
authorRoland Haeder <roland@mxchange.org>
Mon, 11 Apr 2016 17:57:05 +0000 (19:57 +0200)
committerRoland Haeder <roland@mxchange.org>
Mon, 11 Apr 2016 17:58:10 +0000 (19:58 +0200)
src/java/org/mxchange/jcountry/data/JobsCountrySingletonBean.java

index 0dfc8571e72a7b06c0dc3db08baa8d687d131d5b..7d0569369782c1ed19f72f369edc329fd1131f61 100644 (file)
@@ -41,7 +41,7 @@ public class JobsCountrySingletonBean extends BaseDatabaseBean implements Countr
        private static final long serialVersionUID = 15_846_983_298_691_207L;
 
        @Override
-       public void addCountry (final Country country) throws CountryAlreadyAddedException {
+       public Country addCountry (final Country country) throws CountryAlreadyAddedException {
                // Is it already there?
                if (null == country) {
                        // Throw NPE
@@ -68,6 +68,9 @@ public class JobsCountrySingletonBean extends BaseDatabaseBean implements Countr
 
                // Flush it to get id number back, maybe it is directly needed?
                this.getEntityManager().flush();
+
+               // Return updated instance
+               return country;
        }
 
        @Override