Try
exp = exp.andExp(sLang).andExp(tLang);
andExp returns a new expression (hence "chaining"), which is different
behavior than andQualifier, which may be where you got this idea.
On Apr 12, 2005 3:45 PM, Fredrik Liden <flide..ranslate.com> wrote:
> I'm having some difficulties with the ExpressionFactory doing the
> in-memory querying.
>
> Expression exp = ExpressionFactory.likeExp("description",desc);
> Expression sLang = ExpressionFactory.likeExp("sourceLang",sl);
> Expression tLang = ExpressionFactory.likeExp("targetLang",tl);
> exp.andExp(sLang);
> exp.andExp(tLang);
> List filtered_entries= exp.filterObjects(budget_entries);
>
> This only seems to filter based on the first expression, exp.
> Is there anything wrong in this code? I'm perplexed.
> Also, could anyone tell me what the exp.evaluate() does compared to the
> filterObjects? Is this only in cases where you know the result is one
> entry?
>
> Thanks,
>
> Fredrik
>
This archive was generated by hypermail 2.0.0 : Tue Apr 12 2005 - 15:52:45 EDT