@RequiresSession
  public List<Long> findTaskIdsByRequest(long requestId) {
    TypedQuery<Long> query = entityManagerProvider.get().createQuery("SELECT command.taskId " +
      "FROM HostRoleCommandEntity command " +
      "WHERE command.requestId=?1 ORDER BY command.taskId", Long.class);
    return daoUtils.selectList(query, requestId);
  }
Retrieves minimal host role command columns which are required to calculate stare state.
@param taskIds collection of host role commands to process.
@return minimized host role command entities.
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostRoleCommandDAO.java