From: Roland Haeder Date: Mon, 11 Apr 2016 17:57:05 +0000 (+0200) Subject: addCountry() now must return the updated instance (with timestamp and valid countryId... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b3da48b0ddca1b840aa67a5a07a39694afd79653;p=pizzaservice-mailer-ejb.git addCountry() now must return the updated instance (with timestamp and valid countryId field) --- diff --git a/src/java/org/mxchange/jcountry/data/AddressbookCountrySingletonBean.java b/src/java/org/mxchange/jcountry/data/AddressbookCountrySingletonBean.java index fbcdb44..2da1508 100644 --- a/src/java/org/mxchange/jcountry/data/AddressbookCountrySingletonBean.java +++ b/src/java/org/mxchange/jcountry/data/AddressbookCountrySingletonBean.java @@ -41,7 +41,7 @@ public class AddressbookCountrySingletonBean extends BaseDatabaseBean implements 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 AddressbookCountrySingletonBean extends BaseDatabaseBean implements // Flush it to get id number back, maybe it is directly needed? this.getEntityManager().flush(); + + // Return updated instance + return country; } @Override