com.thinkaurelius.titan.graphdb.query.graph

## Class GraphCentricQueryBuilder

- java.lang.Object
- - com.thinkaurelius.titan.graphdb.query.graph.GraphCentricQueryBuilder

- All Implemented Interfaces:
    TitanGraphQuery<GraphCentricQueryBuilder>, com.tinkerpop.blueprints.GraphQuery, com.tinkerpop.blueprints.Query

      public class GraphCentricQueryBuilder
      extends Object
      implements TitanGraphQuery<GraphCentricQueryBuilder>

  Builds a `TitanGraphQuery`, optimizes the query and compiles the result into a `GraphCentricQuery` which is then executed through a `QueryProcessor`.
  Author:
    Matthias Broecheler (me@matthiasb.com)

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.tinkerpop.blueprints.Query

      `com.tinkerpop.blueprints.Query.Compare`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GraphCentricQueryBuilder(StandardTitanTx tx, IndexSerializer serializer)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `GraphCentricQuery` | `constructQuery(ElementCategory resultType)`
    `QueryDescription` | `describeForEdges()` Returns a description of this query for edges as a `QueryDescription` object.
    `QueryDescription` | `describeForProperties()` Returns a description of this query for properties as a `QueryDescription` object.
    `QueryDescription` | `describeForVertices()` Returns a description of this query for vertices as a `QueryDescription` object.
    `Iterable<com.tinkerpop.blueprints.Edge>` | `edges()` Returns all edges that match the conditions.
    `GraphCentricQueryBuilder` | `has(PropertyKey key, TitanPredicate predicate, Object condition)` The returned element must have a property for the given key that matches the condition according to the specified relation
    `GraphCentricQueryBuilder` | `has(String key)`
    `GraphCentricQueryBuilder` | `has(String key, Object value)`
    `GraphCentricQueryBuilder` | `has(String key, com.tinkerpop.blueprints.Predicate predicate, Object condition)` The returned element must have a property for the given key that matches the condition according to the specified relation
    `<T extends Comparable<T>> GraphCentricQueryBuilder` | `has(String s, T t, com.tinkerpop.blueprints.Query.Compare compare)` Deprecated.
    `GraphCentricQueryBuilder` | `hasNot(String key)`
    `GraphCentricQueryBuilder` | `hasNot(String key, Object value)`
    `static Object[]` | `indexCover(CompositeIndexType index, Condition<TitanElement> condition, Set<Condition> covered)`
    `static Condition<TitanElement>` | `indexCover(MixedIndexType index, Condition<TitanElement> condition, IndexSerializer indexInfo, Set<Condition> covered)`
    `static boolean` | `indexCoversOrder(MixedIndexType index, OrderList orders)`
    `<T extends Comparable<?>> GraphCentricQueryBuilder` | `interval(String s, T t1, T t2)`
    `GraphCentricQueryBuilder` | `limit(int limit)` Limits the size of the returned result set
    `GraphCentricQueryBuilder` | `orderBy(PropertyKey key, Order order)` Orders the element results of this query according to their property for the given key in the given order (increasing/decreasing).
    `GraphCentricQueryBuilder` | `orderBy(String key, Order order)` Orders the element results of this query according to their property for the given key in the given order (increasing/decreasing).
    `Iterable<TitanProperty>` | `properties()` Returns all properties that match the conditions
    `Iterable<com.tinkerpop.blueprints.Vertex>` | `vertices()` Returns all vertices that match the conditions.

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

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

- - ### Constructor Detail

    - #### GraphCentricQueryBuilder

          public GraphCentricQueryBuilder(StandardTitanTx tx,
                                  IndexSerializer serializer)

  - ### Method Detail

    - #### has

          public GraphCentricQueryBuilder has(String key,
                                     com.tinkerpop.blueprints.Predicate predicate,
                                     Object condition)

      Description copied from interface: `TitanGraphQuery`
      The returned element must have a property for the given key that matches the condition according to the specified relation
      Specified by:
        `has` in interface `TitanGraphQuery<GraphCentricQueryBuilder>`
      Specified by:
        `has` in interface `com.tinkerpop.blueprints.GraphQuery`
      Specified by:
        `has` in interface `com.tinkerpop.blueprints.Query`
      Parameters:
        `key` - Key that identifies the property
        `predicate` - Predicate between property and condition
      Returns:
        This query

    - #### has

          public GraphCentricQueryBuilder has(PropertyKey key,
                                     TitanPredicate predicate,
                                     Object condition)

      Description copied from interface: `TitanGraphQuery`
      The returned element must have a property for the given key that matches the condition according to the specified relation
      Specified by:
        `has` in interface `TitanGraphQuery<GraphCentricQueryBuilder>`
      Parameters:
        `key` - Key that identifies the property
        `predicate` - Relation between property and condition
      Returns:
        This query

    - #### has

          public GraphCentricQueryBuilder has(String key)

      Specified by:
        `has` in interface `TitanGraphQuery<GraphCentricQueryBuilder>`
      Specified by:
        `has` in interface `com.tinkerpop.blueprints.GraphQuery`
      Specified by:
        `has` in interface `com.tinkerpop.blueprints.Query`

    - #### hasNot

          public GraphCentricQueryBuilder hasNot(String key)

      Specified by:
        `hasNot` in interface `TitanGraphQuery<GraphCentricQueryBuilder>`
      Specified by:
        `hasNot` in interface `com.tinkerpop.blueprints.GraphQuery`
      Specified by:
        `hasNot` in interface `com.tinkerpop.blueprints.Query`

    - #### has

          @Deprecated
          public <T extends Comparable<T>> GraphCentricQueryBuilder has(String s,
                                                                          T t,
                                                                          com.tinkerpop.blueprints.Query.Compare compare)

      Deprecated.
      Specified by:
        `has` in interface `TitanGraphQuery<GraphCentricQueryBuilder>`
      Specified by:
        `has` in interface `com.tinkerpop.blueprints.GraphQuery`
      Specified by:
        `has` in interface `com.tinkerpop.blueprints.Query`

    - #### has

          public GraphCentricQueryBuilder has(String key,
                                     Object value)

      Specified by:
        `has` in interface `TitanGraphQuery<GraphCentricQueryBuilder>`
      Specified by:
        `has` in interface `com.tinkerpop.blueprints.GraphQuery`
      Specified by:
        `has` in interface `com.tinkerpop.blueprints.Query`

    - #### hasNot

          public GraphCentricQueryBuilder hasNot(String key,
                                        Object value)

      Specified by:
        `hasNot` in interface `TitanGraphQuery<GraphCentricQueryBuilder>`
      Specified by:
        `hasNot` in interface `com.tinkerpop.blueprints.GraphQuery`
      Specified by:
        `hasNot` in interface `com.tinkerpop.blueprints.Query`

    - #### interval

          public <T extends Comparable<?>> GraphCentricQueryBuilder interval(String s,
                                                                    T t1,
                                                                    T t2)

      Specified by:
        `interval` in interface `TitanGraphQuery<GraphCentricQueryBuilder>`
      Specified by:
        `interval` in interface `com.tinkerpop.blueprints.GraphQuery`
      Specified by:
        `interval` in interface `com.tinkerpop.blueprints.Query`

    - #### limit

          public GraphCentricQueryBuilder limit(int limit)

      Description copied from interface: `TitanGraphQuery`
      Limits the size of the returned result set
      Specified by:
        `limit` in interface `TitanGraphQuery<GraphCentricQueryBuilder>`
      Specified by:
        `limit` in interface `com.tinkerpop.blueprints.GraphQuery`
      Specified by:
        `limit` in interface `com.tinkerpop.blueprints.Query`
      Parameters:
        `limit` - The maximum number of results to return
      Returns:
        This query

    - #### orderBy

          public GraphCentricQueryBuilder orderBy(String key,
                                         Order order)

      Description copied from interface: `TitanGraphQuery`
      Orders the element results of this query according to their property for the given key in the given order (increasing/decreasing).
      Specified by:
        `orderBy` in interface `TitanGraphQuery<GraphCentricQueryBuilder>`
      Parameters:
        `key` - The key of the properties on which to order
        `order` - the ordering direction
      Returns:

    - #### orderBy

          public GraphCentricQueryBuilder orderBy(PropertyKey key,
                                         Order order)

      Description copied from interface: `TitanGraphQuery`
      Orders the element results of this query according to their property for the given key in the given order (increasing/decreasing).
      Specified by:
        `orderBy` in interface `TitanGraphQuery<GraphCentricQueryBuilder>`
      Parameters:
        `key` - The key of the properties on which to order
        `order` - the ordering direction
      Returns:

    - #### vertices

          public Iterable<com.tinkerpop.blueprints.Vertex> vertices()

      Description copied from interface: `TitanGraphQuery`
      Returns all vertices that match the conditions.
      Specified by:
        `vertices` in interface `TitanGraphQuery<GraphCentricQueryBuilder>`
      Specified by:
        `vertices` in interface `com.tinkerpop.blueprints.Query`

    - #### edges

          public Iterable<com.tinkerpop.blueprints.Edge> edges()

      Description copied from interface: `TitanGraphQuery`
      Returns all edges that match the conditions.
      Specified by:
        `edges` in interface `TitanGraphQuery<GraphCentricQueryBuilder>`
      Specified by:
        `edges` in interface `com.tinkerpop.blueprints.Query`

    - #### properties

          public Iterable<TitanProperty> properties()

      Description copied from interface: `TitanGraphQuery`
      Returns all properties that match the conditions
      Specified by:
        `properties` in interface `TitanGraphQuery<GraphCentricQueryBuilder>`
      Returns:

    - #### describeForVertices

          public QueryDescription describeForVertices()

      Description copied from interface: `TitanGraphQuery`
      Returns a description of this query for vertices as a `QueryDescription` object. This can be used to inspect the query plan for this query. Note, that calling this method does not actually execute the query but only optimizes it and constructs a query plan.
      Specified by:
        `describeForVertices` in interface `TitanGraphQuery<GraphCentricQueryBuilder>`
      Returns:
        A description of this query for vertices

    - #### describeForEdges

          public QueryDescription describeForEdges()

      Description copied from interface: `TitanGraphQuery`
      Returns a description of this query for edges as a `QueryDescription` object. This can be used to inspect the query plan for this query. Note, that calling this method does not actually execute the query but only optimizes it and constructs a query plan.
      Specified by:
        `describeForEdges` in interface `TitanGraphQuery<GraphCentricQueryBuilder>`
      Returns:
        A description of this query for edges

    - #### describeForProperties

          public QueryDescription describeForProperties()

      Description copied from interface: `TitanGraphQuery`
      Returns a description of this query for properties as a `QueryDescription` object. This can be used to inspect the query plan for this query. Note, that calling this method does not actually execute the query but only optimizes it and constructs a query plan.
      Specified by:
        `describeForProperties` in interface `TitanGraphQuery<GraphCentricQueryBuilder>`
      Returns:
        A description of this query for properties

    - #### constructQuery

          public GraphCentricQuery constructQuery(ElementCategory resultType)

    - #### indexCoversOrder

          public static final boolean indexCoversOrder(MixedIndexType index,
                                 OrderList orders)

    - #### indexCover

          public static final Object[] indexCover(CompositeIndexType index,
                            Condition<TitanElement> condition,
                            Set<Condition> covered)

    - #### indexCover

          public static final Condition<TitanElement> indexCover(MixedIndexType index,
                                           Condition<TitanElement> condition,
                                           IndexSerializer indexInfo,
                                           Set<Condition> covered)

Copyright © 2012–2014. All rights reserved.