Examples of Auditable


Examples of org.sete.common.Auditable

    protected Serializable entityIsTransient(SaveOrUpdateEvent event) throws HibernateException {
        Serializable id = super.entityIsTransient(event);
        Object object = event.getObject();

        if(isAuditable(object)) {
            Auditable auditable = (Auditable) object;
            Integer uid = getAuthenticatedExecutingUser();
            Date date = new Date();

            auditable.setCreatedBy(uid);
            auditable.setCreatedOn(date);
            auditable.setLastUpdatedBy(uid);
            auditable.setLastUpdateOn(date);
        }

        return id;
    }
View Full Code Here

Examples of org.sete.domain.Auditable

    protected Serializable entityIsPersistent(SaveOrUpdateEvent event) throws HibernateException {
        Serializable id = super.entityIsPersistent(event);
        Object object = event.getObject();

        if(isAuditable(object)) {
            Auditable auditable = (Auditable) object;
            Integer uid = getAuthenticatedExecutingUser();
            auditable.setLastUpdatedBy(uid);
            auditable.setLastUpdateOn(new Date());
        }

        return id;
    }
View Full Code Here

Examples of org.sete.domain.Auditable

    protected Serializable entityIsTransient(SaveOrUpdateEvent event) throws HibernateException {
        Serializable id = super.entityIsTransient(event);
        Object object = event.getObject();

        if(isAuditable(object)) {
            Auditable auditable = (Auditable) object;
            Integer uid = getAuthenticatedExecutingUser();
            Date date = new Date();

            auditable.setCreatedBy(uid);
            auditable.setCreatedOn(date);
            auditable.setLastUpdatedBy(uid);
            auditable.setLastUpdateOn(date);
        }

        return id;
    }
View Full Code Here

Examples of org.springframework.data.domain.Auditable

        if (obj instanceof Auditable) {
         
          DateTime currentTimeStamp = new DateTime();
          String currentUser = auditorAwareBean.getCurrentAuditor();
         
          Auditable auditable = (Auditable) obj;
          if (auditable.getCreatedDate() == null) {
            auditable.setCreatedDate(currentTimeStamp);
            auditable.setCreatedBy(currentUser);
          }
          auditable.setLastModifiedBy(currentUser);
          auditable.setLastModifiedDate(currentTimeStamp);
         
        }
       
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.