@Test public void isJpa21() { final PersistenceUnitInfoImpl info = new PersistenceUnitInfoImpl(); info.setProperties(new Properties()); final ClassLoader loader = Thread.currentThread().getContextClassLoader(); assertTrue(JtaEntityManager.isJPA21(new ReloadableEntityManagerFactory( loader, new EntityManagerFactoryCallable(Jpa21Provider.class.getName(), info, loader, new HashMap<>(), false), info))); }
public static boolean isJPA21(final EntityManagerFactory entityManagerFactory) { return ReloadableEntityManagerFactory.class.isInstance(entityManagerFactory) ? hasMethod( ReloadableEntityManagerFactory.class.cast(entityManagerFactory).getEntityManagerFactoryCallable().getProvider(), "generateSchema", String.class, Map.class) : hasMethod(entityManagerFactory.getClass(), "createEntityManager", SynchronizationType.class); }
JtaEntityManager implements EntityManager, Serializable { public static boolean isJPA21(final EntityManagerFactory entityManagerFactory) { return ReloadableEntityManagerFactory.class.isInstance(entityManagerFactory) ? hasMethod( ReloadableEntityManagerFactory.class.cast(entityManagerFactory).getEntityManagerFactoryCallable().getProvider(), "generateSchema", String.class, Map.class) : hasMethod(entityManagerFactory.getClass(), "createEntityManager", SynchronizationType.class); } }
JtaEntityManager implements EntityManager, Serializable { public static boolean isJPA21(final EntityManagerFactory entityManagerFactory) { return ReloadableEntityManagerFactory.class.isInstance(entityManagerFactory) ? hasMethod( ReloadableEntityManagerFactory.class.cast(entityManagerFactory).getEntityManagerFactoryCallable().getProvider(), "generateSchema", String.class, Map.class) : hasMethod(entityManagerFactory.getClass(), "createEntityManager", SynchronizationType.class); } JtaEntityManager(final JtaEntityManagerRegistry registry, final EntityManagerFactory entityManagerFactory,
                            final Map properties, final String unitName, final String synchronizationType);  JtaEntityManager(final String unitName, final JtaEntityManagerRegistry registry, final EntityManagerFactory entityManagerFactory,
                            final Map properties, final boolean extended, final String synchronizationType); }
JtaEntityManager implements EntityManager, Serializable { public static boolean isJPA21(final EntityManagerFactory entityManagerFactory) { return ReloadableEntityManagerFactory.class.isInstance(entityManagerFactory) ? hasMethod( ReloadableEntityManagerFactory.class.cast(entityManagerFactory).getEntityManagerFactoryCallable().getProvider(), "generateSchema", String.class, Map.class) : hasMethod(entityManagerFactory.getClass(), "createEntityManager", SynchronizationType.class); } JtaEntityManager(final JtaEntityManagerRegistry registry, final EntityManagerFactory entityManagerFactory,
                            final Map properties, final String unitName, final String synchronizationType);  JtaEntityManager(final String unitName, final JtaEntityManagerRegistry registry, final EntityManagerFactory entityManagerFactory,
                            final Map properties, final boolean extended, final String synchronizationType); static boolean isJPA21(final EntityManagerFactory entityManagerFactory); EntityManager getDelegate(); void persist(final Object entity); T merge(final T entity); void remove(final Object entity); T find(final Class<T> entityClass, final Object primaryKey); T getReference(final Class<T> entityClass, final Object primaryKey); void flush(); void setFlushMode(final FlushModeType flushMode); FlushModeType getFlushMode(); void lock(final Object entity, final LockModeType lockMode); void refresh(final Object entity); void clear(); boolean contains(final Object entity); Query createQuery(final String qlString); Query createNamedQuery(final String name); Query createNativeQuery(final String sqlString); Query createNativeQuery(final String sqlString, final Class resultClass); Query createNativeQuery(final String sqlString, final String resultSetMapping); void joinTransaction(); void close(); boolean isOpen(); EntityTransaction getTransaction(); TypedQuery<T> createNamedQuery(final String name, final Class<T> resultClass); TypedQuery<T> createQuery(final CriteriaQuery<T> criteriaQuery); TypedQuery<T> createQuery(final String qlString, final Class<T> resultClass); void detach(final Object entity); T find(final Class<T> entityClass, final Object primaryKey, final Map<String, Object> properties); T find(final Class<T> entityClass, final Object primaryKey, final LockModeType lockMode); T find(final Class<T> entityClass, final Object primaryKey, final LockModeType lockMode, final Map<String, Object> properties); EntityManagerFactory getEntityManagerFactory(); LockModeType getLockMode(final Object entity); Metamodel getMetamodel(); Map<String, Object> getProperties(); CriteriaBuilder getCriteriaBuilder(); void lock(final Object entity, final LockModeType lockMode, final Map<String, Object> properties); void refresh(final Object entity, final Map<String, Object> properties); void refresh(final Object entity, final LockModeType lockMode); void refresh(final Object entity, final LockModeType lockMode, final Map<String, Object> properties); void setProperty(final String name, final Object value); T unwrap(final Class<T> cls); @Override StoredProcedureQuery createNamedStoredProcedureQuery(final String name); @Override StoredProcedureQuery createStoredProcedureQuery(final String procedureName); @Override StoredProcedureQuery createStoredProcedureQuery(final String procedureName, final Class... resultClasses); @Override StoredProcedureQuery createStoredProcedureQuery(final String procedureName, final String... resultSetMappings); @Override Query createQuery(final CriteriaUpdate updateQuery); @Override Query createQuery(final CriteriaDelete deleteQuery); @Override EntityGraph<T> createEntityGraph(final Class<T> rootType); @Override EntityGraph<?> createEntityGraph(final String graphName); @Override EntityGraph<?> getEntityGraph(final String graphName); @Override List<EntityGraph<? super T>> getEntityGraphs(final Class<T> entityClass); @Override boolean isJoinedToTransaction(); }
JtaEntityManager implements EntityManager, Serializable { public static boolean isJPA21(final EntityManagerFactory entityManagerFactory) { return ReloadableEntityManagerFactory.class.isInstance(entityManagerFactory) ? hasMethod( ReloadableEntityManagerFactory.class.cast(entityManagerFactory).getEntityManagerFactoryCallable().getProvider(), "generateSchema", String.class, Map.class) : hasMethod(entityManagerFactory.getClass(), "createEntityManager", SynchronizationType.class); } JtaEntityManager(final JtaEntityManagerRegistry registry, final EntityManagerFactory entityManagerFactory,
                            final Map properties, final String unitName, final String synchronizationType);  JtaEntityManager(final String unitName, final JtaEntityManagerRegistry registry, final EntityManagerFactory entityManagerFactory,
                            final Map properties, final boolean extended, final String synchronizationType); static boolean isJPA21(final EntityManagerFactory entityManagerFactory); EntityManager getDelegate(); void persist(final Object entity); T merge(final T entity); void remove(final Object entity); T find(final Class<T> entityClass, final Object primaryKey); T getReference(final Class<T> entityClass, final Object primaryKey); void flush(); void setFlushMode(final FlushModeType flushMode); FlushModeType getFlushMode(); void lock(final Object entity, final LockModeType lockMode); void refresh(final Object entity); void clear(); boolean contains(final Object entity); Query createQuery(final String qlString); Query createNamedQuery(final String name); Query createNativeQuery(final String sqlString); Query createNativeQuery(final String sqlString, final Class resultClass); Query createNativeQuery(final String sqlString, final String resultSetMapping); void joinTransaction(); void close(); boolean isOpen(); EntityTransaction getTransaction(); TypedQuery<T> createNamedQuery(final String name, final Class<T> resultClass); TypedQuery<T> createQuery(final CriteriaQuery<T> criteriaQuery); TypedQuery<T> createQuery(final String qlString, final Class<T> resultClass); void detach(final Object entity); T find(final Class<T> entityClass, final Object primaryKey, final Map<String, Object> properties); T find(final Class<T> entityClass, final Object primaryKey, final LockModeType lockMode); T find(final Class<T> entityClass, final Object primaryKey, final LockModeType lockMode, final Map<String, Object> properties); EntityManagerFactory getEntityManagerFactory(); LockModeType getLockMode(final Object entity); Metamodel getMetamodel(); Map<String, Object> getProperties(); CriteriaBuilder getCriteriaBuilder(); void lock(final Object entity, final LockModeType lockMode, final Map<String, Object> properties); void refresh(final Object entity, final Map<String, Object> properties); void refresh(final Object entity, final LockModeType lockMode); void refresh(final Object entity, final LockModeType lockMode, final Map<String, Object> properties); void setProperty(final String name, final Object value); T unwrap(final Class<T> cls); @Override StoredProcedureQuery createNamedStoredProcedureQuery(final String name); @Override StoredProcedureQuery createStoredProcedureQuery(final String procedureName); @Override StoredProcedureQuery createStoredProcedureQuery(final String procedureName, final Class... resultClasses); @Override StoredProcedureQuery createStoredProcedureQuery(final String procedureName, final String... resultSetMappings); @Override Query createQuery(final CriteriaUpdate updateQuery); @Override Query createQuery(final CriteriaDelete deleteQuery); @Override EntityGraph<T> createEntityGraph(final Class<T> rootType); @Override EntityGraph<?> createEntityGraph(final String graphName); @Override EntityGraph<?> getEntityGraph(final String graphName); @Override List<EntityGraph<? super T>> getEntityGraphs(final Class<T> entityClass); @Override boolean isJoinedToTransaction();  }