[jira] Created: (JDO-459) PersistenceCapable.jdoIsDetached needs
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Apache JDO Project > [jira] Created: (JDO-459) PersistenceCapable.jdoIsDetached needs




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    [jira] Created: (JDO-459) PersistenceCapable.jdoIsDetached needs  
Andy Jefferson (JIRA)


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-07-07 12:11 PM

PersistenceCapable.jdoIsDetached needs update to reflect latest
---------------------------------------------------------------

Key: JDO-459
URL: https://issues.apache.org/jira/browse/JDO-459
Project: JDO
Issue Type: Bug
Components: specification
Affects Versions: JDO 2 final
Reporter: Andy Jefferson
Fix For: JDO 2 maintenance release 1


There are two issues.
1. The JDO2 spec 21.21.3 has a suggested implementation of jdoIsDetached. Th
is was clearly written before we added "jdoDetachedState" to the Persistence
Capable interface and so a StateManager is not present on a detached object.

2. When we have a base class that is not detachable and a subclass that is d
etachable we have a problem to define PersistenceCapable.jdoIsDetached since
 the base class has no "jdoDetachedState", and the method is final so cant b
e overridden by subclasses.
We have 2 possible solutions to this. Either we change the signature of jdoI
sDetached to not be final (allowing subclasses to override it), or we implem
ent it like this

Root class be enhanced with the following method
public final boolean jdoIsDetached()
{
return jdoIsDetachedInternal();
}

and if a class is Detachable it also gains the following method
protected boolean jdoIsDetachedInternal()
{
if (jdoStateManager == null)
{
if (jdoDetachedState == null)
return false;
return true;
}
return false;
}

and if a class is not Detachable it gains the following method
protected boolean jdoIsDetachedInternal()
{
return false;
}

This would then cater for the root class not being Detachable, and
subclass(es) being Detachable.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://is
sues.apache.org/j...nistrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira








[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 12:41 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register