@RequiresSession
  public List<TopologyHostInfoEntity> findByHost(HostEntity host) {
    TypedQuery<TopologyHostInfoEntity> query = entityManagerProvider.get().createQuery(
        "SELECT hostInfo FROM TopologyHostInfoEntity hostInfo where hostInfo.hostEntity=:host", TopologyHostInfoEntity.class);
    query.setParameter("host", host);
    try {
      return query.getResultList();
    } catch (NoResultException ignored) {
      return null;
    }
  }
Looks for TopologyHostInfo by ID
@param hostInfoId ID of topology host info
@return Found entity or NULL
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/TopologyHostInfoDAO.java