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: Blocking one -help needed on dynamic changing of conjuction property
Date Tue, 02 Dec 2008 16:10:35 GMT
iBATIS does not support changing the XML attributes at runtime.

It looks like you've started with the abator generated where clause.
You can probably accomplish what you want to do with a little boolean
algebra and changing the values of the parameter object.

Jeff Butler




On Tue, Dec 2, 2008 at 10:00 AM,  <yuvraj.shinde@sungard.com> wrote:
>  HI all,
>
>    I am using criteria querry  and following is the where clause for the
> same.
>
>   <sql id="Criteria_Where_Clause" >
>
>
>
>     <iterate property="oredCriteria" conjunction="or" prepend="where"
> removeFirstPrepend="iterate" >
>
>       (
>
>       <iterate prepend="and" property="oredCriteria[].criteriaWithoutValue"
> conjunction="and" >
>
>         $oredCriteria[].criteriaWithoutValue[]$
>
>       </iterate>
>
>       <iterate prepend="and"
> property="oredCriteria[].criteriaWithSingleValue" conjunction="and" >
>
>         $oredCriteria[].criteriaWithSingleValue[].condition$
>
>           #oredCriteria[].criteriaWithSingleValue[].value#
>
>       </iterate>
>
>       <iterate prepend="and" property="oredCriteria[].criteriaWithListValue"
> conjunction="and" >
>
>         $oredCriteria[].criteriaWithListValue[].condition$
>
>         <iterate property="oredCriteria[].criteriaWithListValue[].values"
> open="(" close=")" conjunction="," >
>
>           #oredCriteria[].criteriaWithListValue[].values[]#
>
>         </iterate>
>
>       </iterate>
>
>       <iterate prepend="and"
> property="oredCriteria[].criteriaWithBetweenValue" conjunction="and" >
>
>         $oredCriteria[].criteriaWithBetweenValue[].condition$
>
>         #oredCriteria[].criteriaWithBetweenValue[].values[0]# and
>
>         #oredCriteria[].criteriaWithBetweenValue[].values[1]#
>
>       </iterate>
>
>       )
>
>     </iterate>
>
>   I want to dynamically change the value of conjunction with "OR" and  "AND"
> .
>
>   I am constructing and passing the criteria object here to this where
> clause. I have tried with $ $ and # # but it is not working .
>
>  can any body please help me.
>
> Regards
>
> Yuvraj
>
>

Mime
View raw message