2.17.2: 2011-06-17

net.sf.basedb.core
Class QueryRuntimeFilterFactory

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

 class QueryRuntimeFilterFactory
extends Object

This is a factory class for QueryRuntimeFilter implementations. The factory creates required and default optional filters for all items at startup time.

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

Nested Class Summary
private static class QueryRuntimeFilterFactory.AnnotatableFilter
          A required filter for Annotatable items.
private static class QueryRuntimeFilterFactory.BasicFilter
          An optional default filter for BasicItem:s that are not Ownable or Shareable.
(package private) static class QueryRuntimeFilterFactory.ChainedFilter
          Chains one or more filters into a single filter.
(package private) static class QueryRuntimeFilterFactory.ChildFilter
          An optional filter that can be used by BasicItem:s to replace the QueryRuntimeFilterFactory.BasicFilter.
private static class QueryRuntimeFilterFactory.DenyAllFilter
          A required filter for all items, which checks if the logged in user has been "granted" the Permission.DENIED permission for a specific item type.
private static class QueryRuntimeFilterFactory.OwnableFilter
          An optional default filter for Ownable items that are not Shareable.
private static class QueryRuntimeFilterFactory.RemovableFilter
          A required filter for Removable items.
private static class QueryRuntimeFilterFactory.ShareableFilter
          An optional default filter for Shareable items.
 
Field Summary
(package private) static QueryRuntimeFilter ANNOTATABLE_FILTER
           
(package private) static QueryRuntimeFilter BASIC_FILTER
           
(package private) static QueryRuntimeFilter DENY_ALL_FILTER
           
private static boolean isInitialised
           
private static Map<Item,QueryRuntimeFilter> optionalFilters
           
(package private) static QueryRuntimeFilter OWNABLE_FILTER
           
(package private) static QueryRuntimeFilter REMOVABLE_FILTER
           
private static Map<Item,QueryRuntimeFilter> requiredFilters
           
(package private) static QueryRuntimeFilter SHAREABLE_FILTER
           
static Set<Integer> ZERO_SET
           
 
Constructor Summary
QueryRuntimeFilterFactory()
           
 
Method Summary
(package private) static QueryRuntimeFilter getOptionalFilter(Item itemType)
          Get the default optional runtime filter for the speicified item type.
(package private) static QueryRuntimeFilter getRequiredFilter(Item itemType)
          Get the required runtime filter for the speicified item type.
(package private) static void init()
           
(package private) static void unload()
          Unload all settings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

requiredFilters

private static Map<Item,QueryRuntimeFilter> requiredFilters

optionalFilters

private static Map<Item,QueryRuntimeFilter> optionalFilters

ZERO_SET

public static final Set<Integer> ZERO_SET

DENY_ALL_FILTER

static final QueryRuntimeFilter DENY_ALL_FILTER

REMOVABLE_FILTER

static final QueryRuntimeFilter REMOVABLE_FILTER

ANNOTATABLE_FILTER

static final QueryRuntimeFilter ANNOTATABLE_FILTER

BASIC_FILTER

static final QueryRuntimeFilter BASIC_FILTER

OWNABLE_FILTER

static final QueryRuntimeFilter OWNABLE_FILTER

SHAREABLE_FILTER

static final QueryRuntimeFilter SHAREABLE_FILTER

isInitialised

private static boolean isInitialised
Constructor Detail

QueryRuntimeFilterFactory

QueryRuntimeFilterFactory()
Method Detail

init

static void init()

unload

static void unload()
Unload all settings.


getRequiredFilter

static QueryRuntimeFilter getRequiredFilter(Item itemType)
Get the required runtime filter for the speicified item type.

Parameters:
itemType - The item type
Returns:
A QueryRuntimeFilter object or null if not filter is required

getOptionalFilter

static QueryRuntimeFilter getOptionalFilter(Item itemType)
Get the default optional runtime filter for the speicified item type.

Parameters:
itemType - The item type
Returns:
A QueryRuntimeFilter object or null if not filter is required

2.17.2: 2011-06-17