ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Boyd" <swb...@gmail.com>
Subject Re: question about parameterMap and java class
Date Fri, 04 Jan 2008 01:56:05 GMT
Have you tried

<dynamic prepend="where">
<iterate prepend="AND" property="id" open="("
close=")" conjunction="OR">
C064ID=#id[].*name*#
</iterate>
</dynamic>

On Jan 3, 2008 1:46 PM, Ashish Kulkarni <ashish.kulkarni13@gmail.com> wrote:

> Hi
> I have a class like below with get and set method
> public ColorClass
> {
> private String name, desc;
>
> public void setName(String _name)
> {
> this.name = _name;
> }
> public String getName()
> {
> return name;
> }
>
> }
>
> How can i define this ColorClass in parameterMap and use it in SQL
> statement for varaible substituation.
> <parameterMap mymap" class="java.util.Map">
>      <parameter property="id" javaType=" java.util.List" />
> </parameterMap>
> where id is list of ColorClass,
>
> I have a SQL statement as below
>
> select name, id from mytable
>
> <dynamic prepend="where">
> <iterate prepend="AND" property="id" open="("
> close=")" conjunction="OR">
> C064ID=#id[]#
> </iterate>
> </dynamic>
>
> I want to use getName method to get name of the colorclass,
>
>

Mime
View raw message