@NotNull @Validate(Integer.class) Set ids, Map options)
@NotNull @Validate(Long.class) Set ids, Map options)
    public Map getCollectionCount(@NotNull String type, @NotNull String property,             @NotNull @Validate(Integer.class) Set ids, Map options)    {                Map results = new HashMap();        String alphaNumeric = "^\\w+$";        String alphaNumericDotted = "^\\w[.\\w]+$"; // TODO annotations                if (!type.matches(alphaNumericDotted))        {            throw new IllegalArgumentException("Type argument to getCollectionCount may ONLY be alpha-numeric with dots ("+alphaNumericDotted+")");        }                if (!property.matches(alphaNumeric))        {            throw new IllegalArgumentException("Property argument to getCollectionCount may ONLY be alpha-numeric ("+alphaNumeric+")");        }                        if (iQuery.checkType(type))         {            throw new IllegalArgumentException(type+"."+property+" is an unknown type.");        }                if (iQuery.checkProperty(type,property))        {            throw new IllegalArgumentException(type+"."+property+" is an unknown property on type "+type);        }                String query = "select size(table."+property+") from "+type+" table where table.id = ?";        // FIXME: optimize by doing new list(id,size(table.property)) ... group by id        for (Iterator iter = ids.iterator(); iter.hasNext();)        {            Integer id = (Integer) iter.next();            Integer count = (Integer) iQuery.queryUnique(query,new Object[]{id});            results.put(id,count);        }                return results;    }