@Override
    public List<ExplorerTreeNode> findByType(final String type) {

        return JooqUtil.contextResult(explorerDbConnProvider, context ->
                        context
                                .selectFrom(n)
                                .where(n.TYPE.eq(type))
                                .fetch())
                .map(this::mapRecord);
    }
Get the root node containing a particular node, or the node itself if it is a root node.
stroom-explorer/stroom-explorer-impl-db/src/main/java/stroom/explorer/impl/db/ExplorerTreeDaoImpl.java