private function _getChildrenNodes(&$node, $depth) {
        $pid = $node->recordId;

        $searchRule = "[PId]='$pid'";
        if ($this->globalSearchRule != "")
            $searchRule .= " AND " . $this->globalSearchRule;
        $recordList = $this->directFetch($searchRule);

        foreach ($recordList as $rec) {
            $node->childNodes[] = new NodeRecord($rec);
        }

        // reach leave node
        if ($node->childNodes == null) {
            return;
        }

        $depth++;
        // reach given depth
        if ($depth >= $this->depth) {
            return;
        } else {
            foreach ($node->childNodes as $node_c) {
                $this->_getChildrenNodes($node_c, $depth);
            }
        }
    }