public static ProductSummaryDTO toSummaryDTO(Product entity) {
if (entity == null)
return null;
List<Slot> list = DatastoreProxy.getSlotsByProductId(entity.getId());
int size = list == null ? 0 : list.size();
return new ProductSummaryDTO(entity.getId(), entity.getName(), size);
}