@RequiresSession
  public List<HostComponentStateEntity> findByServiceAndComponent(String serviceName, String componentName) {
    final TypedQuery<HostComponentStateEntity> query = entityManagerProvider.get().createNamedQuery("HostComponentStateEntity.findByServiceAndComponent", HostComponentStateEntity.class);
    query.setParameter("serviceName", serviceName);
    query.setParameter("componentName", componentName);

    return daoUtils.selectList(query);
  }
Retrieve all of the Host Component States for the given service and component.

@param serviceName Service Name
@param componentName Component Name
@return Return all of the Host Component States that match the criteria.
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentStateDAO.java