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 688C9963B for ; Sun, 5 Feb 2012 12:53:21 +0000 (UTC) Received: (qmail 16354 invoked by uid 500); 5 Feb 2012 12:53:21 -0000 Delivered-To: apmail-db-torque-dev-archive@db.apache.org Received: (qmail 16277 invoked by uid 500); 5 Feb 2012 12:53:20 -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 16269 invoked by uid 99); 5 Feb 2012 12:53:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Feb 2012 12:53:19 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.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; Sun, 05 Feb 2012 12:53:13 +0000 Received: from [192.168.15.18] (port=24597 helo=www.seitenbau.net) by mail.seitenbau.net with esmtp (Exim 4.69) (envelope-from ) id 1Ru1aL-0000Yg-1E for torque-dev@db.apache.org; Sun, 05 Feb 2012 13:52:49 +0100 X-CTCH-RefID: str=0001.0A0B0205.4F2E7BA1.0096,ss=1,fgs=0 Subject: location of save() methods X-KeepSent: 4878F70D:F0940D36-C125799B:0045765A; type=4; name=$KeepSent To: Apache Torque Developers List X-Mailer: Lotus Notes Release 8.5.1 September 28, 2009 Message-ID: From: Thomas Fox Date: Sun, 5 Feb 2012 13:52:48 +0100 X-MIMETrack: Serialize by Router on www/seitenbau(Release 8.5HF467 | May 15, 2009) at 02/05/2012 13:52:48 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII I'd like to turn your attention to https://issues.apache.org/jira/browse/TORQUE-180 which is about whether the save() methods should be in the generated dbObject classes or in the peer classes or both. My personal opinion is that it would be more consistent if the save methods were in the peer classes because almost all database-related operations are already there and it would be possible to use the dbObject objects as pure transport objects without database functionality. Are there any objections against implementing this ticket? The idea would be to move the functionality of the save methods to the peer classes and have delegate methods in the dbObject classes (the generation of these methods can be turned on and off by setting an option). Like AuthorPeer: public void save(Author toSave) throws TorqueException { ... (database logic) } Author (optional): public void save() throws TorqueException { AuthorPeer.save(this); } If there are no objections, what is your preference for the default behaviour ? Shold the save methods be in the peer classes only by default or in the peer and dbObject classes ? what should the method name in the peer classes be ? save() or doSave() ? Thomas --------------------------------------------------------------------- To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org For additional commands, e-mail: torque-dev-help@db.apache.org