Package org.eclipse.persistence.jpa

Examples of org.eclipse.persistence.jpa.JpaEntityManager


    assertTrue(emfi.getNativeEntityManagerFactory().getClass().getName().endsWith("EntityManagerFactoryImpl"));
  }

  public void testCanCastSharedEntityManagerProxyToTopLinkEntityManager() {
    assertTrue(sharedEntityManager instanceof JpaEntityManager);
    JpaEntityManager eclipselinkEntityManager = (JpaEntityManager) sharedEntityManager;
    assertNotNull(eclipselinkEntityManager.getActiveSession());
  }
View Full Code Here


  /**
   * Get a traditional EclipseLink Session from the given EntityManager.
   */
  protected Session getSession(EntityManager em) {
    JpaEntityManager emi = (JpaEntityManager) em;
    return emi.getActiveSession();
  }
View Full Code Here

  /**
   * Get a traditional EclipseLink Session from the given EntityManager.
   */
  protected Session getSession(EntityManager em) {
    JpaEntityManager emi = (JpaEntityManager) em;
    return emi.getActiveSession();
  }
View Full Code Here

     * 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

    assertTrue(emfi.getNativeEntityManagerFactory().getClass().getName().endsWith("EntityManagerFactoryImpl"));
  }

  public void testCanCastSharedEntityManagerProxyToEclipseLinkEntityManager() {
    assertTrue(sharedEntityManager instanceof JpaEntityManager);
    JpaEntityManager eclipselinkEntityManager = (JpaEntityManager) sharedEntityManager;
    assertNotNull(eclipselinkEntityManager.getActiveSession());
  }
View Full Code Here

        super(entityManagerProvider);
    }
   
    @Override
    public String getQueryStringOfNamedQuery(String queryName) {
        JpaEntityManager jpaEntityManager = (JpaEntityManager) getEntityManager().getDelegate();
        return jpaEntityManager.getActiveSession().getQuery(queryName).getJPQLString();
    }
View Full Code Here

     * 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

     * 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

     * 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

TOP

Related Classes of org.eclipse.persistence.jpa.JpaEntityManager

Copyright © 2018 www.massapicom. 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.