org.objectweb.medor.query.lib
Class MemberOfHelper

java.lang.Object
  extended byorg.objectweb.medor.query.lib.MemberOfHelper

public class MemberOfHelper
extends java.lang.Object

The MemberOfHelper class offers methods to manipulate MemberOf operators.


Field Summary
static Logger logger
           
 
Constructor Summary
MemberOfHelper()
           
 
Method Summary
static void addMemberOf(QueryNode qn, java.util.List mofLeft, java.util.List mofRight)
          Adds a MemberOf to a query node, given the left and right ArrayLists.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

public static Logger logger
Constructor Detail

MemberOfHelper

public MemberOfHelper()
Method Detail

addMemberOf

public static void addMemberOf(QueryNode qn,
                               java.util.List mofLeft,
                               java.util.List mofRight)
                        throws MedorException,
                               MalformedExpressionException
Adds a MemberOf to a query node, given the left and right ArrayLists.

If the QueryNode already has an expression, the MemberOf is appended with and And.

The field operands may, in this case, be on the same (lower level) query node. If this is the case, this method tries to un-propagates the right propagated field if possible, and places the MemberOf on this (lower level) query node.

It is assumed that all left fields are on the same query node, and all right fields are on the same query node.

Parameters:
qn - the QueryNode on which to add the MemberOf
mofLeft - the ArrayList of field operands for the left part of the MemberOf
mofRight - the ArrayList of field operands for the right part of the MemberOf
Throws:
MalformedExpressionException - returned by the MemberOf construction
MedorException