Examples of createNativeQuery()


Examples of javax.persistence.EntityManager.createNativeQuery()

    EntityManager em = getContext().getEntityManager();
    if (StringUtils.isNotBlank(retrieve.namedQuery()))
      return em.createNamedQuery(retrieve.namedQuery());
    if (retrieve.nativeQuery()) {
      if (retrieve.resultClass().equals(void.class))
        return em.createNativeQuery(retrieve.query());
      else
        return em.createNativeQuery(retrieve.query(), retrieve.resultClass());
    } else
      return em.createQuery(retrieve.query());
  }
View Full Code Here

Examples of javax.persistence.EntityManager.createNativeQuery()

      return em.createNamedQuery(retrieve.namedQuery());
    if (retrieve.nativeQuery()) {
      if (retrieve.resultClass().equals(void.class))
        return em.createNativeQuery(retrieve.query());
      else
        return em.createNativeQuery(retrieve.query(), retrieve.resultClass());
    } else
      return em.createQuery(retrieve.query());
  }
 
  @Override
View Full Code Here

Examples of javax.persistence.EntityManager.createNativeQuery()

    EntityManager em = getContext().getEntityManager();
    if (StringUtils.isNotBlank(find.namedQuery()))
      return em.createNamedQuery(find.namedQuery());
    if (find.nativeQuery()) {
      if (find.resultClass().equals(void.class))
        return em.createNativeQuery(find.query());
      else
        return em.createNativeQuery(find.query(), find.resultClass());
    } else
      return em.createQuery(find.query());
  }
View Full Code Here

Examples of javax.persistence.EntityManager.createNativeQuery()

      return em.createNamedQuery(find.namedQuery());
    if (find.nativeQuery()) {
      if (find.resultClass().equals(void.class))
        return em.createNativeQuery(find.query());
      else
        return em.createNativeQuery(find.query(), find.resultClass());
    } else
      return em.createQuery(find.query());
  }
 
  @Override
View Full Code Here

Examples of javax.persistence.EntityManager.createNativeQuery()

  public Query createNativeQuery(String sql)
  {
    EntityManager em = getCurrent();
   
    if (em != null) {
      return em.createNativeQuery(sql);
    }
   
    em = createEntityManager();
   
    try {
View Full Code Here

Examples of javax.persistence.EntityManager.createNativeQuery()

    }
   
    em = createEntityManager();
   
    try {
      return em.createNativeQuery(sql);
    } finally {
      freeEntityManager(em);
    }
  }
View Full Code Here

Examples of javax.persistence.EntityManager.createNativeQuery()

  public Query createNativeQuery(String sql, String map)
  {
    EntityManager em = getCurrent();
   
    if (em != null) {
      return em.createNativeQuery(sql, map);
    }
   
    em = createEntityManager();
   
    try {
View Full Code Here

Examples of javax.persistence.EntityManager.createNativeQuery()

    }
   
    em = createEntityManager();
   
    try {
      return em.createNativeQuery(sql, map);
    } finally {
      freeEntityManager(em);
    }
  }
View Full Code Here

Examples of javax.persistence.EntityManager.createNativeQuery()

  public Query createNativeQuery(String sql, Class retType)
  {
    EntityManager em = getCurrent();
   
    if (em != null) {
      return em.createNativeQuery(sql, retType);
    }
   
    em = createEntityManager();
   
    try {
View Full Code Here

Examples of javax.persistence.EntityManager.createNativeQuery()

    }
   
    em = createEntityManager();
   
    try {
      return em.createNativeQuery(sql, retType);
    } finally {
      freeEntityManager(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.