jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Guggisberg <stefan.guggisb...@gmail.com>
Subject Re: PersistenceMgr /store method
Date Fri, 05 Nov 2004 16:36:50 GMT
hi wolfgang
please excuse the slow response time...

On Thu, 4 Nov 2004 15:58:38 +0100, Wolfgang Gehner <wgehner@infonoia.com> wrote:
> We're up to our ears inside the JDBC persistence mgr implementation. Question:
> 
> We think it would be good if we could retrieve the name of a node from the PersistentNodeState
object.
> We'd like to store it in the "node" row on the db, but it seems to be a property of the
parent state (which is not available on the persistent node state?) That is to avoid requeries
while updating.
> Any idea or suggestion how to do this?

why do you need to store a node's name with its state? jackrabbit's
data model doesn't require that.

in the jackrabbit data model, a node state consists of:
- parent uuid's
- uuid 
- node type name
- set of mixin type names 
- id of its definition
- list of child node entries (name/uuid pairs)
- list of property entries (names)

neither path nor name of the node are part of a node's state. 
paths (and thus names) are resolved by traversing the parent links.

the PersistenceManager interface only requires to persist 
a given ItemState object by its id (ItemId) and to load
a ItemState object given its id. there are no names involved.
it doesn't need to know anything about the contents of the 
object it stores/loads. it's more like a persistent hash map.

btw, i have just committed a simple experimental persistence manager 
(InMemPersistenceManager) that stores item states as byte[]'s 
with the itenm id as key in a hash map (InMemPersistenceManager). 

maybe i'm missing something, so please let me know if that's the case.

cheers
stefan

> 
> Best regards,
> 
> Wolfgang Gehner
> 
> Infonoia S.A.
> rue de Berne 7
> 1201 Geneva
> Tel: +41 22 9000 009
> Fax: +41 22 9000 018
> wgehner@infonoia.com
> http://www.infonoia.com
>

Mime
View raw message