org.objectweb.medor.optim.rdb

Class GroupSameDBRule

Implemented Interfaces:
RewriteRule

public class GroupSameDBRule
extends BasicRule
implements RewriteRule

This class groups together as a single RbdExpQueryLeaf the RdbQueryLeaves working on the same data store. TODO: Known limitation : This rule does not reorganize a QueryTree Another rule should be developed to put close together leaves working on the same data store.

Nested Class Summary

protected class
GroupSameDBRule.RdbQuery
The RdbQuery class represents the result of rewriting a QueryTree.

Nested classes/interfaces inherited from class org.objectweb.medor.optim.lib.BasicRule

BasicRule.ModifiedExpression

Field Summary

Fields inherited from class org.objectweb.medor.optim.lib.BasicRule

debug, log

Method Summary

QueryTree
rewrite(QueryTree qt, QueryNode parent)
Implementation of the RewriteRule interface.

Methods inherited from class org.objectweb.medor.optim.lib.BasicRule

replaceUsage, rewrite

Method Details

rewrite

public QueryTree rewrite(QueryTree qt,
                         QueryNode parent)
            throws MedorException
Implementation of the RewriteRule interface.

It groups together the RdbQueryLeaves if they are on the same data store.

Specified by:
rewrite in interface RewriteRule

Parameters:
qt - the QueryTree to be rewritten by this rule.

Returns:
the rewritten QueryTree

Throws:
MedorException - if all RdbQueryLeaves are not on the same data store.

See Also:
RewriteRule