ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Butler" <jeffgbut...@gmail.com>
Subject Re: Complex Abator Query
Date Tue, 12 Aug 2008 14:45:21 GMT
Ibator where clauses are always in this form:

(x && y && z) || (a && b && c)

You can use boolean algebra to refactor your query into something that can
be accomplished in ibator.  For example:

(bool1 not true && date1 is null && date2 between testdate1 and testdate2
&&
string1 is null) ||
(bool1 not true && date1 is null && date3 between testdate1 and testdate2
&&
string2 is null)

Jeff Butler


On Mon, Aug 11, 2008 at 11:23 PM, Ibatis534 <ibatis@mailinator.com> wrote:

>
> I have question relating to using the Abator Example Class with Java 5.
>
> How would create the following query using a java5 example class:
>
> if (bool1 not true && date1 is null &
>    ((date2 between testdate1 and testdate2 and string1 is null)or (date3
> between testdate1 and testdate2 and string2 is null))
>
> My attempts aren't going so well.
>
> TIA
> --
> View this message in context:
> http://www.nabble.com/Complex-Abator-Query-tp18937755p18937755.html
> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>
>

Mime
View raw message