Examples of evictEntity()


Examples of org.hibernate.Cache.evictEntity()

                cache.evictEntityRegion(entityName);
            }
        } else {
            for(String entityName : entityNames) {
                for(Serializable entityId : entityIds) {
                    cache.evictEntity(entityName, entityId);
                }
            }
        }

        return "操作成功";
View Full Code Here

Examples of org.hibernate.Cache.evictEntity()

        for (final Entry<Class<?>, Collection<Serializable>> evictedEntityEntry : entitiesToEvict.entrySet()) {
            final Class<?> entityClass = evictedEntityEntry.getKey();
            final List<String> collectionRoles = getCollectionRoles(sessionFactory, entityClass);
           
            for (final Serializable id : evictedEntityEntry.getValue()) {
                cache.evictEntity(entityClass, id);
                evictedEntities++;
               
                for (final String collectionRole : collectionRoles) {
                    cache.evictCollection(collectionRole, id);
                    evictedCollections++;
View Full Code Here

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

Examples of org.hibernate.SessionFactory.evictEntity()

  @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

Examples of org.hibernate.SessionFactory.evictEntity()

   
    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

Examples of railo.runtime.orm.ORMSession.evictEntity()

  public static String call(PageContext pc,String entityName) throws PageException {
    return call(pc, entityName,null);
  }
  public static String call(PageContext pc,String entityName,String primaryKey) throws PageException {
    ORMSession session=ORMUtil.getSession(pc);
    if(StringUtil.isEmpty(primaryKey))session.evictEntity(pc, entityName);
    else session.evictEntity(pc, entityName,primaryKey);
    return null;
  }
}
View Full Code Here

Examples of railo.runtime.orm.ORMSession.evictEntity()

    return call(pc, entityName,null);
  }
  public static String call(PageContext pc,String entityName,String primaryKey) throws PageException {
    ORMSession session=ORMUtil.getSession(pc);
    if(StringUtil.isEmpty(primaryKey))session.evictEntity(pc, entityName);
    else session.evictEntity(pc, entityName,primaryKey);
    return null;
  }
}
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.