code: public static Database findDatabase(ResultHierarchy hier, Result baseResult) {
      final List<Database> dbs = filterResults(hier, baseResult, Database.class);
      return (!dbs.isEmpty()) ? dbs.get(0) : null;
    }
docs: Find the first database result in the tree.
  
  @param baseResult Result tree base.
  @return Database