@Transactional
  public void remove(HostComponentDesiredStateEntity hostComponentDesiredStateEntity) {
    HostEntity hostEntity = hostComponentDesiredStateEntity.getHostEntity();

    if (hostEntity == null) {
      throw new IllegalStateException(String.format("Missing hostEntity for host id %1d",
              hostComponentDesiredStateEntity.getHostId()));
    }

    hostEntity.removeHostComponentDesiredStateEntity(hostComponentDesiredStateEntity);

    entityManagerProvider.get().remove(hostComponentDesiredStateEntity);
    hostDAO.merge(hostEntity);
  }
Retrieve the single Host Component Desired State for the given unique cluster, service, component, and host.

@param clusterId Cluster ID
@param serviceName Service Name
@param componentName Component Name
@return Return the Host Component Desired State entity that match the criteria.
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentDesiredStateDAO.java