private Long numPossibleAvailableMachines(final Enterprise enterprise, final Rack rack,
final Datacenter datacenter, final HypervisorType hypervisorType,
final List<Integer> bannedMachineIds)
{
Criteria criteria = getSession().createCriteria(Machine.class);
criteria.createAlias(Machine.HYPERVISOR_PROPERTY, "hypervisor");
if (!CollectionUtils.isEmpty(bannedMachineIds))
{
criteria.add(Restrictions.not(Restrictions.in(PersistentEntity.ID_PROPERTY,
bannedMachineIds)));