org.activemath.content.mediator
Class QueryExecutor

java.lang.Object
  extended by org.activemath.content.mediator.QueryExecutor

public class QueryExecutor
extends Object

This Class launches a KBQuery to its KBCaller. Each execution will take place as follows: All items are collected, for which the relationQuery holds. After that, all property queries are applied to the collected items which leads to the deletion of the items which doesn't satisfy each property constraint. The same follows with the class constraints. The method execute() will return this set of remaining items. The QueryExecutor will never read the cache. He is called if nothing is found in the cache and adds the result he receives to the cache.


Field Summary
protected static boolean DEBUG
           
 int realqueries
           
 
Constructor Summary
QueryExecutor(QueryCache queryCache)
           
 
Method Summary
 Set execute(KBQuery kbQuery, boolean withCaching)
           
 void removeItemsByClassConstraint(Set items, Set classConstraints, KBCaller kbCaller)
           
 void removeItemsByPropertyConstraint(Set items, Set propertyConstraints, KBCaller kbCaller)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

protected static final boolean DEBUG

realqueries

public int realqueries
Constructor Detail

QueryExecutor

public QueryExecutor(QueryCache queryCache)
Method Detail

execute

public Set execute(KBQuery kbQuery,
                   boolean withCaching)

removeItemsByPropertyConstraint

public void removeItemsByPropertyConstraint(Set items,
                                            Set propertyConstraints,
                                            KBCaller kbCaller)

removeItemsByClassConstraint

public void removeItemsByClassConstraint(Set items,
                                         Set classConstraints,
                                         KBCaller kbCaller)