From: Roland Haeder Date: Tue, 19 Apr 2016 18:02:33 +0000 (+0200) Subject: added timestamp as the EJB should take care of it X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=dcafaea9d04d49a8560c8c589bf15712b3ec88ca;p=jjobs-mailer-ejb.git added timestamp as the EJB should take care of it --- diff --git a/src/java/org/mxchange/addressbook/model/addressbook/AddressbookSessionBean.java b/src/java/org/mxchange/addressbook/model/addressbook/AddressbookSessionBean.java index 0f31249..4aac269 100644 --- a/src/java/org/mxchange/addressbook/model/addressbook/AddressbookSessionBean.java +++ b/src/java/org/mxchange/addressbook/model/addressbook/AddressbookSessionBean.java @@ -18,6 +18,7 @@ package org.mxchange.addressbook.model.addressbook; import java.text.MessageFormat; import java.util.ArrayList; +import java.util.GregorianCalendar; import java.util.LinkedList; import java.util.List; import javax.ejb.Stateless; @@ -238,6 +239,9 @@ public class AddressbookSessionBean extends BaseDatabaseBean implements Addressb throw new AddressbookNameAlreadyUsedException(addressbook); } + // Add timestamp of creation + addressbook.setAddressbookCreated(new GregorianCalendar()); + // Persist it now this.getEntityManager().persist(addressbook);