private static EntityManagerFactory getEntityManagerFactory(String persistenceUnit) { if (persistenceUnit != null) { return Stripersist.getEntityManagerFactory(persistenceUnit); } else { return getEntityManagerFactory(); } }
private static EntityManagerFactory getEntityManagerFactory() { if (defaultPersistenceUnit == null) { throw new StripesRuntimeException( "In order to get EntityManagerFactory without persistenceUnitName you must" + " set the value for Stripersitence.defaultPersistenceUnitName"); } return Stripersist.getEntityManagerFactory(defaultPersistenceUnit); }
private static EntityManager getEntityManager() { if (defaultPersistenceUnit == null) { return Stripersist.getEntityManager(); } return Stripersist.getEntityManager(defaultPersistenceUnit); }