Code example for EmptyInterceptor

0
 * 
 * @author 배성혁 sunghyouk.bae@gmail.com 
 * @since 2013. 11. 28. 오후 1:50 
 */ 
@Slf4j 
public class UpdatedTimestampInterceptor extends EmptyInterceptor {
 
    /** 
     * 엔티티 저장 전에 최신 갱신 시각을 새롭게 갱신합니다. 
     */ 
    @Override 
    public void preFlush(Iterator entities) {
        while (entities.hasNext()) {
            Object entity = entities.next();
            if (entity instanceof UpdatedTimestampEntity) { 
                ((UpdatedTimestampEntity) entity).updateUpdatedTimestamp(); 
            } 
        } 
    } 
 
Contextual code suggestions in your IDE  Get Codota for Java