Esempio n. 1
0
 @Override
 public boolean onPreInsert(PreInsertEvent event) {
   if (event.getEntity() instanceof DomainEntityCU) {
     DomainEntityCU instance = (DomainEntityCU) event.getEntity();
     instance.setUpdatedAt(new Date());
     instance.setCreatedAt(new Date());
   }
   return false;
 }
 @Override
 public boolean onPreInsert(PreInsertEvent event) {
   Object entity = event.getEntity();
   if (entity instanceof IUpdateTimestampedEntity) {
     ((IUpdateTimestampedEntity) entity).updateUpdateTimestamp();
     if (log.isDebugEnabled()) log.debug("UpdateTimestampedEntity의 updateTimestamp 값을 설정했습니다.");
   }
   return false;
 }