jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting" <jukka.zitt...@gmail.com>
Subject Re: Orderable Child Nodes
Date Sat, 29 Jul 2006 06:02:25 GMT

On 7/29/06, James_1 <ponfar99@yahoo.com> wrote:
> How are orderable child nodes implemented?  Is this something that
> Jackrabbit handles automatically - through maybe the Lucene index?  Or is
> this something that your PersistenceManager needs to understand and know how
> to persist?

Jackrabbit handles this. For those that are interested, the actual
implementation can be found in the internal
org.apache.jackrabbit.core.state.NodeState class, which maintains a
specific data structure for the list of children of a given node. A
PersistenceManager is required to be able to persist and recreate this
data structure.

> For example, if I wanted to implement my own PersistenceManager which writes
> to a database schema, does my schema need persist some kind of ordering
> indexing for child nodes?  e.g. a NODE table which contains a CHILD_NODES
> column whose value is an ordered list of the nodes' child IDs?  Or
> alternatively, a more normalized approach, a CHILD_NODE table which contains
> an INDEX and has a many-to-one relationship with NODE?

Something like that would work, as long as you are able to store and
retrieve all the information in a NodeState instance. What's your use
case for a custom PersistenceManager? The PersistenceManagers in
Jackrabbit are much like table storage engines found in many
relational database systems, so there should generally be little need
to create a custom one unless you have specific performance,
scalability, or other requirements that can't be met by one of the
existing PersistenceManagers.


Jukka Zitting

Yukatan - http://yukatan.fi/ - info@yukatan.fi
Software craftsmanship, JCR consulting, and Java development

View raw message