Hibernate ORM AbstractQueryImpl - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM AbstractQueryImpl class.

This code example shows how to use the following methods: getParameterMetadata
		em.close();
	} 
 
	private int countGeneratedParameters(Query query) {
		AbstractQueryImpl hqlQueryImpl = (AbstractQueryImpl) query;
		return hqlQueryImpl.getParameterMetadata().getNamedParameterNames().size();
	} 
 
	@Test
	public void testInExplicitTupleList() { 
		EntityManager em = getOrCreateEntityManager();
		em.getTransaction().begin();
		CriteriaQuery<Product> criteria = builder.createQuery( Product.class );
		Root<Product> from = criteria.from( Product.class );
		criteria.where( from.get( Product_.partNumber ).in( Collections.singletonList( ((long)Integer.MAX_VALUE) + 1 ) ) );
		List<Product> result = em.createQuery( criteria ).getResultList();
		assertEquals( 1, result.size() );
		em.getTransaction().commit();
		em.close();
	} 
Full Snippet Info
4
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE