From dcafaea9d04d49a8560c8c589bf15712b3ec88ca Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Tue, 19 Apr 2016 20:02:33 +0200 Subject: [PATCH] added timestamp as the EJB should take care of it --- .../addressbook/model/addressbook/AddressbookSessionBean.java | 4 ++++ 1 file changed, 4 insertions(+) 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); -- 2.39.5