]> git.mxchange.org Git - pizzaservice-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:12:44 +0000 (18:12 +0200)
src/java/org/mxchange/jusercore/model/register/PizzaUserRegistrationSessionBean.java

index 63c01d0aed0f6ae58d98a46f2972dab90a78d9b6..e8bbfca0ad737d26f1e55074b2d4bb7312413c0f 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 PizzaUserRegistrationSessionBean extends BaseDatabaseBean implement
                        throw new EmailAddressAlreadyRegisteredException(user);
                }
 
+               // Set created timestamp
+               user.setUserCreated(new GregorianCalendar());
+               user.getUserContact().setContactCreated(new GregorianCalendar());
+
                // Persist it
                this.getEntityManager().persist(user);