]> git.mxchange.org Git - addressbook-mailer-ejb.git/commitdiff
added registration timestamp for user and contact instance
authorRoland Haeder <roland@mxchange.org>
Tue, 12 Apr 2016 16:12:44 +0000 (18:12 +0200)
committerRoland Haeder <roland@mxchange.org>
Tue, 12 Apr 2016 16:13:02 +0000 (18:13 +0200)
src/java/org/mxchange/jusercore/model/register/AddressbookUserRegistrationSessionBean.java

index e0c33dd6a7fba2a4a60f436a0c94c85c4a234e33..250611c62d5f9a69a4d546c760d49ebe82bdfe7b 100644 (file)
@@ -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);