*/
protected JpaSite registerSite(String site) {
TypedQuery<JpaSite> query = null;
query = entityManager.createNamedQuery("getSiteByName", JpaSite.class);
query.setParameter("site", site);
JpaSite jpaSite = null;
try {
jpaSite = query.getSingleResult();
} catch (NoResultException e) {
jpaSite = new JpaSite(site);
entityManager.persist(jpaSite);
logger.info("Site '{}' created in user database", site);
}
return jpaSite;
}