From: Roland Haeder Date: Tue, 19 Apr 2016 18:02:47 +0000 (+0200) Subject: added timestamp as the EJB should take care of it X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6677765e74d9f8a2b0af3df89ab40563cb849b66;p=jjobs-ejb.git added timestamp as the EJB should take care of it --- 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);