From torque-dev-return-8784-apmail-db-torque-dev-archive=db.apache.org@db.apache.org Tue Feb 10 08:29:29 2009 Return-Path: Delivered-To: apmail-db-torque-dev-archive@www.apache.org Received: (qmail 950 invoked from network); 10 Feb 2009 08:29:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Feb 2009 08:29:29 -0000 Received: (qmail 49015 invoked by uid 500); 10 Feb 2009 08:29:28 -0000 Delivered-To: apmail-db-torque-dev-archive@db.apache.org Received: (qmail 49007 invoked by uid 500); 10 Feb 2009 08:29:28 -0000 Mailing-List: contact torque-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Apache Torque Developers List" Reply-To: "Apache Torque Developers List" Delivered-To: mailing list torque-dev@db.apache.org Received: (qmail 48996 invoked by uid 99); 10 Feb 2009 08:29:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Feb 2009 00:29:28 -0800 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [217.24.207.26] (HELO mail.seitenbau.net) (217.24.207.26) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Feb 2009 08:29:21 +0000 Received: from [192.168.15.18] (helo=www.seitenbau.net) by router.seitenbau.net with esmtp (Exim 4.43) id 1LWnzF-0003VM-4p for torque-dev@db.apache.org; Tue, 10 Feb 2009 09:29:00 +0100 In-Reply-To: <55B8568AFA5F144F886F18186BAD5B2C054DF2FFF9@durham-e2k7mb1.dukece.com> References: <49893B87.9010600@tibetserver.com> <498EF110.1020807@apache.org> <55B8568AFA5F144F886F18186BAD5B2C054DF2FFF9@durham-e2k7mb1.dukece.com> To: "Apache Torque Developers List" MIME-Version: 1.0 Subject: RE: Working with BasePeer extensions X-KeepSent: 829BD6BB:43EFE6E6-C1257559:002E4520; type=4; name=$KeepSent X-Mailer: Lotus Notes Release 8.0.2 August 07, 2008 Message-ID: From: Thomas Fischer Date: Tue, 10 Feb 2009 09:28:55 +0100 X-MIMETrack: Serialize by Router on www/seitenbau(Release 8.0.1|February 07, 2008) at 10.02.2009 09:28:55, Serialize complete at 10.02.2009 09:28:55 Content-Type: multipart/alternative; boundary="=_alternative 002E9783C1257559_=" X-Spam-Score: -1.4 (-) X-Spam-Report: -1.4 ALL_TRUSTED Passed through trusted hosts only via SMTP X-Virus-Checked: Checked by ClamAV on apache.org --=_alternative 002E9783C1257559_= Content-Type: text/plain; charset="US-ASCII" I'll check this in the next few days. If there are direct references to base peer these should be removed if possible. I'd second also the idea to separate between static wrapper and instance for peers in 4.0 Thomas Greg Monroe schrieb am 09.02.2009 16:22:19: > IMHO, it makes sense that if we supply a way to replace the default BasePeer > with your own class, that the templates should honor that replacement. > Otherwise as Tal said, you can't override the static methods in the default > class. > > If that is the case, I wonder if the BasePeer code shouldn't be refactored > to have BasePeer and BasePeerInstance classes, similar to the Torque and > TorqueInstance pair. This would allow for static methods to be built on > easily override-able instance methods. E.g. BasePeer.doSelect(...) would > do a getBasePeerInstance().doSelect(...) call. > > To allow for custom BasePeerInstance classes, we'd probably need to move > the class def from the generator properties to the runtime properties. Then > have the Torque init process populate the BasePeerInstance singleton with > the custom class in the properties. > > On the plus side, the templates would not have to be re-done and all > existing code that makes BasePeer callse would automatically pick up > a custome BasePeerInstance. > > A candidate for 4.0 work? > > > -----Original Message----- > > From: Thomas Vandahl [mailto:tv@apache.org] > > Sent: Sunday, February 08, 2009 9:50 AM > > To: Apache Torque Developers List > > Subject: Re: Working with BasePeer extensions > > > > Tal Kramer wrote: > > > 3.1 Wherever there was a direct reference to "BasePeer" in Peer.jm, > > > it was replaced by "${table.BasePeer}", e.g. > > > return BasePeer.doInsert(criteria, con); >> return > > > ${table.BasePeer}.doInsert(criteria, con); > > > > This kind of bothers me. Are you positive that these replacements were > > necessary? If so, that would mean to me that the use of direct BasePeer > > calls must be considered a bug in the templates. Opinions? > > --=_alternative 002E9783C1257559_=--