List of usage examples for javax.persistence TypedQuery getParameters
Set<Parameter<?>> getParameters();
From source file:net.awired.generic.jpa.dao.impl.GenericDaoImpl.java
@Transactional(propagation = Propagation.SUPPORTS) protected <E> E findGenericSingleResult(TypedQuery<E> query) throws NotFoundException { try {/*w w w . j a v a2 s . c o m*/ return query.getSingleResult(); } catch (NoResultException e) { throw new NotFoundException("Result of " + query + " with parameters '" + Arrays.toString(query.getParameters().toArray()) + "' not found in database", e); } }
From source file:net.awired.generic.jpa.dao.impl.GenericDaoImpl.java
@Transactional(propagation = Propagation.SUPPORTS) protected ENTITY findSingleResult(TypedQuery<ENTITY> query) throws NotFoundException { try {//from w w w. j a v a2 s . c o m return query.getSingleResult(); } catch (NoResultException e) { throw new NotFoundException("Object '" + entityClass + "' with parameters '" + Arrays.toString(query.getParameters().toArray()) + "' not found in database", e); } }