} else if (Integer.class.isAssignableFrom(objectType)) {
generator = new IntegerGenerator(service, idProperty);
} else if (String.class.isAssignableFrom(objectType)) {
generator = new StringGenerator(service, idProperty);
} else {
throw new UnsupportedIdTypeException(objectType + " can't be used as id : we don't know how to generate its values !");
}
generator.generateIdFor(toCreate);
}