incubator-graffito-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christophe Lombart <>
Subject Re: [jcr-mapping] PersistenceManager
Date Tue, 04 Oct 2005 09:11:43 GMT
Hi Costin,

Here is my comments :

On 10/4/05, Costin Leau <> wrote:
> Hello,
>  PersistenceManagerImplementation duplicates method from JCR session
>  (item Exists and logout).
How to check if an object exists ?
There is 2 possibilities (IMPO) :
* Check on the node path (/mypath/mynode)
* Manage a unique id/object.

Currently, the framework is using the first one. Is it necessary to
use unique ID in a content repo context. I think the path is a good
candidate to check if the object exist or not. Anyway, I'm agree to
support both and/or see other alternatives.

>Moreover this class which handles
>  persistence and should be Repository bound is actually session-bound
>  (one per session).
>  Shouldn't the manager be one per Repository instead of one per
>  session?

Maybe the interface name is not correct (PersistenceManager) but this
class is bound to a session. How to retrieve, update, delete object
(and its underlaying nodes/prop) without a session object ? Logout
method seems to be also important if it is bound to a JCR session.

>  Moreover I've seen there is no method for deleting an object but
>  rather for removing a node which forces the developer to handle the mapping
>  of the object in the JCR; there is no conversion being done at
>  deleting time.

Same as exist : either we delete a object with a path or an ID.

Certainly, we can find a easy solution to specify an ID but is it not
more interesting to use the object path ?

Best regards,

View raw message