overload for prepareGraphQuery

@param queryString
@param baseURI
@return MarkLogicGraphQuery
@throws RepositoryException
@throws MalformedQueryException
331737
@Override
    public MarkLogicGraphQuery prepareGraphQuery(String queryString,String baseURI) throws RepositoryException, MalformedQueryException {
        return prepareGraphQuery(QueryLanguage.SPARQL, queryString, baseURI);
    }
987047
def base_query_url(query)
      text = CGI.escape(query.sanitized_text.strip)
      url = "#{protocol}://dev.virtualearth.net/REST/v1/Locations/"
      if query.reverse_geocode?
        url + "#{text}?"
      else
        if r = query.options[:region]
          url << "#{r}/"
        end
        # use the more forgiving 'unstructured' query format to allow special
        # chars, newlines, brackets, typos.
        url + "?q=#{text}&"
      end
    end
13395
static Map<String, String> findQueryParams(String baseParam, Method method) {
        Map<String, String> hrefVars = new HashMap<>();
        Annotation[][] parameterAnnotations = method.getParameterAnnotations();
        for (int i = 0; i < parameterAnnotations.length; i++) {
            Annotation[] paramAnnotations = parameterAnnotations[i];
            for (Annotation paramAnnotation : paramAnnotations) {
                Class<?> parameterClass = method.getParameterTypes()[i];
                hrefVars.putAll(findQueryParamOnParameter(baseParam, parameterClass, paramAnnotation));
            }
        }
        return hrefVars;
    }
646750
protected <T, K extends Serializable>
    Query<T> _buildQuery(
                    final DAO<T, K>  dao,
                    final Class<T> type,
                    final QueryParams params
                    )
    {
        Query<T>  query = null;
        try {
            query = dao.createQuery();
            QueryBuilder  builder = _getQueryBuilderFactory().newBuilder( type );
            query = builder.build( query, params );
        } catch (RepositoryConfigurationException ex) {
            throw ex;
        } catch (QueryException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new QueryException( ex );
        }

        return query;
    }
1351101
public boolean sendBooleanQuery(String queryString, SPARQLQueryBindingSet bindings, boolean includeInferred, String baseURI) throws IOException, RepositoryException, MalformedQueryException,
			QueryInterruptedException {
		return getClient().performBooleanQuery(queryString, bindings, this.tx, includeInferred, baseURI);
	}
1232907
private QueryIterator forestQuery(QueryOptions options) throws ForestException {
        // NOTE: Geo & FullText queries are not supported yet
        if (options == null)
            options = new QueryOptions();
        long skip = options.getSkip();
        long limit = options.getLimit();
        boolean descending = options.isDescending();
        boolean inclusiveStart = options.isInclusiveStart();
        boolean inclusiveEnd = options.isInclusiveEnd();
        if (options.getKeys() != null && options.getKeys().size() > 0) {
            Object[] keys = options.getKeys().toArray();
            return _view.query(
                    skip,
                    limit,
                    descending,
                    inclusiveStart,
                    inclusiveEnd,
                    keys);
        } else {
            Object endKey = Misc.keyForPrefixMatch(options.getEndKey(),
                    options.getPrefixMatchLevel());
            Object startKey = options.getStartKey();
            String startKeyDocID = options.getStartKeyDocId();
            String endKeyDocID = options.getEndKeyDocId();
            return _view.query(
                    skip,
                    limit,
                    descending,
                    inclusiveStart,
                    inclusiveEnd,
                    startKey,
                    endKey,
                    startKeyDocID,
                    endKeyDocID);
        }
    }
175843
private static QueryBuilder getQueryBldr(final IQueryPart _queryPart)
        throws EFapsException
    {
        final Iterator<String> typeIter = ((AbstractQueryPart) _queryPart).getTypes().iterator();
        String typeStr = typeIter.next();
        final QueryBuilder ret = new QueryBuilder(UUIDUtil.isUUID(typeStr) ? Type.get(UUID.fromString(typeStr))
                        : Type.get(typeStr));
        while (typeIter.hasNext()) {
            typeStr = typeIter.next();
            ret.addType(UUIDUtil.isUUID(typeStr) ? Type.get(UUID.fromString(typeStr)) : Type.get(typeStr));
        }
        for (final AbstractWhere where : ((AbstractQueryPart) _queryPart).getWheres()) {
            if (where instanceof AttributeWhere) {
                final AttributeWhere attrWhere = (AttributeWhere) where;
                switch (where.getComparison()) {
                    case IN:
                    case EQUAL:
                        ret.addWhereAttrEqValue(attrWhere.getAttribute(), attrWhere.getValues().toArray());
                        break;
                    case GREATER:
                        ret.addWhereAttrGreaterValue(attrWhere.getAttribute(), attrWhere.getValues().get(0));
                        break;
                    case LESS:
                        ret.addWhereAttrLessValue(attrWhere.getAttribute(), attrWhere.getValues().get(0));
                        break;
                    case LIKE:
                        ret.addWhereAttrMatchValue(attrWhere.getAttribute(), attrWhere.getValues().get(0));
                        break;
                    case UNEQUAL:
                    case NOTIN:
                        ret.addWhereAttrNotEqValue(attrWhere.getAttribute(), attrWhere.getValues().toArray());
                        break;
                    default:
                        ret.addWhereAttrEqValue("ID", 0);
                        break;
                }
            } else if (where instanceof SelectWhere) {
                final SelectWhere selWhere = (SelectWhere) where;
                switch (where.getComparison()) {
                    case EQUAL:
                        ret.addWhereSelectEqValue(selWhere.getSelect(), selWhere.getValues().toArray());
                        break;
                    case GREATER:
                        ret.addWhereSelectGreaterValue(selWhere.getSelect(), selWhere.getValues().get(0));
                        break;
                    case LESS:
                        ret.addWhereSelectLessValue(selWhere.getSelect(), selWhere.getValues().get(0));
                        break;
                    case LIKE:
                        ret.addWhereSelectMatchValue(selWhere.getSelect(), selWhere.getValues().get(0));
                        break;
                    case UNEQUAL:
                    case IN:
                    case NOTIN:
                    default:
                        ret.addWhereAttrEqValue("ID", 0);
                        break;
                }
            } else if (where instanceof AttrQueryWhere) {
                final AttrQueryWhere attrQueryWhere = (AttrQueryWhere) where;
                switch (where.getComparison()) {
                    case IN:
                        ret.addWhereAttrInQuery(attrQueryWhere.getAttribute(),
                                        getQueryBldr(attrQueryWhere.getQuery()).getAttributeQuery(
                                                        ((AbstractNestedQueryStmtPart) attrQueryWhere.getQuery())
                                                                        .getSelect()));
                        break;
                    case NOTIN:
                        ret.addWhereAttrNotInQuery(attrQueryWhere.getAttribute(),
                                        getQueryBldr(attrQueryWhere.getQuery()).getAttributeQuery(
                                                        ((AbstractNestedQueryStmtPart) attrQueryWhere.getQuery())
                                                                        .getSelect()));
                        break;
                    case EQUAL:
                    case GREATER:
                    case LESS:
                    case LIKE:
                    case UNEQUAL:
                    default:
                        ret.addWhereAttrEqValue("ID", 0);
                        break;
                }
            } else if (where instanceof SelectQueryWhere) {
                final SelectQueryWhere selQueryWhere = (SelectQueryWhere) where;
                switch (where.getComparison()) {
                    case IN:
                        ret.addWhereAttrInQuery(selQueryWhere.getSelect(),
                                        getQueryBldr(selQueryWhere.getQuery()).getAttributeQuery(
                                                        ((AbstractNestedQueryStmtPart) selQueryWhere.getQuery())
                                                                        .getSelect()));
                        break;
                    case NOTIN:
                        ret.addWhereAttrNotInQuery(selQueryWhere.getSelect(),
                                        getQueryBldr(selQueryWhere.getQuery()).getAttributeQuery(
                                                        ((AbstractNestedQueryStmtPart) selQueryWhere.getQuery())
                                                                        .getSelect()));
                        break;
                    case EQUAL:
                    case GREATER:
                    case LESS:
                    case LIKE:
                    case UNEQUAL:
                    default:
                        ret.addWhereAttrEqValue("ID", 0);
                        break;
                }
            }
        }
        if (_queryPart instanceof AbstractQueryStmtPart) {
            ret.setLimit(((AbstractQueryStmtPart) _queryPart).getLimit());
        }
        return ret;
    }
1017284
def query(self, queryString):
    '''
    
    '''
    self._setHeaders('query')
    return self._sforce.service.query(queryString)
324020
@InterfaceAudience.Private
    public List<QueryRow> query(QueryOptions options) throws CouchbaseLiteException {
        if (options == null)
            options = new QueryOptions();
        if (groupOrReduce(options))
            return viewStore.reducedQuery(options);
        else
            return viewStore.regularQuery(options);
    }
446094
public void performUpdateQuery(String queryString, SPARQLQueryBindingSet bindings, Transaction tx, boolean includeInferred, String baseURI) {
        SPARQLQueryDefinition qdef = sparqlManager.newQueryDefinition(queryString);
        if(notNull(baseURI) && !baseURI.isEmpty()){ qdef.setBaseUri(baseURI);}
        if (notNull(ruleset) ) {qdef.setRulesets(ruleset);}
        if(notNull(graphPerms)){ qdef.setUpdatePermissions(graphPerms);}
        qdef.setIncludeDefaultRulesets(includeInferred);
        sparqlManager.clearPageLength();
        sparqlManager.executeUpdate(qdef, tx);
    }
1058514
private void addEntityGraphToFindMethodQueryHints(
      EntityGraphBean entityGraphCandidate, MethodInvocation invocation) {
    LOG.trace("Trying to push the EntityGraph candidate to the query hints find method");

    Map<String, Object> queryProperties = null;
    int index = 0;
    for (Object argument : invocation.getArguments()) {
      if (argument instanceof Map) {
        queryProperties = (Map) argument;
        break;
      }
      index++;
    }
    if (queryProperties == null) {
      LOG.trace("No query hints passed to the find method.");
      return;
    }
    if (!entityGraphCandidate.isPrimary() && QueryHintsUtils.containsEntityGraph(queryProperties)) {
      LOG.trace(
          "The query hints passed with the find method already hold an entity graph. Overriding aborted because the candidate EntityGraph is optional.");
      return;
    }

    queryProperties = new HashMap<String, Object>(queryProperties);
    QueryHintsUtils.removeEntityGraphs(queryProperties);
    queryProperties.putAll(
        QueryHintsUtils.buildQueryHints(
            (EntityManager) invocation.getThis(), entityGraphCandidate));
    invocation.getArguments()[index] = queryProperties;
  }
602728
private void prepareQuery()
        throws EFapsException
    {
        for (final QueryBuilder queryBldr : this.attrQueryBldrs.values()) {
            final AttributeQuery attrQuery = queryBldr.getAttributeQuery();
            this.addWhereAttrInQuery(queryBldr.getLinkAttributeName(), attrQuery);
        }

        if (!this.types.isEmpty()) {
            // force the include
            this.query.setIncludeChildTypes(true);
            final Type baseType = Type.get(this.typeUUID);
            final QEqual eqPart = new QEqual(new QAttribute(baseType.getTypeAttribute()));

            for (final UUID type : this.types) {
                eqPart.addValue(new QNumberValue(Type.get(type).getId()));
            }
            this.compares.add(eqPart);
        }

        if (!this.compares.isEmpty()) {
            final QAnd and = this.or ? new QOr() : new QAnd();
            for (final AbstractQAttrCompare compare : this.compares) {
                and.addPart(compare);
            }
            this.query.setWhere(new QWhereSection(and));
        }
        if (!this.orders.isEmpty()) {
            final QOrderBySection orderBy = new QOrderBySection(
                            this.orders.toArray(new AbstractQPart[this.orders.size()]));
            this.query.setOrderBy(orderBy);
        }
        if (this.limit > 0) {
            this.query.setLimit(this.limit);
        }
    }
154382
@Override
    public <T> TypedQuery<T> createQuery(String paramString, Class<T> paramClass)
    {
        Query q = createQuery(paramString);
        return onTypedQuery(paramClass, q);
    }
1318360
public QueryControllerQuery addQuery(String queryStr, String queryId) {
		int position = getElementPosition(queryId);

		QueryControllerQuery query = new QueryControllerQuery(queryId);
		query.setQuery(queryStr);

		if (position == -1) { // add to the collection for a new query.
			entities.add(query);
			fireElementAdded(query);
		} else {
			entities.set(position, query);
			fireElementChanged(query);
		}
		return query;
	}
469428
public InputStream performGraphQuery(String queryString, SPARQLQueryBindingSet bindings, Transaction tx, boolean includeInferred, String baseURI) throws JsonProcessingException {
        return performGraphQuery(queryString, bindings, new InputStreamHandle(), tx, includeInferred, baseURI);
    }
443323
@Override
	public QueryRequest<ArrayNode> query(String fql) {
		return this.query(fql, mapper.getTypeFactory().constructType(ArrayNode.class));
	}
966461
@Override
    public MarkLogicUpdateQuery prepareUpdate(String queryString,String baseURI) throws RepositoryException, MalformedQueryException {
        return prepareUpdate(QueryLanguage.SPARQL, queryString, baseURI);
    }