"from SupplyGeneration supplyGeneration where supplyGeneration.supply = :supply and supplyGeneration.id = :supplyGenerationId")
.setEntity("supply", supply)
.setLong("supplyGenerationId", Long.parseLong(uriId.toString()))
.uniqueResult();
if (supplyGeneration == null) {
throw new NotFoundException(
"The Supply Generation cannot be found.");
}
return supplyGeneration;
}