Hi , I don't understand how you can combine both.
Here is a bit more information about my aproach
my builder contains the following fields
|number|parent|pos|
my tree will look like this
{1,0,0}
{2,1,0}
{4,2,0}
{5,2,1}
{3,1,1}
you can make on asumtion
1-a subcategory is created after it's parent
all you have to do now is get a list of the builder sorted by parentid
and posrel the list will look like this
{1,0,0}
{2,1,0}
{3,1,1}
{4,2,0}
{5,2,1}
then you can create the three *usualy with java code*
if if parent id is the same as the previous parent id , search
downwards for nodes that have the parent id of the current node. The
real advanage is that you only have to query the database once and you
can to most of the sorting in the database
I will try to find back the "lost" code