public TopologyHostInfoEntity findByHostname(String hostName) {
    TypedQuery<TopologyHostInfoEntity> query = entityManagerProvider.get().createQuery(
      "SELECT hostInfo FROM TopologyHostInfoEntity hostInfo where hostInfo.fqdn=:hostName", TopologyHostInfoEntity.class);
    query.setParameter("hostName", hostName);
    try {
      return query.getSingleResult();
    } catch (NoResultException ignored) {
      return null;
    }
  }
Refreshes entity state from database
@param topologyHostInfoEntity entity to refresh
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/TopologyHostInfoDAO.java