Begin this {@link Query} with all {@link WindupVertexFrame} instances of the given type.
163797
public static QueryBuilderFind fromType(Class<? extends WindupVertexFrame> type)
    {
        final Query query = new Query();
        // this query is going to be added after evaluate() method, because in some cases we need gremlin and in some
        // frames
        query.searchType = type;
        return query;
    }
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);
        }
    }
996593
private org.hibernate.Query query(String hql, Class<?>... type)
  {
    org.hibernate.Query q = session.createQuery(hql);
    for(int i = 0; i < positionedParameters.length; i++) {
      q.setParameter(i, positionedParameters[i]);
    }
    for(Map.Entry<String, Object> entry : namedParameters.entrySet()) {
      Object value = entry.getValue();
      if(Types.isArray(value)) {
        Object[] parameter = (Object[])value;
        if(parameter.length == 0) {
          throw new HibernateException(String.format("Invalid named parameter |%s|. Empty array.", entry.getKey()));
        }
        q.setParameterList(entry.getKey(), parameter);
      }
      else if(Types.isCollection(value)) {
        Collection<?> parameter = (Collection<?>)value;
        if(parameter.isEmpty()) {
          throw new HibernateException(String.format("Invalid named parameter |%s|. Empty list.", entry.getKey()));
        }
        q.setParameterList(entry.getKey(), parameter);
      }
      else {
        q.setParameter(entry.getKey(), value);
      }
    }
    if(offset > 0) {
      q.setFirstResult(offset);
    }
    if(rowsCount > 0) {
      q.setMaxResults(rowsCount);
    }

    if(type.length > 0) {
      q.setResultTransformer(Transformers.aliasToBean(type[0]));
    }
    return q;
  }
154382
@Override
    public <T> TypedQuery<T> createQuery(String paramString, Class<T> paramClass)
    {
        Query q = createQuery(paramString);
        return onTypedQuery(paramClass, q);
    }
203
private Predicate<HelpPage> query(final Predicate<HelpPage> predicate) {
    Predicate<HelpPage> query = predicate;

    if (includeAll == null || !includeAll) {
      if (includeAliases != null && !includeAliases) {
        query = query.and(TypePredicate.of(AliasHelpPage.class).negate());
      }
      if (includeMeta != null && !includeMeta) {
        query = query.and(TypePredicate.of(MetaHelpPage.class).negate());
      }
      if (includeCommands != null && !includeCommands) {
        query = query.and(TypePredicate.of(CommandHelpPage.class).negate());
      }
      if (includeGroups != null && !includeGroups) {
        query = query.and(TypePredicate.of(GroupHelpPage.class).negate());
      }
    }

    return query;
  }
492078
protected void sqlProjection(String sql, String columnAlias, Type type) {
        sqlProjection(sql, Collections.singletonList(columnAlias), Collections.singletonList(type));
    }
668790
@Override
    public synchronized List<Map<String, ResultColumn>> query(final String query) throws DatabaseEngineException {
        return processResultIterator(iterator(query));
    }
148380
public static IterationBuilderOver over(Class<? extends WindupVertexFrame> sourceType)
    {
        Iteration iterationImpl = new Iteration(new TypedFramesSelector(sourceType));
        iterationImpl.setPayloadManager(new TypedNamedIterationPayloadManager(sourceType,
                    DEFAULT_SINGLE_VARIABLE_STRING));
        return iterationImpl;
    }
411028
public <S> S queryOne(Class<S> type, String sql, List<Object> params) {
        if (Anima.of().isUseSQLLimit()) {
            sql += " LIMIT 1";
        }
        List<S> list = queryList(type, sql, params);
        return AnimaUtils.isNotEmpty(list) ? list.get(0) : null;
    }
1296161
@Override
	public <T> QueryRequest<List<T>> query(String fql, Class<T> type)
	{
		return this.getBatchForQuery().query(fql, type);
	}
29773
public List<ModelServiceInstance> queryUPModelInstances(ServiceInstanceQuery query){
        List<ModelServiceInstance> upInstances= null;
        List<ModelServiceInstance> instances = queryModelInstances(query);
        if(instances != null && instances.size() > 0){

            for(ModelServiceInstance instance : instances){
                if(OperationalStatus.UP.equals(instance.getStatus())){
                    if(upInstances == null){
                        upInstances = new ArrayList<ModelServiceInstance>();
                    }
                    upInstances.add(instance);
                }
            }
        }
        if(upInstances == null){
            return Collections.emptyList();
        }
        return upInstances;

    }
215361
public SearchResults query(WaybackRequest wbRequest)
			throws ResourceIndexNotAvailableException,
			ResourceNotInArchiveException, BadQueryException,
			AccessControlException {
		SearchResults results = null; // return value placeholder

		if (wbRequest.isReplayRequest()) {

			results = doCaptureQuery(wbRequest, TYPE_REPLAY);
			results.putFilter(WaybackRequest.REQUEST_TYPE, 
					WaybackRequest.REQUEST_REPLAY_QUERY);

		} else if (wbRequest.isCaptureQueryRequest()) {

			results = doCaptureQuery(wbRequest, TYPE_CAPTURE);
			results.putFilter(WaybackRequest.REQUEST_TYPE, 
					WaybackRequest.REQUEST_CAPTURE_QUERY);

		} else if (wbRequest.isUrlQueryRequest()) {

			results = doUrlQuery(wbRequest);
			results.putFilter(WaybackRequest.REQUEST_TYPE, 
					WaybackRequest.REQUEST_URL_QUERY);

		} else {

			throw new BadQueryException("Unknown query type, must be " 
					+ WaybackRequest.REQUEST_REPLAY_QUERY
					+ ", " + WaybackRequest.REQUEST_CAPTURE_QUERY 
					+ ", or " + WaybackRequest.REQUEST_URL_QUERY);
		}
		return results;
	}
720225
public List<QueryType<EntityBeanType<T>>> getAllQuery()
   {
      List<QueryType<EntityBeanType<T>>> list = new ArrayList<QueryType<EntityBeanType<T>>>();
      List<Node> nodeList = childNode.get("query");
      for(Node node: nodeList)
      {
         QueryType<EntityBeanType<T>>  type = new QueryTypeImpl<EntityBeanType<T>>(this, "query", childNode, node);
         list.add(type);
      }
      return list;
   }
882880
public QueryRequestBuilder<T,ID> query(QueryExpression query)
    {
        return new QueryRequestBuilder<T, ID>(version,type,entityName,query.build());
    }
362885
public <T extends SingleThreadSetQuery.Result<SetType, RuntimeType, ThreadType>> T query(SingleThreadSetQuery<T> query) {
        return query.<SetType, RuntimeType, ThreadType>query((SetType) this);
    }
20321
public QueryBuilder<T, ID> queryBuilder() throws SQLException {
		if (statementBuilder instanceof QueryBuilder) {
			return (QueryBuilder<T, ID>) statementBuilder;
		} else {
			throw new SQLException("Cannot cast " + statementBuilder.getType() + " to QueryBuilder");
		}
	}
915080
public <T> ESDatas<T> searchAllParallel(String index,  Class<T> type,int thread) throws ElasticSearchException{
			return searchAllParallel(index,  ClientInterface.DEFAULT_FETCHSIZE,type,thread);
	}