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=cd51014f881d51323521576313fcfe6372bdb56b;p=pizzaservice-ejb.git added registration timestamp for user and contact instance --- diff --git a/src/java/org/mxchange/jusercore/model/register/PizzaUserRegistrationSessionBean.java b/src/java/org/mxchange/jusercore/model/register/PizzaUserRegistrationSessionBean.java index 63c01d0..e8bbfca 100644 --- a/src/java/org/mxchange/jusercore/model/register/PizzaUserRegistrationSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/register/PizzaUserRegistrationSessionBean.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 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);