@RequiresSession
  public Set<HostConfigMapping> findSelectedByHosts(Collection<Long> hostIds) {
    populateCache();

    if (hostIds == null || hostIds.isEmpty()) {
      return Collections.emptySet();
    }
    
    HashSet<HostConfigMapping> result = new HashSet<>();

    for (final Long hostId : hostIds) {
      if (!hostConfigMappingByHost.containsKey(hostId))
        continue;
      
      Set<HostConfigMapping> set = new HashSet<>(hostConfigMappingByHost.get(hostId));
      
      CollectionUtils.filter(set, new Predicate() {
        
        @Override
        public boolean evaluate(Object arg0) {
          return ((HostConfigMapping) arg0).getHostId().equals(hostId) &&
              ((HostConfigMapping) arg0).getSelected() > 0;
        }
      });
      
      result.addAll(set);
    } 
    
    return result;
  }
Used for host configuration mapping operations.
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostConfigMappingDAO.java