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

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

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

SessionFactory.getDefinedFilterNames介绍

[英]Obtain a set of the names of all filters defined on this SessionFactory.
[中]获取在此SessionFactory上定义的所有筛选器的一组名称。

代码示例

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

/** {@inheritDoc} **/
@SuppressWarnings("rawtypes")
public Set getDefinedFilterNames() {
  return delegate.getDefinedFilterNames();
}

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

/** {@inheritDoc} **/
@SuppressWarnings("unchecked")
public Set getDefinedFilterNames() {
  return delegate.getDefinedFilterNames();
}

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

@Override
public Set getDefinedFilterNames() {
  return delegate.getDefinedFilterNames();
}

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

@Override
public Set getDefinedFilterNames() {
  return delegate.getDefinedFilterNames();
}

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

@SuppressWarnings("rawtypes")
public static void enableDynamicFilterEnablerIfPresent(SessionFactory sessionFactory, Session session) {
  if (sessionFactory != null && session != null) {
    final Set definedFilterNames = sessionFactory.getDefinedFilterNames();
    if (definedFilterNames != null && definedFilterNames.contains(DYNAMIC_FILTER_ENABLER))
      session.enableFilter(DYNAMIC_FILTER_ENABLER); // work around for HHH-2624
  }
}

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

@SuppressWarnings("unchecked")
public Set getDefinedFilterNames()
{
 return getSessionFactory().getDefinedFilterNames();
}

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

public Set getDefinedFilterNames() {
  return getImpl().getDefinedFilterNames();
}

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

public Set getDefinedFilterNames()
{
  return getSessionFactory().getDefinedFilterNames();
}

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

public Set getDefinedFilterNames() {
  return getCurrentSessionFactory().getDefinedFilterNames();
}

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

public Set getDefinedFilterNames() {
  return getImpl().getDefinedFilterNames();
}

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

public Set getDefinedFilterNames() {
  return getImpl().getDefinedFilterNames();
}

代码示例来源:origin: br.com.jarch/jarch-crud

static void addFilterMultitenat(EntityManager entityManager, MultiTenant multiTenant) {
    if (entityManager.unwrap(Session.class).getSessionFactory().getDefinedFilterNames().contains("tenant")) {
      entityManager
          .unwrap(Session.class)
          .enableFilter("tenant")
          .setParameter("tenantId", multiTenant.get());
    }
  }
}

相关文章