org.hibernate.SessionFactory.evictEntity()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(130)

本文整理了Java中org.hibernate.SessionFactory.evictEntity()方法的一些代码示例,展示了SessionFactory.evictEntity()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SessionFactory.evictEntity()方法的具体详情如下:
包路径:org.hibernate.SessionFactory
类名称:SessionFactory
方法名:evictEntity

SessionFactory.evictEntity介绍

[英]Evict all entries from the second-level cache. This method occurs outside of any transaction; it performs an immediate "hard" remove, so does not respect any transaction isolation semantics of the usage strategy. Use with care.
[中]从二级缓存中逐出所有条目。这种方法发生在任何交易之外;它立即执行“硬”删除,因此不遵守使用策略的任何事务隔离语义。小心使用。

代码示例

代码示例来源:origin: picocontainer/picocontainer

/** {@inheritDoc} **/
@Deprecated
public void evictEntity(String entityName) {
  delegate.evictEntity(entityName);
}

代码示例来源:origin: org.codehaus.griffon.plugins/griffon-hibernate4-core

@Override
@Deprecated
public void evictEntity(String entityName, Serializable id) throws HibernateException {
  delegate.evictEntity(entityName, id);
}

代码示例来源:origin: org.codehaus.griffon.plugins/griffon-hibernate4-core

@Override
@Deprecated
public void evictEntity(String entityName) throws HibernateException {
  delegate.evictEntity(entityName);
}

代码示例来源:origin: picocontainer/picocontainer

/** {@inheritDoc} **/
@Deprecated
public void evictEntity(String entityName, Serializable id) {
  delegate.evictEntity(entityName, id);
}

代码示例来源:origin: picocontainer/picocontainer

/** {@inheritDoc} **/
@Deprecated
public void evictEntity(String entityName) {
  delegate.evictEntity(entityName);
}

代码示例来源:origin: picocontainer/picocontainer

/** {@inheritDoc} **/
@Deprecated
public void evictEntity(String entityName, Serializable id) {
  delegate.evictEntity(entityName, id);
}

代码示例来源:origin: org.jboss.ejb3/jboss-ejb3-jpa-int

@SuppressWarnings("deprecation")
public void evictEntity(String entityName, Serializable id) throws HibernateException
{
 getSessionFactory().evictEntity(entityName, id);
}

代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all

public void evictEntity(String entityName) throws HibernateException {
  getImpl().evictEntity(entityName);
}

代码示例来源:origin: hibernate/hibernate

public void evictEntity(String entityName) throws HibernateException {
  getImpl().evictEntity(entityName);
}

代码示例来源:origin: org.jboss.ejb3/jboss-ejb3-jpa-int

@SuppressWarnings("deprecation")
public void evictEntity(String entityName) throws HibernateException
{
 getSessionFactory().evictEntity(entityName);
}

代码示例来源:origin: hibernate/hibernate

public void evictEntity(String entityName, Serializable id)
throws HibernateException {
  getImpl().evictEntity(entityName, id);
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate

public void evictEntity(String entityName) throws HibernateException {
  getImpl().evictEntity(entityName);
}

代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all

public void evictEntity(String entityName, Serializable id)
throws HibernateException {
  getImpl().evictEntity(entityName, id);
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core

public void evictEntity(String entityName, Serializable id)
throws HibernateException {
  getImpl().evictEntity(entityName, id);
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate

public void evictEntity(String entityName, Serializable id)
throws HibernateException {
  getImpl().evictEntity(entityName, id);
}

代码示例来源:origin: org.grails/grails-hibernate

@Deprecated
public void evictEntity(String entityName) throws HibernateException {
  getCurrentSessionFactory().evictEntity(entityName);
}

代码示例来源:origin: com.carbonfive/db-support

public void evictEntity(String entityName) throws HibernateException
{
  getSessionFactory().evictEntity(entityName);
}

代码示例来源:origin: com.carbonfive/db-support

public void evictEntity(String entityName, Serializable id) throws HibernateException
{
  getSessionFactory().evictEntity(entityName, id);
}

代码示例来源:origin: org.grails/grails-hibernate

@Deprecated
public void evictEntity(String entityName, Serializable id) throws HibernateException {
  getCurrentSessionFactory().evictEntity(entityName, id);
}

代码示例来源:origin: org.jbpm.jbpm3/jbpm-jpdl

public static void clearHibernateCache(SessionFactory sessionFactory) {
 sessionFactory.evictQueries();
 Map classMetadata = sessionFactory.getAllClassMetadata();
 for (Iterator iter = classMetadata.keySet().iterator(); iter.hasNext();) {
  String entityName = (String) iter.next();
  sessionFactory.evictEntity(entityName);
 }
 Map collectionMetadata = sessionFactory.getAllCollectionMetadata();
 for (Iterator iter = collectionMetadata.keySet().iterator(); iter.hasNext();) {
  String collectionName = (String) iter.next();
  sessionFactory.evictCollection(collectionName);
 }
}

相关文章