Package org.sete.common

Examples of org.sete.common.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


    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

TOP

Related Classes of org.sete.common.Auditable

Copyright © 2018 www.massapicom. 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.