Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 14355 invoked from network); 17 Feb 2010 21:10:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Feb 2010 21:10:01 -0000 Received: (qmail 93891 invoked by uid 500); 17 Feb 2010 21:10:01 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 93854 invoked by uid 500); 17 Feb 2010 21:10:01 -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 93845 invoked by uid 99); 17 Feb 2010 21:10:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Feb 2010 21:10:01 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.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 21:09:53 +0000 Received: by yxe38 with SMTP id 38so5744342yxe.4 for ; Wed, 17 Feb 2010 13:09:32 -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; bh=kMGohvW3RqqkQdsd+pX2p7KZAtRJrDR7VSX11Yt1g2A=; b=MNpWsySkd22rBsDiP+bbJ9P7bwzSI+3ArNMInH8kg2vY7RqDBZNvAMSpIIYU0qIIwi ZZn7Gb+bMvh4N2gNsBF7wPNUjFDCXUxoz2MBEq3dkDodaPs1VqdhB7QIWnGYIQLyp7eF bogeaeytTi0XFo0uv/XfxzI+cSXoEuoKujNYI= 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; b=DMpQ2L3KO5kFUe5Tov2aJ4mlVHcsBK/WzyPXJKo/wZS3+B00s5uU65a8sVD8IDO0vg JY1UtGtaANoqUgCnUCMmrOj8pZ3d1lDzHDRqeV/aLkXk8DK+CyFV0Osy1u1MWRGv/55q uQq4q/y/kD1waUZ3nLMOtuLHkpVoQA1Hjn2YE= MIME-Version: 1.0 Received: by 10.150.170.5 with SMTP id s5mr11459427ybe.42.1266440972171; Wed, 17 Feb 2010 13:09:32 -0800 (PST) In-Reply-To: <583d4dff1002171236p23148cc6o678994f20181c0eb@mail.gmail.com> References: <583d4dff1002171138w7162230dr737ffcd510384b13@mail.gmail.com> <583d4dff1002171236p23148cc6o678994f20181c0eb@mail.gmail.com> Date: Wed, 17 Feb 2010 15:09:32 -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 X-Virus-Checked: Checked by ClamAV on apache.org In my case, it's a bit less code: Mapper interface: List getByCompoundKey(@Param("id1") Integer id1, @Param("id2") Integer id2); versus Method in some class: @SupressWarnings("unchecked") List getByCompoundKey(Integer id2, Integer id2) { Map parms = new HashMap(); parms.put("id1", id1); parms.put("id2", id2); return sqlSession.selectList("foo.Bar.getById", parms); } YMMV. Jeff Butler On Wed, Feb 17, 2010 at 2:36 PM, Rick R wrote: > On Wed, Feb 17, 2010 at 2:51 PM, Jeff Butler wrote: >> >> Using a mapper interface means you have a bit less code to write > > How is it less code?, that's my whole point in dropping it since I think it > adds more code (for in our case seemingly little gain.) All my sql is in xml > and for every mapper xml statement I create I have to go over and add a > Mapper interface method. It's just one more piece of code that needs > attention. --------------------------------------------------------------------- To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org For additional commands, e-mail: user-java-help@ibatis.apache.org