@RequiresSession
  public List<HostEntity> findAll() {
    TypedQuery<HostEntity> query = entityManagerProvider.get().createQuery("SELECT host FROM HostEntity host", HostEntity.class);
    try {
      return query.getResultList();
    } catch (NoResultException e) {
      return Collections.emptyList();
    }
  }
Looks for Host by ID
@param hostId ID of Host
@return Found entity or NULL
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostDAO.java