.createQuery("from HPerson p where p.account.username = :username",
HPerson.class).setParameter("username", username).getSingleResult();
final List<HLocale> hLocales = entityManager
.createQuery("from HLocale where localeId in (:locales)",
HLocale.class).setParameter("locales", locales).getResultList();
new RunAsOperation() {
public void execute() {
sampleProjectProfile.addUsersToLanguage(hPerson, hLocales);
}
}.addRole("admin").run();
return Response.ok().build();