/*************************************************************************** * * **************************************************************************/ @Nonnull protected T getEntity() { synchronized (this) { // Now we can get rid of the entity, and we keep the name if (qName == null) { qName = em.merge(entity).getQName(); entity = null; } } return (T)em.find(qName); }