Package org.hibernate

Examples of org.hibernate.SessionFactory.evictEntity()


    Map classMetadata = sf.getAllClassMetadata();
    for (Object epo : classMetadata.values()) {
      EntityPersister ep = (EntityPersister) epo;
      if (ep.hasCache()) {
        sf.evictEntity(ep.getCache().getRegionName());
      }
    }

    Map collMetadata = sf.getAllCollectionMetadata();
    for (Object abstractCollectionPersistObject : collMetadata.values()) {
View Full Code Here


  @Override
  public void evictEntity(PageContext pc, String entityName, String id) throws PageException {
    SessionFactory f = getSessionFactory(pc);
   
    if(id==null) {
      f.evictEntity(entityName);
    }
    else {
      f.evictEntity(entityName,CommonUtil.toSerializable(id));
    }
  }
View Full Code Here

   
    if(id==null) {
      f.evictEntity(entityName);
    }
    else {
      f.evictEntity(entityName,CommonUtil.toSerializable(id));
    }
  }
 
  @Override
  public void evictCollection(PageContext pc, String entityName, String collectionName) throws PageException {
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.