Package org.hibernate.event

Examples of org.hibernate.event.PostUpdateEventListener


public class DefaultResourceCacheProvider implements ResourceCacheProvider {
  private static Log log = LogFactory.getLog(DefaultResourceCacheProvider.class);
 
  public DefaultResourceCacheProvider(){
    //添加Hibernate事件监听器,来实现资源缓存的更新
    HibernateEventListener.getInstance().addPostUpdateEventListener(new PostUpdateEventListener(){
      @Override
      public void onPostUpdate(PostUpdateEvent event) {
        DefaultResourceCacheProvider.this.clearStaticResouceCache(event.getId().toString(),RestContextManager.getRequest());
      }
    });
View Full Code Here


    } else {
      postUpdateEventListeners = eventListeners.getPostUpdateEventListeners();
    }
    List<PostUpdateEventListener> tempPostUpdateEventListeners = Lists.newArrayList();
    for (int i = 0; i < postUpdateEventListeners.length; i++) {
      PostUpdateEventListener postUpdateEventListener = postUpdateEventListeners[i];
      if (!(postUpdateEventListener instanceof HibernateEventListener)) {
        tempPostUpdateEventListeners.add(postUpdateEventListener);
      }
    }
    if (registerPostCommitListeneres) {
View Full Code Here

TOP

Related Classes of org.hibernate.event.PostUpdateEventListener

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.