From 6677765e74d9f8a2b0af3df89ab40563cb849b66 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Tue, 19 Apr 2016 20:02:47 +0200 Subject: [PATCH] added timestamp as the EJB should take care of it --- .../jjobs/model/addressbook/JobsAddressbookSessionBean.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/java/org/mxchange/jjobs/model/addressbook/JobsAddressbookSessionBean.java b/src/java/org/mxchange/jjobs/model/addressbook/JobsAddressbookSessionBean.java index cfbe1eb..f71bdd1 100644 --- a/src/java/org/mxchange/jjobs/model/addressbook/JobsAddressbookSessionBean.java +++ b/src/java/org/mxchange/jjobs/model/addressbook/JobsAddressbookSessionBean.java @@ -17,6 +17,7 @@ package org.mxchange.jjobs.model.addressbook; import java.text.MessageFormat; +import java.util.GregorianCalendar; import java.util.List; import javax.ejb.Stateless; import javax.persistence.NoResultException; @@ -98,6 +99,9 @@ public class JobsAddressbookSessionBean extends BaseDatabaseBean implements Jobs throw new AddressbookNameAlreadyUsedException(addressbook); } + // Add timestamp of creation + addressbook.setAddressbookCreated(new GregorianCalendar()); + // Persist it now this.getEntityManager().persist(addressbook); -- 2.39.5