try {
Object idf = PersistenceSessionUtil.createSession();
EntityManager session = PersistenceSessionUtil.getSession();
EntityTransaction tx = session.getTransaction();
tx.begin();
Salutations ti = new Salutations();
ti.setName(titelname);
ti.setDeleted("false");
ti.setFieldvalues_id(fieldvalues_id);
ti.setStarttime(new Date());
ti = session.merge(ti);
Long salutations_id = ti.getSalutations_id();
tx.commit();
PersistenceSessionUtil.closeSession(idf);
return salutations_id;
} catch (Exception ex2) {
log.error("[addUserSalutation]" ,ex2);