Return-Path: X-Original-To: apmail-db-torque-dev-archive@www.apache.org Delivered-To: apmail-db-torque-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 252FCCCCD for ; Wed, 18 Jul 2012 18:09:01 +0000 (UTC) Received: (qmail 11684 invoked by uid 500); 18 Jul 2012 18:09:01 -0000 Delivered-To: apmail-db-torque-dev-archive@db.apache.org Received: (qmail 11642 invoked by uid 500); 18 Jul 2012 18:09:01 -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 11634 invoked by uid 99); 18 Jul 2012 18:09:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jul 2012 18:09:01 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [62.13.148.98] (HELO outmail148098.authsmtp.com) (62.13.148.98) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jul 2012 18:08:51 +0000 Received: from mail-c193.authsmtp.com (mail-c193.authsmtp.com [62.13.128.118]) by punt12.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id q6II8UWg061092 for ; Wed, 18 Jul 2012 19:08:30 +0100 (BST) Received: from dhcp-wlan29.home.lan (erft-5d80a606.pool.mediaWays.net [93.128.166.6]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2) with ESMTP id q6II8Qhc097330 for ; Wed, 18 Jul 2012 19:08:27 +0100 (BST) Message-ID: <5006FB9A.7060206@apache.org> Date: Wed, 18 Jul 2012 20:08:26 +0200 From: Thomas Vandahl User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Apache Torque Developers List Subject: BasePeerImpl, was: Re: RFD: RecordMappers, Peers and MapBuilders References: <4FFC850B.1090509@apache.org> <50046802.3070903@apache.org> In-Reply-To: X-Enigmail-Version: 1.4.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Server-Quench: 92c678a7-d103-11e1-97bb-002264978518 X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCdyaAgQClZJUiwT EioPDCIGTh8qMAFL GwYeIE5WLUQhWQ4X O15TJVpedloGSkcA C3lxHghLUl1wW3N0 YgBRZQ9fZQRHXBtr UkBXQ1RUCgN3AxkD AwEeHFh0DnxOGSYj ZU9lXXNbEkV9ckAz S0wHE2oONGB9PGEf U11ZdlZVbQpNLE1Y alB9VnUJaGIPY3to CSU6JD0JMDhFCSFN RkVFMlsJEw4xE2x0 fT4uT30VEEYCXSkW JgQ+J0QHWA4pP0go KhMoX15QFhYKIBBf G01AGjQx X-Authentic-SMTP: 61633138303539.1014:706 X-AuthFastPath: 0 (Was 255) X-AuthSMTP-Origin: 93.128.166.6/2525 X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. On 17.07.12 10:41, Thomas Fox wrote: > Regarding the Peer and PeerImpl classes, of course we can go back to just > static methods, with all their problems (e.g. cannot be exchanged on > runtime, e.g. for unit testing). I had a quick look over the code. I'd like to give some ideas and ask some questions: - I'd inject a RecordMapper, the database name and a TableMap on creation of the instance (setters and/or constructor) - Move setDBName() to BasePeerImpl - Move addSelectColumns() to BasePeerImpl by using TableMap.getColumns() - Provide some kind of default record mapper/default record to make calls like in doSelectVillageRecords() work again. - Remove the record mapper and the table map from the various method signatures - Remove the then obsolete methods in the generated PeerImpls. WDYT? Stop me or I'll do it. :-) Question: - Why do we have deprecated methods in a class that didn't even exist in Torque 3.3? Is it just for keeping the old Criteria object alive? Bye, Thomas. --------------------------------------------------------------------- To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org For additional commands, e-mail: torque-dev-help@db.apache.org