.createQuery(
"from RateScript script where script.contract = :contract and script.id = :scriptId")
.setEntity("contract", contract).setLong("scriptId",
Long.parseLong(uriId.getString())).uniqueResult();
if (script == null) {
throw new NotFoundException();
}
return script;
}