On Mon, Feb 16, 2009 at 8:39 PM, Tonny Kohar <[email protected]> wrote:

> What is the best/recommended way to traverse the model. So far as I am
> understand there are 3 ways to do
> - using the core-runtime structure. For this one I am stuck at
> EntitiesInstance because it does not have methods that return list of
> entities, It have method that return entity but I must supply the id,
> etc. which I do not have, I want to get all the entities

Never use core-runtime. It may not be stable at all.

> - using the core-spi structucture. All is only stub, nothing is implemented 
> here
> - using my own visitor, same technique like the visualizer doing,

Isn't these two the same thing??

> which means reinvent the wheel

Well, each visitor implementation has different needs, so a lot
depends on what you want to do whether the visitors will end up being
similar.

>  * the visualizer do this in the package
> org.qi4j.library.swing.visualizer.model.descriptor
> It create it own visitor, it even does not inherit anything from
> core-spi structure, weird ?

Not sure what you mean with this.
A Visitor is essentially a callback recipient that is called by the
runtime when the Model is traversed as each type of descriptors.

Cheers
Niclas

-- 
http://www.qi4j.org - New Energy for Java

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to