Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 90610 invoked from network); 17 Feb 2010 19:51:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Feb 2010 19:51:34 -0000 Received: (qmail 5347 invoked by uid 500); 17 Feb 2010 19:51:33 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 5278 invoked by uid 500); 17 Feb 2010 19:51:33 -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 5270 invoked by uid 99); 17 Feb 2010 19:51:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Feb 2010 19:51:33 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jeffgbutler@gmail.com designates 209.85.210.200 as permitted sender) Received: from [209.85.210.200] (HELO mail-yx0-f200.google.com) (209.85.210.200) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Feb 2010 19:51:26 +0000 Received: by yxe38 with SMTP id 38so5663712yxe.4 for ; Wed, 17 Feb 2010 11:51:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=npwoeQ+s0sXyxJOoIn/TuKe9ZnZ2WQrlbUgiVdsM+H8=; b=Yd2h0FWbX0rR9hNE7ioI0d0neKOK2m/7x0LsU8LxRslRMHBuMyKbC3wga5nybCxDWy yWYDZFWKgZ+a2S9abq2d6S+KoK6gqP7TzkwVXCdR5bWkOQovb0xCObUdgsXwaTpRyHHj xqK9dT7ecww2Nx5XxSZ9piTGsuaAyTY8HSwtQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=SOL6vwU0r0RMBAA2JnOZRvPmCroaT8IOkrAu/udBSr7L+UlOb8QFSff2kAkmG8q0MH d5wsrlisHktuvqWJWNOTHz2XrqnKwHvCc4vrWhKtvBnCQ1HkEfVfcZJQXDc9PHsttD1y P617B2mj1/aGzDNjdaEOaRg0m/EUzx5N31tdc= MIME-Version: 1.0 Received: by 10.150.48.14 with SMTP id v14mr8863575ybv.210.1266436266103; Wed, 17 Feb 2010 11:51:06 -0800 (PST) In-Reply-To: <583d4dff1002171138w7162230dr737ffcd510384b13@mail.gmail.com> References: <583d4dff1002171138w7162230dr737ffcd510384b13@mail.gmail.com> Date: Wed, 17 Feb 2010 13:51:06 -0600 Message-ID: Subject: Re: If all my sql is in xml, do I gain that much (assuming unit tests) using Mapper objects as well? From: Jeff Butler To: user-java@ibatis.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Using a mapper interface means you have a bit less code to write and generics support comes for free without having to do the @SuppressWarnings annotation. Refactoring support is limited because the mapper interface name and method names must match the XML - so simply changing something in the mapper interface might break the code. The mapper is doing the same thing under the covers as what you describe - so there's no other magic. In my current project I'm using the mapper interface because I like to write less code, and Ibator generated most of the mapper methods anyway. Jeff Butler On Wed, Feb 17, 2010 at 1:38 PM, Rick R wrote: > This probably has been brought up before, but a quick search on nabble > didn't return anything that useful at the moment... > > Our plan is to have ALL sql in the mapper xml files (not annotations.) It > 'seems' like the only real benefit we'd then get out of also providing a > corresponding mapper object is for IDE support and catching of any invali= d > calls early on (and maybe refactoring is slightly cleaner but that's > debatable.)=A0 But assuming we have a unit test for every mapper sql comm= and > in our service layer, is there anything else I miss by skipping the whole > creation of mapper objects and simply going after the sql the old way... > session.update("fooBar.updateEmployee", obj) ? (I read pages 53/54 of the > guide and nothing jumped out at me as a huge gain in our case using Mappe= r > classes.) > > I just don't want to be overlooking anything. > > -- > Rick R > --------------------------------------------------------------------- To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org For additional commands, e-mail: user-java-help@ibatis.apache.org