Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 93573 invoked from network); 6 Nov 2006 00:29:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Nov 2006 00:29:39 -0000 Received: (qmail 29875 invoked by uid 500); 6 Nov 2006 00:29:48 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 29856 invoked by uid 500); 6 Nov 2006 00:29:48 -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 29845 invoked by uid 99); 6 Nov 2006 00:29:48 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Nov 2006 16:29:48 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of larry.meadors@gmail.com designates 66.249.82.230 as permitted sender) Received: from [66.249.82.230] (HELO wx-out-0506.google.com) (66.249.82.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Nov 2006 16:29:36 -0800 Received: by wx-out-0506.google.com with SMTP id h30so827533wxd for ; Sun, 05 Nov 2006 16:29:15 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=B5NaVeRCTkzVcYMxaxppRTL8rf9Yw6p0S+Oh8UbxouRzF2ilctfBQ5zDoeUs1LHo0uKbDA7riKafDBDwLQ/nhtdLhoOcnawf+qJmLcvP1qkhfwSjIaLE49792SqPerBGwje8PpkHbFs2/bNdPuBa79z04I1mhX/2VORwy9HgF8c= Received: by 10.90.120.13 with SMTP id s13mr296098agc.1162772955240; Sun, 05 Nov 2006 16:29:15 -0800 (PST) Received: by 10.90.87.17 with HTTP; Sun, 5 Nov 2006 16:29:15 -0800 (PST) Message-ID: Date: Sun, 5 Nov 2006 17:29:15 -0700 From: "Larry Meadors" Reply-To: lmeadors@apache.org Sender: larry.meadors@gmail.com To: user-java@ibatis.apache.org Subject: Re: [VOTE] Deprecate queryForObject ("statement", paramObject, resultObject) In-Reply-To: <2fe5ef5b0611051339x43a4e225l89ba6e1e06bff304@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <16178eb10611050742k837cc1fra9d523740b703c40@mail.gmail.com> <2fe5ef5b0611051339x43a4e225l89ba6e1e06bff304@mail.gmail.com> X-Google-Sender-Auth: b5b90294e8ceb84f X-Virus-Checked: Checked by ClamAV on apache.org +1 On 11/5/06, Brandon Goodin wrote: > +1 > > On 11/5/06, Clinton Begin wrote: > > Hi all, > > > > One more deprecation request before 2.3. > > > > The version of queryForObject that takes both a parameterObject and a > resultObject strikes me as both confusing and unecessary. Originally I > implemented it for two reasons: > > > > > > > > Performance. To avoid instantiating an instance per row. This is not a > concern anymore, as class instantiation in modern JVMs is practically cost > free -- at least when compared to the SQL Statement being executed in the > same line of code! > > > > Instance lifecycle management. This allowed you to instantiate your > classes as you saw fit, then pass them to the query to be further populated. > Unfortunately, this approach is inconsistent. It's inconsistent in that > this only works for single row cases (queryForObject). When querying a > list, you don't have the option of providing a list of pre-allocated objects > (which would be silly). The new ResultObjectFactory feature takes care of > the need to more closely manage the lifecycle of result objects. So this > feature is unecessary. > > Caching behaviour. When dealing with cached instances, the cached > instance may be returned instead of the resultObject you've passed in (as > per Brandon's JIRA entry). > > So if you agree with the above, I'll deprecate this method signature for > the 2.3 release. > > > > User Note: Deprecation will only generate a warning, it will not break > existing code or stop you from using it. We just strongly recommend against > it. > > > > Please offer your +1/-1 vote! > > > > Thanks much, > > > > Clinton > > > >