Return-Path: Delivered-To: apmail-db-jdo-dev-archive@www.apache.org Received: (qmail 66704 invoked from network); 20 Jan 2006 19:21:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Jan 2006 19:21:11 -0000 Received: (qmail 80824 invoked by uid 500); 20 Jan 2006 19:21:06 -0000 Mailing-List: contact jdo-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jdo-dev@db.apache.org Delivered-To: mailing list jdo-dev@db.apache.org Received: (qmail 80787 invoked by uid 99); 20 Jan 2006 19:21:06 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Jan 2006 11:21:04 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 0B203E1 for ; Fri, 20 Jan 2006 20:20:44 +0100 (CET) Message-ID: <1426736284.1137784844043.JavaMail.jira@ajax.apache.org> Date: Fri, 20 Jan 2006 20:20:44 +0100 (CET) From: "Matthew T. Adams (JIRA)" To: jdo-dev@db.apache.org Subject: [jira] Updated: (JDO-282) Add convenience methods to get persistent instance and detached instance from InstanceLifecycleEvent In-Reply-To: <847512287.1137781542076.JavaMail.jira@ajax.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/JDO-282?page=all ] Matthew T. Adams updated JDO-282: --------------------------------- Attachment: InstanceLifecycleEvent.patch Here's the patch. This was harder than I thought, which, IMHO, illustrates its value. I created the patch relative to the directory trunk/api20. I would also like to see this included in the upcoming 2.0-beta release if possible. > Add convenience methods to get persistent instance and detached instance from InstanceLifecycleEvent > ---------------------------------------------------------------------------------------------------- > > Key: JDO-282 > URL: http://issues.apache.org/jira/browse/JDO-282 > Project: JDO > Type: Improvement > Components: api20 > Reporter: Matthew T. Adams > Assignee: Matthew T. Adams > Attachments: InstanceLifecycleEvent.patch > > The source and target object differ as to whether they are the persistent or detached instance in class InstanceLifecycleEvent depending upon whether the event object is given in the preDetach, postDetach, preAttach, or postAttach callbacks. I propose adding two convenience methods that makes it obvious from the API which object the user is getting. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira