Exemple #1
0
 /**
  * Clone the state of this query to a new JPAQuery instance with the given EntityManager
  *
  * @param entityManager
  * @return
  */
 public JPAQuery clone(EntityManager entityManager) {
   JPAQuery q =
       new JPAQuery(entityManager, JPAProvider.getTemplates(entityManager), getMetadata().clone());
   q.projection = projection;
   q.flushMode = flushMode;
   q.hints.putAll(hints);
   q.lockMode = lockMode;
   return q;
 }
Exemple #2
0
 /**
  * Creates a new EntityManager bound query
  *
  * @param em
  */
 public JPAQuery(EntityManager em, QueryMetadata metadata) {
   super(em, JPAProvider.getTemplates(em), metadata);
 }
Exemple #3
0
 /**
  * Creates a new EntityManager bound query
  *
  * @param em
  */
 public JPAQuery(EntityManager em) {
   super(em, JPAProvider.getTemplates(em), new DefaultQueryMetadata());
 }