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 11C277069 for ; Sat, 30 Jul 2011 20:34:33 +0000 (UTC) Received: (qmail 97012 invoked by uid 500); 30 Jul 2011 20:34:32 -0000 Delivered-To: apmail-db-torque-dev-archive@db.apache.org Received: (qmail 96971 invoked by uid 500); 30 Jul 2011 20:34:32 -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 96956 invoked by uid 99); 30 Jul 2011 20:34:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 30 Jul 2011 20:34:31 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 30 Jul 2011 20:34:30 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 82E0C952B4 for ; Sat, 30 Jul 2011 20:34:09 +0000 (UTC) Date: Sat, 30 Jul 2011 20:34:09 +0000 (UTC) From: "Thomas Fox (JIRA)" To: torque-dev@db.apache.org Message-ID: <2121865252.21117.1312058049532.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (TORQUE-147) Database objects should not need to inherit from BaseObject MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/TORQUE-147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13073242#comment-13073242 ] Thomas Fox commented on TORQUE-147: ----------------------------------- I plan to impelemt this as follows: - move the isNew and modified flags (incl getters and setters) from BaseObject to the generated base classes - move the hashCode and equals methods from BaseObject to the generated base classes - remove the class BaseObject from the runtime - make all classes implement the org.apache.torque.om.Persistent interface This makes all test cases green. The following methods from BaseObject are not moved currently: - get/setByName, get/setByPeerName, get/setByPosition: I would not define those as necessary for persistent objects. Maybe these methods can be moved to a different interface which is only implemented if the user choses to generate these methods ? - getTableMap: Nots sure what to do with this method, if this were moved to the persistent interface it would make the interface rather Torque-specific. Currently it is not needed that the Persistent interface defines this method, and I'd rather leave this as is. The following methods are already implemented/overridden: - the save(...) methods which are defined in persistent are already generated - the getters/setters for the primary key which are defined in BaseObject are overridden in the generated classes. However, to retain current catch clauses in the generated classes, I'd change the throws clauses in persistent from Exception to TorqueException, plus these methods need also be implemented (throwing UnsupportedOperationExceptions) for tables without primary key. > Database objects should not need to inherit from BaseObject > ----------------------------------------------------------- > > Key: TORQUE-147 > URL: https://issues.apache.org/jira/browse/TORQUE-147 > Project: Torque > Issue Type: Improvement > Reporter: Thomas Fox > Assignee: Thomas Fox > > Currently it is an error if database objects do not inherit from BaseObject. This makes embedding of Torque objects in other frameworks very difficult, because it does not allow to choose an own parent to inherit from. > The minimum requirement would be that it is not required any more that database objects inherit from BaseObject. > Ideally BaseObject dies and the base objects inherit directly from java.lang.object. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org For additional commands, e-mail: torque-dev-help@db.apache.org