jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Stell-Smith <jeremystellsm...@gmail.com>
Subject getting a node from a value
Date Wed, 24 Aug 2005 07:28:08 GMT
hey guys, 

shouldn't there be a direct way to get Nodes from a multivalued
reference property? something like :

	Node [] getNodes() on the Property class

or even :

	Node getNode() on the Value class

instead I'm finding myself going through :

	ItemManager itemMgr = ((SessionImpl) session).getItemManager();
	Value[] values = property.getValues();
	for (Value value : values) {
		Node node = (Node) itemMgr.getItem(new NodeId(value.getString()));

I don't like this because it's ugly, it's using jackrabbit specific
calls for something that shouldn't and it is hard to mock.

can we add one of the first two calls?

Jeremy Stell-Smith

View raw message