Code example for EmptyInterceptor

0
 * Hibernate data operations. 
 *  
 * @author Erez Mazor (erezmazor@gmail.com) 
 *  
 */ 
public class HibernateEntityInterceptor extends EmptyInterceptor {
 
   private static final long serialVersionUID = 1L;
 
   private static final Log LOG = LogFactory
         .getLog(HibernateEntityInterceptor.class); 
 
   @Override 
   public boolean onSave(final Object entity, final Serializable id,
         final Object[] state, final String[] propertyNames, final Type[] types) {
      if (LOG.isDebugEnabled()) {
         LOG.debug("HibernateEntityInterceptor.onSave(): "
               + createEntityString(entity, id));
      } 
      return true;