com.thinkaurelius.titan.graphdb.query.vertex

## Class BaseVertexCentricQuery

- java.lang.Object
- - com.thinkaurelius.titan.graphdb.query.BaseQuery
  - - com.thinkaurelius.titan.graphdb.query.vertex.BaseVertexCentricQuery

- All Implemented Interfaces:
    Query
  Direct Known Subclasses:
    VertexCentricQuery

      public class BaseVertexCentricQuery
      extends BaseQuery

  The base implementation for `VertexCentricQuery` which does not yet contain a reference to the base vertex of the query. This query is constructed by `BasicVertexCentricQueryBuilder.constructQuery(com.thinkaurelius.titan.graphdb.internal.RelationCategory)` and then later extended by single or multi-vertex query which add the vertex to the query. This class override many methods in `ElementQuery` - check there for a description.
  Author:
    Matthias Broecheler (me@matthiasb.com)

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Condition<TitanRelation>` | `condition` The condition of this query in QNF
    `protected com.tinkerpop.blueprints.Direction` | `direction` The direction condition of this query.
    `protected List<BackendQueryHolder<SliceQuery>>` | `queries` The individual component `SliceQuery` of this query.

    - ### Fields inherited from interface com.thinkaurelius.titan.graphdb.query.Query

      `NO_LIMIT`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `BaseVertexCentricQuery()` Construct an empty query
    `protected` | `BaseVertexCentricQuery(BaseVertexCentricQuery query)`
    `` | `BaseVertexCentricQuery(Condition<TitanRelation> condition, com.tinkerpop.blueprints.Direction direction, List<BackendQueryHolder<SliceQuery>> queries, OrderList orders, int limit)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static BaseVertexCentricQuery` | `emptyQuery()`
    `Condition<TitanRelation>` | `getCondition()`
    `com.tinkerpop.blueprints.Direction` | `getDirection()`
    `OrderList` | `getOrders()`
    `protected List<BackendQueryHolder<SliceQuery>>` | `getQueries()`
    `BackendQueryHolder<SliceQuery>` | `getSubQuery(int position)`
    `boolean` | `isEmpty()`
    `boolean` | `isSimple()` A query is considered 'simple' if it is comprised of just one sub-query and that query is fitted (i.e.
    `boolean` | `matches(TitanRelation relation)`
    `int` | `numSubQueries()`
    `String` | `toString()`

    - ### Methods inherited from class com.thinkaurelius.titan.graphdb.query.BaseQuery

      `getLimit, hasLimit, setLimit`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### condition

          protected final Condition<TitanRelation> condition

      The condition of this query in QNF

    - #### queries

          protected final List<BackendQueryHolder<SliceQuery>> queries

      The individual component `SliceQuery` of this query. This query is considered an OR of the individual components (possibly filtered by the condition if not fitted).

    - #### direction

          protected final com.tinkerpop.blueprints.Direction direction

      The direction condition of this query. This is duplicated from the condition for efficiency reasons.

  - ### Constructor Detail

    - #### BaseVertexCentricQuery

          public BaseVertexCentricQuery(Condition<TitanRelation> condition,
                                com.tinkerpop.blueprints.Direction direction,
                                List<BackendQueryHolder<SliceQuery>> queries,
                                OrderList orders,
                                int limit)

    - #### BaseVertexCentricQuery

          protected BaseVertexCentricQuery(BaseVertexCentricQuery query)

    - #### BaseVertexCentricQuery

          protected BaseVertexCentricQuery()

      Construct an empty query

  - ### Method Detail

    - #### emptyQuery

          public static BaseVertexCentricQuery emptyQuery()

    - #### getCondition

          public Condition<TitanRelation> getCondition()

    - #### getOrders

          public OrderList getOrders()

    - #### getDirection

          public com.tinkerpop.blueprints.Direction getDirection()

    - #### getQueries

          protected List<BackendQueryHolder<SliceQuery>> getQueries()

    - #### isEmpty

          public boolean isEmpty()

    - #### numSubQueries

          public int numSubQueries()

    - #### isSimple

          public boolean isSimple()

      A query is considered 'simple' if it is comprised of just one sub-query and that query is fitted (i.e. does not require an in-memory filtering).
      Returns:

    - #### getSubQuery

          public BackendQueryHolder<SliceQuery> getSubQuery(int position)

    - #### matches

          public boolean matches(TitanRelation relation)

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2012–2014. All rights reserved.