return null;
}
private PrivTree findAllChildPrivs(Priv cur, PrivTree ptree, List<Priv> list)
{
PrivTree topTree = new PrivTree();
topTree.setParent(ptree);
topTree.setPriv(cur);
List<PrivTree> temp = new ArrayList<PrivTree>();
for (int i = 0; i < list.size(); i++)
{
Priv pri = list.get(i);
if (cur.getId() == pri.getPid())
{
temp.add(findAllChildPrivs(pri, topTree, list));
}
}
if (temp.size() == 0)
{
topTree.setChildPrivs(null);
}
else
{
topTree.setChildPrivs(temp);
}
return topTree;
}