code: private final Query buildQuery(final NamedParameterQueryData query) {
          final Query builtQuery; // Query created from the query data
  
          // Builds the base query
          builtQuery = getEntityManager().createQuery(query.getQuery());
  
          // Applies the parameters
          for (final Entry<String, Object> entry : query.getParameters()
                  .entrySet()) {
              builtQuery.setParameter(entry.getKey(), entry.getValue());
          }
  
          return builtQuery;
      }
docs: Creates a {@code Query} from the data contained on the received
  {@code QueryData}.
  <p>
  The string query contained on the {@code QueryData} will be transformed
  into the {@code Query}, to which the parameters contained on that same
  received object will be applied.
  
  @param query
  the base query
  @return a {@code Query} created from the received {@code QueryData}