2.17.2: 2011-06-17

net.sf.basedb.core
Class QueryRuntimeFilterManager

java.lang.Object
  extended by net.sf.basedb.core.QueryRuntimeFilterManager

 class QueryRuntimeFilterManager
extends Object

This class manages the enabling/disabling of QueryRuntimeFilter:s. Instances of this class are created by AbstractEntityQuery before a query is executed.

Version:
2.0
Author:
Nicklas
See Also:
Query API overview - runtime filters
Last modified
$Date: 2009-04-06 14:52:39 +0200 (Mon, 06 Apr 2009) $

Field Summary
private  Set<String> enabledFilters
          The names of already enabled filters.
private  org.hibernate.Session session
          The Hibernate session where the filters should be enabled.
 
Constructor Summary
QueryRuntimeFilterManager(DbControl dc)
          Create a new manager for the DbControl.
 
Method Summary
(package private)  void disableAll()
          Disable all filters.
(package private)  void disableFilter(String filterName)
          Disable a filter.
(package private)  org.hibernate.Filter enableFilter(String filterName)
          Enable a filter, unless it has already been enabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

enabledFilters

private final Set<String> enabledFilters
The names of already enabled filters.


session

private final org.hibernate.Session session
The Hibernate session where the filters should be enabled.

Constructor Detail

QueryRuntimeFilterManager

QueryRuntimeFilterManager(DbControl dc)
Create a new manager for the DbControl.

Method Detail

enableFilter

org.hibernate.Filter enableFilter(String filterName)
Enable a filter, unless it has already been enabled

Parameters:
filterName - The name of the filter to enable
Returns:
A org.hibernate.Filter object, or null if the filter already was enabled

disableFilter

void disableFilter(String filterName)
Disable a filter.

Parameters:
filterName - The name of the filter

disableAll

void disableAll()
Disable all filters.


2.17.2: 2011-06-17