You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "kazim_ssuet@yahoo.com" <ka...@yahoo.com> on 2010/10/27 21:13:04 UTC

mixin node types and node identifier (uuid)

Hi,
My understanding is that Node Identifier (UUID) is associated with nodes
that are of mixin type and if you try to get identifier of a non-mixin type
u get null.
But when I look at ${schemaObjectPrefix}BUNDLE table it has NODE_ID column
and it appears that all nodes have an id assigned...Confused.
Can somebody shed some light on this?

Thanks,
KS.
-- 
View this message in context: http://jackrabbit.510166.n4.nabble.com/mixin-node-types-and-node-identifier-uuid-tp3016128p3016128.html
Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.

Re: mixin node types and node identifier (uuid)

Posted by Alexander Klimetschek <ak...@day.com>.
On Wed, Oct 27, 2010 at 21:13, kazim_ssuet@yahoo.com
<ka...@yahoo.com> wrote:
> My understanding is that Node Identifier (UUID) is associated with nodes
> that are of mixin type and if you try to get identifier of a non-mixin type
> u get null.
> But when I look at ${schemaObjectPrefix}BUNDLE table it has NODE_ID column
> and it appears that all nodes have an id assigned...Confused.
> Can somebody shed some light on this?

The JCR 1.0 API defines that a node only has a "public" UUID
(node.getUUID()) when it has the mix:referenceable mixin assigned (or
part of its primary node type).

Internally, Jackrabbit always gives nodes a UUID which is also used in
the persistence layer (which is a key-value store, key being UUID and
value being a so-called node bundle with a node and all its
properties). Hence you see the NODE_ID column in the sql-based
persistence managers. This UUID is also exposed via getUUID(), but
only if mix:referenceable is assigned.

Note that JCR 2.0 deprecates getUUID() and replaces it by
getIdentifier() which is not so strict, i.e. it also returns something
for non-referenceable nodes, but also defines no structure of the
string (could be anything that the implementation wants). In
Jackrabbit 2.x, this always returns the UUID.

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com