Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 2522 invoked from network); 10 Mar 2007 05:35:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Mar 2007 05:35:29 -0000 Received: (qmail 72042 invoked by uid 500); 10 Mar 2007 05:35:32 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 72025 invoked by uid 500); 10 Mar 2007 05:35:31 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 72014 invoked by uid 99); 10 Mar 2007 05:35:31 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Mar 2007 21:35:31 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [199.64.0.252] (HELO AZ18CN849.global.ds.honeywell.com) (199.64.0.252) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Mar 2007 21:35:18 -0800 Received: from IE10EV812.global.ds.honeywell.com ([199.63.32.246]) by AZ18CN849.global.ds.honeywell.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 9 Mar 2007 22:34:58 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C762D5.D4F88C91" Subject: RE: Writing Dyamic Query Date: Sat, 10 Mar 2007 11:04:53 +0530 Message-ID: <79A3CBA33F06334193BF009A647295E05157E6@IE10EV812.global.ds.honeywell.com> In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Writing Dyamic Query Thread-Index: AcdhnPzqXREsOxmHRFK8UPK4Q3K1/gBOBt+A From: "Kulbhushan, Singh \(IE10\)" To: X-OriginalArrivalTime: 10 Mar 2007 05:34:58.0161 (UTC) FILETIME=[D736FE10:01C762D5] X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. ------_=_NextPart_001_01C762D5.D4F88C91 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Thanks Jeff, =20 Actually we are using generatorSet=3D"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? =20 Regards Kulbhushan =20 ________________________________ From: Jeff Butler [mailto:jeffgbutler@gmail.com]=20 Sent: Thursday, March 08, 2007 9:45 PM To: user-java@ibatis.apache.org Subject: Re: Writing Dyamic Query =20 How about this... List list =3D new ArrayList(); list.add(1); list.add(2); SomeTableExample example =3D new SomeTableExample(); example.createCriteria().andIdNotIn(list); List records =3D selectByExample(example);=20 Jeff Butler =20 On 3/8/07, Kulbhushan, Singh (IE10) wrote:=20 Table : TABLE ID=20 NAME ADDRESS 1 A A1 2 B B1 3 C C1 4 D D1 5 E D2 =20 =20 =20 =20 =20 =20 =20 =20 I have a arrayList containing the ID's to filter. =20 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. =20 Thanks for Help Kulbhushan =20 ------_=_NextPart_001_01C762D5.D4F88C91 Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable

Thanks = Jeff,

 

Actually we are using = generatorSet=3D"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<= /p>

 


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 =3D new ArrayList<Integer>();
list.add(1);
list.add(2);
SomeTableExample example =3D new SomeTableExample();
example.createCriteria().andIdNotIn(list);
List<SomeTable> records =3D selectByExample(example); =

Jeff Butler

 

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

Table  : TABLE

ID

NAME

ADDRESS

1

A

A1<= /p>

2

B

B1<= /p>

3

C

C1<= /p>

4

D

D1<= /p>

5

E

D2<= /p>

 

 

 

 

 

 

 

 

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

 

------_=_NextPart_001_01C762D5.D4F88C91--