com.thinkaurelius.titan.graphdb.query.vertex

## Class VertexCentricQuery

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

- All Implemented Interfaces:
    ElementQuery<TitanRelation,SliceQuery>, Query

      public class VertexCentricQuery
      extends BaseVertexCentricQuery
      implements ElementQuery<TitanRelation,SliceQuery>

  A vertex-centric query which implements `ElementQuery` so that it can be executed by `QueryProcessor`. Most of the query definition is in the extended `BaseVertexCentricQuery` - this class only adds the base vertex to the mix.
  Author:
    Matthias Broecheler (me@matthiasb.com)

- - ### Field Summary

    - ### Fields inherited from class com.thinkaurelius.titan.graphdb.query.vertex.BaseVertexCentricQuery

      `condition, direction, queries`

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

      `NO_LIMIT`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `VertexCentricQuery(InternalVertex vertex)` Constructs an empty query
    `` | `VertexCentricQuery(InternalVertex vertex, BaseVertexCentricQuery base)`
    `` | `VertexCentricQuery(InternalVertex vertex, 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 VertexCentricQuery` | `emptyQuery(InternalVertex vertex)`
    `Comparator` | `getSortOrder()` Returns the expected sort order of this query if any was specified.
    `InternalVertex` | `getVertex()`
    `boolean` | `hasDuplicateResults()` Whether the combination of the individual sub-queries can result in duplicate results.
    `boolean` | `isSorted()` Whether this query expects the results to be in a particular sort order.
    `String` | `toString()`

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

      `emptyQuery, getCondition, getDirection, getOrders, getQueries, getSubQuery, isEmpty, isSimple, matches, numSubQueries`

    - ### 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`

    - ### Methods inherited from interface com.thinkaurelius.titan.graphdb.query.ElementQuery

      `getSubQuery, isEmpty, matches, numSubQueries`

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

      `getLimit, hasLimit`

- - ### Constructor Detail

    - #### VertexCentricQuery

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

    - #### VertexCentricQuery

          public VertexCentricQuery(InternalVertex vertex,
                            BaseVertexCentricQuery base)

    - #### VertexCentricQuery

          protected VertexCentricQuery(InternalVertex vertex)

      Constructs an empty query
      Parameters:
        `vertex` -

  - ### Method Detail

    - #### emptyQuery

          public static VertexCentricQuery emptyQuery(InternalVertex vertex)

    - #### getVertex

          public InternalVertex getVertex()

    - #### isSorted

          public boolean isSorted()

      Description copied from interface: `ElementQuery`
      Whether this query expects the results to be in a particular sort order.
      Specified by:
        `isSorted` in interface `ElementQuery<TitanRelation,SliceQuery>`
      Returns:

    - #### getSortOrder

          public Comparator getSortOrder()

      Description copied from interface: `ElementQuery`
      Returns the expected sort order of this query if any was specified. Check `ElementQuery.isSorted()` first.
      Specified by:
        `getSortOrder` in interface `ElementQuery<TitanRelation,SliceQuery>`
      Returns:

    - #### hasDuplicateResults

          public boolean hasDuplicateResults()

      Description copied from interface: `ElementQuery`
      Whether the combination of the individual sub-queries can result in duplicate results. Indicates to the query executor whether the results need to be de-duplicated
      Specified by:
        `hasDuplicateResults` in interface `ElementQuery<TitanRelation,SliceQuery>`
      Returns:
        true, if duplicate results are possible, else false

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `BaseVertexCentricQuery`

Copyright © 2012–2014. All rights reserved.