Examples of JPAEntityManager


Examples of org.eclipse.persistence.jpa.JpaEntityManager

     * This method will return null for non-EclipseLink EntityManagers.
     *
     * @see JpaEntityManagerFactory
     */
    public static JpaEntityManagerFactory getEntityManagerFactory(javax.persistence.EntityManager em) {
        JpaEntityManager entityManager = getEntityManager(em);
        if (entityManager != null){
            if (entityManager.getEntityManagerFactory() != null){
                return ((EntityManagerFactoryDelegate)entityManager.getEntityManagerFactory()).getOwner();
            }
        }
        return null;
    }
View Full Code Here

Examples of org.eclipse.persistence.jpa.JpaEntityManager

     * This method will return null for non-EclipseLink EntityManagers.
     *
     * @see JpaEntityManagerFactory
     */
    public static JpaEntityManagerFactory getEntityManagerFactory(javax.persistence.EntityManager em) {
        JpaEntityManager entityManager = getEntityManager(em);
        if (entityManager != null){
            if (entityManager.getEntityManagerFactory() != null){
                return ((EntityManagerFactoryDelegate)entityManager.getEntityManagerFactory()).getOwner();
            }
        }
        return null;
    }
View Full Code Here

Examples of org.jrest4guice.persistence.jpa.JpaEntityManager

     
//    System.out.println("泛行的类型:"+clazz.getName());

    BaseEntityManager em = null;
      if(PersistenceGuiceContext.getInstance().isUseJPA())
        em = new JpaEntityManager(clazz,GuiceContext.getInstance().getBean(EntityManagerProvider.class).get());
      else if(PersistenceGuiceContext.getInstance().isUseHibernate())
        em = new HibernateEntityManager(clazz,GuiceContext.getInstance().getBean(SessionProvider.class).get());
     
      return em;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.