ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kulbhushan, Singh \(IE10\)" <Kulbhushan.Si...@honeywell.com>
Subject RE: Writing Dyamic Query
Date Sat, 10 Mar 2007 05:34:53 GMT
Thanks Jeff,

 

Actually we are using generatorSet="Legacy". We would change that to
Java2 generatorSet because we are using java 1.4. Any other way to
achieve the same with Legacy generatorSet?

 

Regards

Kulbhushan

 

________________________________

From: Jeff Butler [mailto:jeffgbutler@gmail.com] 
Sent: Thursday, March 08, 2007 9:45 PM
To: user-java@ibatis.apache.org
Subject: Re: Writing Dyamic Query

 

How about this...

List<Integer> list = new ArrayList<Integer>();
list.add(1);
list.add(2);
SomeTableExample example = new SomeTableExample();
example.createCriteria().andIdNotIn(list);
List<SomeTable> records = selectByExample(example); 

Jeff Butler

 

On 3/8/07, Kulbhushan, Singh (IE10) <Kulbhushan.Singh@honeywell.com>
wrote: 

Table  : TABLE

ID 

NAME

ADDRESS

1

A

A1

2

B

B1

3

C

C1

4

D

D1

5

E

D2

 

 

 

 

 

 

 

 

I have a arrayList containing the  ID's to filter.

 

I have to execute SELECT ID,NAME,ADRESS FROM TABLE WHERE ID <>1 AND
ID<>2 .... (Dynamic)

What I need to do in ABATOR generated code.

 

Thanks for Help

Kulbhushan

 


Mime
View raw message