cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lachlan Deck <lachlan.d...@gmail.com>
Subject Re: ExpressionFactory
Date Mon, 07 Dec 2009 06:35:35 GMT
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




Mime
View raw message