You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-dev@db.apache.org by Michael Watzek <mw...@spree.de> on 2005/05/24 17:16:52 UTC
Inconsistency between API doc and spec?
Hi Craig,
is there an inconsistency between the API doc of method PM.getObjectById
and the spec? The API doc defines that a JDODataStoreException might be
thrown. The spec defines that an JDOObjectNotFoundException might be
thrown (see below). Clearly, JDOObjectNotFoundException extends
JDODataStoreException.
FYI: FOStore throws JDOObjectNotFoundException.
Regards,
Michael
API doc:
If the <code>validate</code> flag is <code>true</code> ...
If the instance does not exist in the datastore, then a
JDODataStoreException is thrown.
Spec:
If the validate flag is true:
...
If there is an instance already in the cache with the same jdo identity
as the oid parameter, the instance is not transactional, and the
instance does not exist in the datastore, then a
JDOObjectNotFoundException is thrown.
--
-------------------------------------------------------------------
Michael Watzek Tech@Spree Engineering GmbH
mailto:mwa.tech@spree.de Buelowstr. 66
Tel.: ++49/30/235 520 36 10783 Berlin - Germany
Fax.: ++49/30/217 520 12 http://www.spree.de/
-------------------------------------------------------------------
Re: Inconsistency between API doc and spec?
Posted by Michael Watzek <mw...@spree.de>.
Craig Russell wrote:
> It sounds like an oversight in the implementation javadoc. Can you file
> a JIRA?
Done (http://issues.apache.org/jira/browse/JDO-55).
Regards,
Michael
--
-------------------------------------------------------------------
Michael Watzek Tech@Spree Engineering GmbH
mailto:mwa.tech@spree.de Buelowstr. 66
Tel.: ++49/30/235 520 36 10783 Berlin - Germany
Fax.: ++49/30/217 520 12 http://www.spree.de/
-------------------------------------------------------------------
Re: Inconsistency between API doc and spec?
Posted by Craig Russell <Cr...@Sun.COM>.
Hi Michael,
On May 24, 2005, at 8:16 AM, Michael Watzek wrote:
> Hi Craig,
>
> is there an inconsistency between the API doc of method
> PM.getObjectById and the spec?
Apparently so.
> The API doc defines that a JDODataStoreException might be thrown. The
> spec defines that an JDOObjectNotFoundException might be thrown (see
> below). Clearly, JDOObjectNotFoundException extends
> JDODataStoreException.
>
> FYI: FOStore throws JDOObjectNotFoundException.
It sounds like an oversight in the implementation javadoc. Can you file
a JIRA?
Thanks,
Craig
>
> Regards,
> Michael
>
> API doc:
>
> If the <code>validate</code> flag is <code>true</code> ...
> If the instance does not exist in the datastore, then a
> JDODataStoreException is thrown.
>
> Spec:
>
> If the validate flag is true:
> ...
> If there is an instance already in the cache with the same jdo
> identity as the oid parameter, the instance is not transactional, and
> the instance does not exist in the datastore, then a
> JDOObjectNotFoundException is thrown.
> --
> -------------------------------------------------------------------
> Michael Watzek Tech@Spree Engineering GmbH
> mailto:mwa.tech@spree.de Buelowstr. 66
> Tel.: ++49/30/235 520 36 10783 Berlin - Germany
> Fax.: ++49/30/217 520 12 http://www.spree.de/
> -------------------------------------------------------------------
>
Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!