Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 92296 invoked from network); 23 Feb 2006 10:05:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Feb 2006 10:05:39 -0000 Received: (qmail 39911 invoked by uid 500); 23 Feb 2006 10:05:18 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 39894 invoked by uid 500); 23 Feb 2006 10:05:17 -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 39883 invoked by uid 99); 23 Feb 2006 10:05:17 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Feb 2006 02:05:17 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [85.158.136.3] (HELO mail123.messagelabs.com) (85.158.136.3) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 23 Feb 2006 02:05:16 -0800 X-VirusChecked: Checked X-Env-Sender: Paul.Carr@express-gifts.co.uk X-Msg-Ref: server-3.tower-123.messagelabs.com!1140689015!15619314!3 X-StarScan-Version: 5.5.9.1; banners=-,-,- X-Originating-IP: [193.128.111.60] Received: (qmail 20642 invoked from network); 23 Feb 2006 10:03:38 -0000 Received: from mailhost.findel.co.uk (HELO mailhost.findel.co.uk) (193.128.111.60) by server-3.tower-123.messagelabs.com with SMTP; 23 Feb 2006 10:03:38 -0000 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C63860.9F81CC78" Subject: RE: abator for eclipse generates *Examples classes Date: Thu, 23 Feb 2006 10:05:07 -0000 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: abator for eclipse generates *Examples classes Thread-Index: AcY37ktwZ5sSI1dQRHqM48/UtnUVZAAcivag From: "Paul Carr" To: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. ------_=_NextPart_001_01C63860.9F81CC78 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Thanks Jeff, Can anyone point me to a good tutorial on using the DAO Framework and the *byExample methods ? Best Regards Paul. =20 -----Original Message----- From: Jeff Butler [mailto:jeffgbutler@gmail.com]=20 Sent: 22 February 2006 20:25 To: user-java@ibatis.apache.org Subject: Re: abator for eclipse generates *Examples classes =20 The example class is used in the selectByExample and deleteByExample methods - it's used to implement "query by example" functionality. There's another recent thread on this list where I show an example of using these methods.=20 =20 In a stand alone (or any) app, you'll need to do these things: =20 1. Create an SqlMapConfig.xml file that references the generated SqlMap files 2. Create a dao.xml file that references the SqlMapConfig.xml and declares all the generated DAOs 3. Initialize the DaoManager 4. Use the DAOs =20 This information is all covered in the regular iBATIS documentation for the Sql Map framework and the DAO framework. Step 1 would be in the SqlMap documentation, steps 2-4 are in the DAO documentation. Any tutorial on iBATIS would also cover these steps.=20 =20 Jeff Butler =20 On 2/22/06, Paul Carr wrote:=20 Hi , newb to ibatis , Just used abator for eclipse to generate DAO's for a simple table and I got :- =20 TableSQLmap - the sqlMap Table.java - the value object TableExample.java - some class with the same data as the value object, but everythings an int, This is where I'm getting confused TableDAO interface - the DAO interface TableDAOImpl - implements the above interface, but doesn't use the generated value objects.... Uses the value object Examples ??? =20 Has anyone got a good example of how all these hang together in a stand alone java app ? In particular, what you do with the TableExample classes ? =20 Cheers Paul=20 =20 =20 =20 ------_=_NextPart_001_01C63860.9F81CC78 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Thanks Jeff,  Can anyone point me to a = good tutorial on using the DAO Framework and the *byExample methods ?

Best = Regards

Paul.

 

---= --Original Message-----
From: Jeff Butler [mailto:jeffgbutler@gmail.com]
Sent: 22 February 2006 = 20:25
To: = user-java@ibatis.apache.org
Subject: Re: abator for = eclipse generates *Examples classes

 

The example = class is used in the selectByExample and deleteByExample methods - it's used to = implement "query by example" functionality.  There's another recent = thread on this list where I show an example of using these methods. =

 

In a stand = alone (or any) app, you'll need to do these things:

 

1. Create an SqlMapConfig.xml file that references the generated SqlMap = files

2. Create a = dao.xml file that references the SqlMapConfig.xml and declares all the generated = DAOs

3. Initialize = the DaoManager

4. Use the = DAOs

 

This = information is all covered in the regular iBATIS documentation for the Sql Map framework = and the DAO framework.  Step 1 would be in the SqlMap documentation, steps = 2-4 are in the DAO documentation.  Any tutorial on iBATIS would also cover = these steps.

 

Jeff = Butler


 

On = 2/22/06, Paul Carr <Paul.Carr@express-gifts.co.uk > wrote:

Hi , newb to ibatis , Just used abator for = eclipse to generate DAO's for a simple table and I got = :-

 

TableSQLmap                - the = sqlMap

Table.java              &= nbsp;       - the value object

TableExample.java         - some class with the same = data as the value object, but everythings an int, This is where I'm getting = confused

TableDAO interface        - the DAO = interface

TableDAOImpl             &= nbsp; -  implements the above interface, but doesn't use the generated = value objects…. Uses the value object Examples = ???

 

Has anyone got a good example of how all these = hang together in a stand alone java app ?  In particular, what you do = with the TableExample classes  ?

 

Cheers

Paul

 

 

 

=00 ------_=_NextPart_001_01C63860.9F81CC78--