Re: ExpressionFactory

From: Lachlan Deck (lachlan.dec..mail.com)
Date: Mon Dec 07 2009 - 01:35:35 EST

  • Next message: Ilya Lazarev: "Re: Selecting with an offset / paging"

    On 07/12/2009, at 3:19 PM, Joe Baldwin wrote:

    > Is it possible to build a complex expression using the ExpressionFactory that includes groupings (or is this only accomplished using the Expression.fromString() method)?
    >
    > For example
    >
    > (exp1 OR exp2 OR exp3) AND (exp4 OR exp5 OR exp6)

    Yes.

    Expression a = ExpressionFactory.matchExp(....).orExp( ...).orExp(....);

    Expression b = ExpressionFactory.matchExp(....).orExp( ...).orExp(....);

    Expression result = a.orExp(b);

    > I would expect this could be accomplished using a Map (as a group), but I have found no mention of support for this in the docs I have read.
    >
    > Thanks
    > Joe
    >

    with regards,

    --
    

    Lachlan Deck



    This archive was generated by hypermail 2.0.0 : Mon Dec 07 2009 - 01:36:25 EST