static public Participant getParticipant(String code) throws HttpException {
Participant participant = (Participant) Hiber.session().createQuery(
"from Participant participant where participant.code = :code")
.setString("code", code).uniqueResult();
if (participant == null) {
throw new NotFoundException("There isn't a participant with code '"
+ code + "'.");
}
return participant;
}