src/main/java/com/tri/persistence/jpql/QueryBuilder.java
public <T> TypedQuery<T> createQuery(final EntityManager manager,
			Class<T> type) {
		if (manager == null) {
			throw new NullPointerException("Entity Manager required");
		}

		TypedQuery<T> result = manager.createQuery(render(), type);

		for (Parameter<?> parameter : parameters) {
			parameter.apply(result);
		}

		return result;
	}
public <T> TypedQuery<T> createQuery(final EntityManager manager,
			Class<T> type) {
		if (manager == null) {
			throw new NullPointerException("Entity Manager required");
		}

		TypedQuery<T> result = manager.createQuery(render(), type);

		for (Parameter<?> parameter : parameters) {
			parameter.apply(result);
		}

		return result;
	}
public < T > TypedQuery < T > createQuery ( final EntityManager manager , Class < T > type ) { if ( manager == null ) { throw new NullPointerException ( "Entity Manager required" ) ; } TypedQuery < T > result = manager . createQuery ( render ( ) , type ) ; for ( Parameter < ? > parameter : parameters ) { parameter . apply ( result ) ; } return result ; }
Returns a JPA TypedQuery with all previously specified parameters added.

@param manager
JPA EntityManager
@param type
the type of the query result
@return JPA Query
Returns a JPA TypedQuery with all previously specified parameters added .