Add a private method in NodeTreeDaoNodeLineageImpl to perform queries