From: Roland Haeder Date: Tue, 12 Apr 2016 16:12:44 +0000 (+0200) Subject: added registration timestamp for user and contact instance X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b06601b4570915bb3839e624c76c3681b3dc55e0;p=addressbook-mailer-ejb.git added registration timestamp for user and contact instance --- diff --git a/src/java/org/mxchange/jusercore/model/register/AddressbookUserRegistrationSessionBean.java b/src/java/org/mxchange/jusercore/model/register/AddressbookUserRegistrationSessionBean.java index e0c33dd..250611c 100644 --- a/src/java/org/mxchange/jusercore/model/register/AddressbookUserRegistrationSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/register/AddressbookUserRegistrationSessionBean.java @@ -17,6 +17,7 @@ package org.mxchange.jusercore.model.register; import java.text.MessageFormat; +import java.util.GregorianCalendar; import javax.ejb.EJB; import javax.ejb.Stateless; import org.mxchange.jcoreee.database.BaseDatabaseBean; @@ -100,6 +101,10 @@ public class AddressbookUserRegistrationSessionBean extends BaseDatabaseBean imp throw new EmailAddressAlreadyRegisteredException(user); } + // Set created timestamp + user.setUserCreated(new GregorianCalendar()); + user.getUserContact().setContactCreated(new GregorianCalendar()); + // Persist it this.getEntityManager().persist(user);