protected <T extends GenericEntity> void syncSets(Set<T> entitys, Set<Integer> ids, Class<T> clazz, String entityName) throws ClipsServerException{
HashSet<Integer> idset = new HashSet<Integer>(ids);
for (Iterator<? extends GenericEntity> it = entitys.iterator(); it.hasNext();) {
GenericEntity genericEntity = it.next();
Integer id = genericEntity.getId();
if (id == null){
idset.remove(null);
}
else
{