Java 类org.hibernate.engine.FilterDefinition 实例源码

项目:cacheonix-core    文件:HbmBinder.java   
private static void parseFilterDef(Element element, Mappings mappings) {
    String name = element.attributeValue( "name" );
    log.debug( "Parsing filter-def [" + name + "]" );
    String defaultCondition = element.getTextTrim();
    if ( StringHelper.isEmpty( defaultCondition ) ) {
        defaultCondition = element.attributeValue( "condition" );
    }
    HashMap paramMappings = new HashMap();
    Iterator params = element.elementIterator( "filter-param" );
    while ( params.hasNext() ) {
        final Element param = (Element) params.next();
        final String paramName = param.attributeValue( "name" );
        final String paramType = param.attributeValue( "type" );
        log.debug( "adding filter parameter : " + paramName + " -> " + paramType );
        final Type heuristicType = TypeFactory.heuristicType( paramType );
        log.debug( "parameter heuristic type : " + heuristicType );
        paramMappings.put( paramName, heuristicType );
    }
    log.debug( "Parsed filter-def [" + name + "]" );
    FilterDefinition def = new FilterDefinition( name, defaultCondition, paramMappings );
    mappings.addFilterDefinition( def );
}
项目:common-security-module    文件:InstanceLevelSecurityTest.java   
public void testGetFiltersForUsers() throws Exception {
    SessionFactory sf=null;
    Configuration configuration = null;
    if(null == sf || sf.isClosed()){
        configuration = new Configuration().configure(hibernateCfgFileName);
        InstanceLevelSecurityHelper.getFiltersForUser(authorizationManager);
        sf = configuration.buildSessionFactory();
    }
    List<FilterDefinition> filterList=InstanceLevelSecurityHelper.getFiltersForGroups(authorizationManager);
    sf.close();
    for (Object filter:filterList)  
    {   try {
        printObject(filter, false);
        } catch (Exception e) {
            // TODO: handle exception
        }

    }
    assertEquals("GetFiltersForGroups Method successful",2, filterList.size()); 
}
项目:common-security-module    文件:InstanceLevelSecurityTest.java   
private void testGetFiltersForGroups() throws Exception {
    SessionFactory sf=null;
    Configuration configuration = null;
    if(null == sf || sf.isClosed()){
        configuration = new Configuration().configure(hibernateCfgFileName);
        InstanceLevelSecurityHelper.getFiltersForGroups(authorizationManager);
        sf = configuration.buildSessionFactory();
    }
    List<FilterDefinition> filterList=InstanceLevelSecurityHelper.getFiltersForGroups(authorizationManager);
    sf.close();
    for (Object filter:filterList)  
    {   try {
        printObject(filter, false);
        } catch (Exception e) {
            // TODO: handle exception
        }

    }
    assertEquals("GetFiltersForGroups Method successful",2, filterList.size()); 
}
项目:spring4-understanding    文件:LocalSessionFactoryBeanTests.java   
@Override
protected Configuration newConfiguration() throws HibernateException {
    return new Configuration() {
        @Override
        public void addFilterDefinition(FilterDefinition definition) {
            registeredFilterDefinitions.add(definition);
        }
    };
}
项目:cacheonix-core    文件:SessionImpl.java   
public Type getFilterParameterType(String filterParameterName) {
    errorIfClosed();
    checkTransactionSynchStatus();
    String[] parsed = parseFilterParameterName(filterParameterName);
    FilterDefinition filterDef = factory.getFilterDefinition( parsed[0] );
    if (filterDef == null) {
        throw new IllegalArgumentException("Filter [" + parsed[0] + "] not defined");
    }
    Type type = filterDef.getParameterType( parsed[1] );
    if (type == null) {
        // this is an internal error of some sort...
        throw new InternalError("Unable to locate type for filter parameter");
    }
    return type;
}
项目:cacheonix-core    文件:SessionFactoryImpl.java   
public FilterDefinition getFilterDefinition(String filterName) throws HibernateException {
    FilterDefinition def = ( FilterDefinition ) filters.get( filterName );
    if ( def == null ) {
        throw new HibernateException( "No such filter configured [" + filterName + "]" );
    }
    return def;
}
项目:class-guard    文件:LocalSessionFactoryBeanTests.java   
@Override
protected Configuration newConfiguration() throws HibernateException {
    return new Configuration() {
        @Override
        public void addFilterDefinition(FilterDefinition definition) {
            registeredFilterDefinitions.add(definition);
        }
    };
}
项目:cagrid-general    文件:InstanceLevelSecurityHelper.java   
/**
 * This method injects the security filters which are created for this application. It retrieves a list of all the filters which have 
 * been defined for this application from the CSM Database. Now for each filter in the list, it creates a new FilterDefinition object.
 * It then retrieves the Persistent Class from the passed Configuration Object using the class name for which the filter is defined.
 * It then adds the filter to the persistent class by setting the filtering query.
 * @param authorizationManager The CSM AuthorizationManager instance for this application
 * @param configuration The Hibernate Configuration initialized for this application
 * 
 */
public static void addFiltersForGroups(AuthorizationManager authorizationManager,Configuration configuration)
{
    boolean needsOptimisation = false;
    Properties props = configuration.getProperties();

    if(!isExistActiveMappingElement(authorizationManager))
        needsOptimisation = isMySQLDatabase(props,true);

    FilterClause searchFilterClause = new FilterClause();
    searchFilterClause.setClassName("*");
    SearchCriteria searchCriteria = new FilterClauseSearchCriteria(searchFilterClause);
    List list = authorizationManager.getObjects(searchCriteria);
    Iterator iterator = list.iterator();
    while (iterator.hasNext())
    {
        HashMap parameters = new HashMap();
        parameters.put("GROUP_NAMES", new StringType());
        parameters.put("APPLICATION_ID", new LongType());

        FilterClause filterClause = (FilterClause)iterator.next();
        FilterDefinition filterDefinition = new FilterDefinition (
                filterClause.getClassName().substring(filterClause.getClassName().lastIndexOf('.') + 1) + filterClause.getId(), "", parameters);
        configuration.addFilterDefinition(filterDefinition);
        PersistentClass persistentClass = configuration.getClassMapping(filterClause.getClassName());
        persistentClass.addFilter(
                filterClause.getClassName().substring(filterClause.getClassName().lastIndexOf('.') + 1) + filterClause.getId()
                , optimiseFilterQuery(needsOptimisation,filterClause.getGeneratedSQLForGroup()));
    }
}
项目:cagrid-general    文件:InstanceLevelSecurityHelper.java   
/**
 * This method injects the security filters which are created for this application. It retrieves a list of all the filters which have 
 * been defined for this application from the CSM Database. Now for each filter in the list, it creates a new FilterDefinition object.
 * 
 * @param authorizationManager The CSM AuthorizationManager instance for this application
 * @param List<FilterDefinition> The Hibernate FilterDefinition List.
 */
public static List<FilterDefinition> getFiltersForGroups(AuthorizationManager authorizationManager) throws CSException
{
    Properties props = new Properties();
    ApplicationContext ac = authorizationManager.getApplicationContext();
    props.setProperty("hibernate.connection.url", ac.getDatabaseURL());
    props.setProperty("hibernate.connection.username", ac.getDatabaseUserName());
    props.setProperty("hibernate.connection.password", ac.getDatabasePassword());
    props.setProperty("hibernate.connection.driver", ac.getDatabaseDriver());
    props.setProperty("hibernate.dialect", ac.getDatabaseDialect());


    boolean needsOptimisation = false;
    if(!isExistActiveMappingElement(authorizationManager))
        needsOptimisation = isMySQLDatabase(props,false);


    List<FilterDefinition> filterDefinitionList = new ArrayList<FilterDefinition>();
    FilterClause searchFilterClause = new FilterClause();
    searchFilterClause.setClassName("*");
    SearchCriteria searchCriteria = new FilterClauseSearchCriteria(searchFilterClause);
    List list = authorizationManager.getObjects(searchCriteria);
    Iterator iterator = list.iterator();
    while (iterator.hasNext())
    {
        HashMap parameters = new HashMap();
        parameters.put("GROUP_NAMES", new StringType());
        parameters.put("APPLICATION_ID", new LongType());

        FilterClause filterClause = (FilterClause)iterator.next();
        FilterDefinition filterDefinition = new FilterDefinition (
                filterClause.getClassName().substring(
                        filterClause.getClassName().lastIndexOf('.') + 1) + filterClause.getId(),
                        optimiseFilterQuery(needsOptimisation,filterClause.getGeneratedSQLForGroup()), 
                        parameters);
        if(filterDefinition!=null) filterDefinitionList.add(filterDefinition);
    }
    return filterDefinitionList;
}
项目:cagrid-general    文件:InstanceLevelSecurityHelper.java   
/**
 * This method injects the security filters which are created for this application. It retrieves a list of all the filters which have 
 * been defined for this application from the CSM Database. Now for each filter in the list, it creates a new FilterDefinition object.
 * It then retrieves the Persistent Class from the passed Configuration Object using the class name for which the filter is defined.
 * It then adds the filter to the persistent class by setting the filtering query.
 * @param authorizationManager The CSM AuthorizationManager instance for this application
 * @param configuration The Hibernate Configuration initialized for this application
 */
public static void addFilters(AuthorizationManager authorizationManager,Configuration configuration)
{
    boolean needsOptimisation = false;
    Properties props = configuration.getProperties();

    if(!isExistActiveMappingElement(authorizationManager))
        needsOptimisation = isMySQLDatabase(props,true);


    FilterClause searchFilterClause = new FilterClause();
    searchFilterClause.setClassName("*");
    SearchCriteria searchCriteria = new FilterClauseSearchCriteria(searchFilterClause);
    List list = authorizationManager.getObjects(searchCriteria);
    Iterator iterator = list.iterator();
    while (iterator.hasNext())
    {
        HashMap parameters = new HashMap();
        parameters.put("USER_NAME", new StringType());
        parameters.put("APPLICATION_ID", new LongType());

        FilterClause filterClause = (FilterClause)iterator.next();
        FilterDefinition filterDefinition = new FilterDefinition (filterClause.getClassName().substring(filterClause.getClassName().lastIndexOf('.') + 1) + filterClause.getId(), "", parameters);
        configuration.addFilterDefinition(filterDefinition);
        PersistentClass persistentClass = configuration.getClassMapping(filterClause.getClassName());
        persistentClass.addFilter(
                filterClause.getClassName().substring(filterClause.getClassName().lastIndexOf('.') + 1) + filterClause.getId()
                ,optimiseFilterQuery(needsOptimisation,filterClause.getGeneratedSQLForUser()));
    }


}
项目:cagrid-general    文件:InstanceLevelSecurityHelper.java   
/**
 * This method injects the security filters which are created for this application. It retrieves a list of all the filters which have 
 * been defined for this application from the CSM Database. Now for each filter in the list, it creates a new FilterDefinition object.
 * 
 * 
 * @param authorizationManager The CSM AuthorizationManager instance for this application
 * @param List<FilterDefinition> The Hibernate FilterDefinition List.
 */
public static List<FilterDefinition> getFiltersForUser(AuthorizationManager authorizationManager) throws CSException
{
    Properties props = new Properties();
    ApplicationContext ac = authorizationManager.getApplicationContext();
    props.setProperty("hibernate.connection.url", ac.getDatabaseURL());
    props.setProperty("hibernate.connection.username", ac.getDatabaseUserName());
    props.setProperty("hibernate.connection.password", ac.getDatabasePassword());
    props.setProperty("hibernate.connection.driver", ac.getDatabaseDriver());
    props.setProperty("hibernate.dialect", ac.getDatabaseDialect());


    boolean needsOptimisation = false;
    if(!isExistActiveMappingElement(authorizationManager))      
        needsOptimisation = isMySQLDatabase(props,false);

    List<FilterDefinition> filterDefinitionList = new ArrayList<FilterDefinition>();

    FilterClause searchFilterClause = new FilterClause();
    searchFilterClause.setClassName("*");
    SearchCriteria searchCriteria = new FilterClauseSearchCriteria(searchFilterClause);
    List list = authorizationManager.getObjects(searchCriteria);
    Iterator iterator = list.iterator();
    while (iterator.hasNext())
    {
        HashMap parameters = new HashMap();
        parameters.put("USER_NAME", new StringType());
        parameters.put("APPLICATION_ID", new LongType());

        FilterClause filterClause = (FilterClause)iterator.next();
        FilterDefinition filterDefinition = new FilterDefinition (
                filterClause.getClassName().substring(filterClause.getClassName().lastIndexOf('.') + 1) + filterClause.getId(),  
                optimiseFilterQuery(needsOptimisation,filterClause.getGeneratedSQLForUser()),
                parameters);
        if(filterDefinition!=null) filterDefinitionList.add(filterDefinition);
    }
    return filterDefinitionList;


}
项目:common-security-module    文件:InstanceLevelSecurityHelper.java   
/**
 * This method injects the security filters which are created for this application. It retrieves a list of all the filters which have 
 * been defined for this application from the CSM Database. Now for each filter in the list, it creates a new FilterDefinition object.
 * It then retrieves the Persistent Class from the passed Configuration Object using the class name for which the filter is defined.
 * It then adds the filter to the persistent class by setting the filtering query.
 * @param authorizationManager The CSM AuthorizationManager instance for this application
 * @param configuration The Hibernate Configuration initialized for this application
 * 
 */
public static void addFiltersForGroups(AuthorizationManager authorizationManager,Configuration configuration)
{
    boolean needsOptimisation = false;
    Properties props = configuration.getProperties();

    //If using InstanceLevel Query Performance Enhancements of 4.2, then no need to optimize query for MySQL Db.
    if(!isExistActiveMappingElement(authorizationManager))  
        needsOptimisation = isMySQLDatabase(props,true);

    // Inject CSM Filters for Group
    List list = retriveAllCsmFilterClause(authorizationManager);
    Iterator iterator = list.iterator();
    while (iterator.hasNext())
    {
        HashMap parameters = new HashMap();
        parameters.put("GROUP_NAMES", new StringType());
        parameters.put("APPLICATION_ID", new LongType());

        FilterClause filterClause = (FilterClause)iterator.next();
        FilterDefinition filterDefinition = new FilterDefinition (
                filterClause.getClassName().substring(filterClause.getClassName().lastIndexOf('.') + 1) + filterClause.getId(), "", parameters);
        configuration.addFilterDefinition(filterDefinition);
        PersistentClass persistentClass = configuration.getClassMapping(filterClause.getClassName());
        persistentClass.addFilter(
                filterClause.getClassName().substring(filterClause.getClassName().lastIndexOf('.') + 1) + filterClause.getId()
                , optimiseFilterQuery(needsOptimisation,filterClause.getGeneratedSQLForGroup()));
    }
}
项目:common-security-module    文件:InstanceLevelSecurityHelper.java   
/**
 * This method injects the security filters which are created for this application. It retrieves a list of all the filters which have 
 * been defined for this application from the CSM Database. Now for each filter in the list, it creates a new FilterDefinition object.
 * 
 * @param authorizationManager The CSM AuthorizationManager instance for this application
 * @param List<FilterDefinition> The Hibernate FilterDefinition List.
 */
public static List<FilterDefinition> getFiltersForGroups(AuthorizationManager authorizationManager) throws CSException
{
    Properties props = new Properties();
    ApplicationContext ac = authorizationManager.getApplicationContext();
    props.setProperty("hibernate.connection.url", ac.getDatabaseURL());
    props.setProperty("hibernate.connection.username", ac.getDatabaseUserName());
    props.setProperty("hibernate.connection.password", ac.getDatabasePassword());
    props.setProperty("hibernate.connection.driver", ac.getDatabaseDriver());
    props.setProperty("hibernate.dialect", ac.getDatabaseDialect());


    boolean needsOptimisation = false;
    if(!isExistActiveMappingElement(authorizationManager))
        needsOptimisation = isMySQLDatabase(props,false);

    List<FilterDefinition> filterDefinitionList = new ArrayList<FilterDefinition>();
    List list = retriveAllCsmFilterClause(authorizationManager);
    Iterator iterator = list.iterator();
    while (iterator.hasNext())
    {
        HashMap parameters = new HashMap();
        parameters.put("GROUP_NAMES", new StringType());
        parameters.put("APPLICATION_ID", new LongType());

        FilterClause filterClause = (FilterClause)iterator.next();
        FilterDefinition filterDefinition = new FilterDefinition (
                filterClause.getClassName().substring(
                        filterClause.getClassName().lastIndexOf('.') + 1) + filterClause.getId(),
                        optimiseFilterQuery(needsOptimisation,filterClause.getGeneratedSQLForGroup()), 
                        parameters);
        if(filterDefinition!=null) filterDefinitionList.add(filterDefinition);
    }
    return filterDefinitionList;
}
项目:common-security-module    文件:InstanceLevelSecurityHelper.java   
/**
 * This method injects the security filters which are created for this application. It retrieves a list of all the filters which have 
 * been defined for this application from the CSM Database. Now for each filter in the list, it creates a new FilterDefinition object.
 * It then retrieves the Persistent Class from the passed Configuration Object using the class name for which the filter is defined.
 * It then adds the filter to the persistent class by setting the filtering query.
 * @param authorizationManager The CSM AuthorizationManager instance for this application
 * @param configuration The Hibernate Configuration initialized for this application
 */
public static void addFilters(AuthorizationManager authorizationManager,Configuration configuration)
{
    boolean needsOptimisation = false;
    Properties props = configuration.getProperties();

    if(!isExistActiveMappingElement(authorizationManager))
        needsOptimisation = isMySQLDatabase(props,true);

    // Inject CSM defined Filters
    List list = retriveAllCsmFilterClause(authorizationManager);
    Iterator iterator = list.iterator();
    while (iterator.hasNext())
    {
        HashMap parameters = new HashMap();
        parameters.put("USER_NAME", new StringType());
        parameters.put("APPLICATION_ID", new LongType());

        FilterClause filterClause = (FilterClause)iterator.next();
        FilterDefinition filterDefinition = new FilterDefinition (filterClause.getClassName().substring(filterClause.getClassName().lastIndexOf('.') + 1) + filterClause.getId(), "", parameters);
        configuration.addFilterDefinition(filterDefinition);
        PersistentClass persistentClass = configuration.getClassMapping(filterClause.getClassName());
        persistentClass.addFilter(
                filterClause.getClassName().substring(filterClause.getClassName().lastIndexOf('.') + 1) + filterClause.getId()
                ,optimiseFilterQuery(needsOptimisation,filterClause.getGeneratedSQLForUser()));
    }   
}
项目:common-security-module    文件:InstanceLevelSecurityHelper.java   
/**
 * This method injects the security filters which are created for this application. It retrieves a list of all the filters which have 
 * been defined for this application from the CSM Database. Now for each filter in the list, it creates a new FilterDefinition object.
 * 
 * 
 * @param authorizationManager The CSM AuthorizationManager instance for this application
 * @param List<FilterDefinition> The Hibernate FilterDefinition List.
 */
public static List<FilterDefinition> getFiltersForUser(AuthorizationManager authorizationManager) throws CSException
{
    Properties props = new Properties();
    ApplicationContext ac = authorizationManager.getApplicationContext();
    props.setProperty("hibernate.connection.url", ac.getDatabaseURL());
    props.setProperty("hibernate.connection.username", ac.getDatabaseUserName());
    props.setProperty("hibernate.connection.password", ac.getDatabasePassword());
    props.setProperty("hibernate.connection.driver", ac.getDatabaseDriver());
    props.setProperty("hibernate.dialect", ac.getDatabaseDialect());


    boolean needsOptimisation = false;
    if(!isExistActiveMappingElement(authorizationManager))      
        needsOptimisation = isMySQLDatabase(props,false);

    List<FilterDefinition> filterDefinitionList = new ArrayList<FilterDefinition>();
    List list = retriveAllCsmFilterClause(authorizationManager);
    Iterator iterator = list.iterator();
    while (iterator.hasNext())
    {
        HashMap parameters = new HashMap();
        parameters.put("USER_NAME", new StringType());
        parameters.put("APPLICATION_ID", new LongType());

        FilterClause filterClause = (FilterClause)iterator.next();
        FilterDefinition filterDefinition = new FilterDefinition (
                filterClause.getClassName().substring(filterClause.getClassName().lastIndexOf('.') + 1) + filterClause.getId(),  
                optimiseFilterQuery(needsOptimisation,filterClause.getGeneratedSQLForUser()),
                parameters);
        if(filterDefinition!=null) filterDefinitionList.add(filterDefinition);
    }
    return filterDefinitionList;


}
项目:caarray    文件:CaArrayHibernateHelperImpl.java   
private void disableFilters(Session session) {
    Set<String> filters = session.getSessionFactory().getDefinedFilterNames();
    for (String filterName : filters) {
        // we only want to disable the security filters. assume security filters are ones
        // with GROUP_NAMES and APPLICATION_ID parameters
        FilterDefinition fd = session.getSessionFactory().getFilterDefinition(filterName);
        if (fd.getParameterNames().contains("GROUP_NAMES") && fd.getParameterNames().contains("APPLICATION_ID")) {
            session.disableFilter(filterName);                
        }
    }
}
项目:lams    文件:FilterDefinitionFactoryBean.java   
@Override
public void afterPropertiesSet() {
    this.filterDefinition =
            new FilterDefinition(this.filterName, this.defaultFilterCondition, this.parameterTypeMap);
}
项目:lams    文件:FilterDefinitionFactoryBean.java   
@Override
public FilterDefinition getObject() {
    return this.filterDefinition;
}
项目:lams    文件:FilterDefinitionFactoryBean.java   
@Override
public Class<FilterDefinition> getObjectType() {
    return FilterDefinition.class;
}
项目:helium    文件:JbpmSessionFactory.java   
public FilterDefinition getFilterDefinition(String filterName)
        throws HibernateException {
    return delegate.getFilterDefinition(filterName);
}
项目:spring4-understanding    文件:FilterDefinitionFactoryBean.java   
@Override
public void afterPropertiesSet() {
    this.filterDefinition =
            new FilterDefinition(this.filterName, this.defaultFilterCondition, this.parameterTypeMap);
}
项目:spring4-understanding    文件:FilterDefinitionFactoryBean.java   
@Override
public FilterDefinition getObject() {
    return this.filterDefinition;
}
项目:spring4-understanding    文件:FilterDefinitionFactoryBean.java   
@Override
public Class<FilterDefinition> getObjectType() {
    return FilterDefinition.class;
}
项目:OSCAR-ConCert    文件:SpringHibernateLocalSessionFactoryBean.java   
public FilterDefinition getFilterDefinition(String arg0) throws HibernateException {
 return sessionFactory.getFilterDefinition(arg0);
}
项目:openbravo-brazil    文件:DalSessionFactory.java   
public FilterDefinition getFilterDefinition(String filterName) throws HibernateException {
  return delegateSessionFactory.getFilterDefinition(filterName);
}
项目:cacheonix-core    文件:Configuration.java   
public void addFilterDefinition(FilterDefinition definition) {
    filterDefinitions.put( definition.getFilterName(), definition );
}
项目:cacheonix-core    文件:Mappings.java   
public void addFilterDefinition(FilterDefinition definition) {
    filterDefinitions.put( definition.getFilterName(), definition );
}
项目:cacheonix-core    文件:Mappings.java   
public FilterDefinition getFilterDefinition(String name) {
    return (FilterDefinition) filterDefinitions.get(name);
}
项目:cacheonix-core    文件:SessionFactoryStub.java   
public FilterDefinition getFilterDefinition(String filterName) throws HibernateException {
    return getImpl().getFilterDefinition( filterName );
}
项目:cacheonix-core    文件:FilterImpl.java   
public FilterDefinition getFilterDefinition() {
    return definition;
}
项目:JForum    文件:SpringSessionFactory.java   
@Override
public FilterDefinition getFilterDefinition(String s) throws HibernateException {
       return original.getFilterDefinition(s);
   }
项目:class-guard    文件:FilterDefinitionFactoryBean.java   
public void afterPropertiesSet() {
    this.filterDefinition =
            new FilterDefinition(this.filterName, this.defaultFilterCondition, this.parameterTypeMap);
}
项目:class-guard    文件:FilterDefinitionFactoryBean.java   
public FilterDefinition getObject() {
    return this.filterDefinition;
}
项目:class-guard    文件:FilterDefinitionFactoryBean.java   
public Class<FilterDefinition> getObjectType() {
    return FilterDefinition.class;
}
项目:logical-delete    文件:DeleteHibernateFilterEnabler.java   
public void setDeleteHibernateFilter(FilterDefinition deleteHibernateFilter) {
    this.deleteHibernateFilter = deleteHibernateFilter;
}
项目:logical-delete    文件:DeleteHibernateFilterConfigurator.java   
public void setDeleteFilterDefinition(FilterDefinition deleteFilterDefinition) {
    this.deleteFilterDefinition = deleteFilterDefinition;
}
项目:oscar-old    文件:SpringHibernateLocalSessionFactoryBean.java   
public FilterDefinition getFilterDefinition(String arg0) throws HibernateException {
 return sessionFactory.getFilterDefinition(arg0);
}
项目:lams    文件:LocalSessionFactoryBean.java   
/**
 * Specify the Hibernate FilterDefinitions to register with the SessionFactory.
 * This is an alternative to specifying <&lt;filter-def&gt; elements in
 * Hibernate mapping files.
 * <p>Typically, the passed-in FilterDefinition objects will have been defined
 * as Spring FilterDefinitionFactoryBeans, probably as inner beans within the
 * LocalSessionFactoryBean definition.
 * @see FilterDefinitionFactoryBean
 * @see org.hibernate.cfg.Configuration#addFilterDefinition
 */
public void setFilterDefinitions(FilterDefinition... filterDefinitions) {
    this.filterDefinitions = filterDefinitions;
}
项目:spring4-understanding    文件:LocalSessionFactoryBean.java   
/**
 * Specify the Hibernate FilterDefinitions to register with the SessionFactory.
 * This is an alternative to specifying <&lt;filter-def&gt; elements in
 * Hibernate mapping files.
 * <p>Typically, the passed-in FilterDefinition objects will have been defined
 * as Spring FilterDefinitionFactoryBeans, probably as inner beans within the
 * LocalSessionFactoryBean definition.
 * @see FilterDefinitionFactoryBean
 * @see org.hibernate.cfg.Configuration#addFilterDefinition
 */
public void setFilterDefinitions(FilterDefinition... filterDefinitions) {
    this.filterDefinitions = filterDefinitions;
}
项目:cacheonix-core    文件:Filter.java   
/**
 * Get the filter definition containing additional information about the
 * filter (such as default-condition and expected parameter names/types).
 *
 * @return The filter definition
 */
public FilterDefinition getFilterDefinition();