From b06601b4570915bb3839e624c76c3681b3dc55e0 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Tue, 12 Apr 2016 18:12:44 +0200 Subject: [PATCH] added registration timestamp for user and contact instance --- .../register/AddressbookUserRegistrationSessionBean.java | 5 +++++ 1 file changed, 5 insertions(+) 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); -- 2.39.5