private EntityManager getEntityManager(){
        if(entityManager!=null && entityManager.isOpen())
            return entityManager;
        return entityManager = entityManagerFactory.createEntityManager();
    }