public class VertexCentricQueryBuilder extends AbstractVertexCentricQueryBuilder<VertexCentricQueryBuilder> implements TitanVertexQuery<VertexCentricQueryBuilder>
TitanVertexQuery that extends AbstractVertexCentricQueryBuilder
for all the query building and optimization and adds only the execution logic in
AbstractVertexCentricQueryBuilder.constructQuery(com.thinkaurelius.titan.graphdb.internal.RelationCategory). However, there is
one important special case: If the constructed query is simple (i.e. com.thinkaurelius.titan.graphdb.query.vertex.VertexCentricQuery#isSimple()=true
then we use the SimpleVertexQueryProcessor to execute the query instead of the generic QueryProcessor
for performance reasons and we compute the result sets differently to make things faster and more memory efficient.
The simplified vertex processing only applies to loaded (i.e. non-mutated) vertices. The query can be configured
to only included loaded relations in the result set (which is needed, for instance, when computing index deltas in
IndexSerializer) via AbstractVertexCentricQueryBuilder.queryOnlyLoaded().
All other methods just prepare or transform that result set to fit the particular method semantics.AbstractVertexCentricQueryBuilder.RelationConstructor, AbstractVertexCentricQueryBuilder.ResultConstructor<Q>, AbstractVertexCentricQueryBuilder.VertexConstructor, AbstractVertexCentricQueryBuilder.VertexIdConstructortx| Constructor and Description |
|---|
VertexCentricQueryBuilder(InternalVertex v) |
| Modifier and Type | Method and Description |
|---|---|
long |
count()
Returns the number of edges that match this query
|
Iterable<com.tinkerpop.blueprints.Edge> |
edges()
Returns an iterable over all incident edges that match this query
|
protected <Q> Q |
execute(RelationCategory returnType,
AbstractVertexCentricQueryBuilder.ResultConstructor<Q> resultConstructor) |
protected VertexCentricQueryBuilder |
getThis() |
Iterable<TitanProperty> |
properties()
Returns an iterable over all incident properties that match this query
|
long |
propertyCount()
Returns the number of properties that match this query
|
Iterable<TitanRelation> |
relations()
Returns an iterable over all incident relations that match this query
|
Iterable<TitanEdge> |
titanEdges()
Returns an iterable over all incident edges that match this query.
|
VertexList |
vertexIds()
Retrieves all vertices connected to this query's base vertex by edges
matching the conditions defined in this query.
|
Iterable<com.tinkerpop.blueprints.Vertex> |
vertices() |
adjacent, allRepresentatives, constructQuery, constructQuery, describe, describeForEdges, describeForProperties, describeForRelations, direction, edges2VertexIds, edges2Vertices, executeImplicitKeyQuery, executeRelations, executeVertexIds, executeVertices, getSingleType, has, has, has, has, has, has, has, hasNot, hasNot, hasSingleType, hasTypes, interval, interval, isImplicitKeyQuery, isPartitionedVertex, keys, labels, limit, noPartitionRestriction, orderBy, orderBy, queryOnlyLoaded, system, type, types, useSimpleQueryProcessorclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitadjacent, direction, has, has, has, has, has, has, hasNot, hasNot, interval, interval, keys, labels, limit, orderBy, orderBy, typesdescribeForEdges, describeForPropertiespublic VertexCentricQueryBuilder(InternalVertex v)
protected VertexCentricQueryBuilder getThis()
getThis in class AbstractVertexCentricQueryBuilder<VertexCentricQueryBuilder>protected <Q> Q execute(RelationCategory returnType, AbstractVertexCentricQueryBuilder.ResultConstructor<Q> resultConstructor)
public Iterable<TitanEdge> titanEdges()
TitanVertexQueryTitanEdge.titanEdges in interface TitanVertexQuery<VertexCentricQueryBuilder>public Iterable<TitanProperty> properties()
TitanVertexQueryproperties in interface TitanVertexQuery<VertexCentricQueryBuilder>public Iterable<TitanRelation> relations()
TitanVertexQueryrelations in interface TitanVertexQuery<VertexCentricQueryBuilder>public Iterable<com.tinkerpop.blueprints.Edge> edges()
TitanVertexQueryedges in interface TitanVertexQuery<VertexCentricQueryBuilder>edges in interface com.tinkerpop.blueprints.Querypublic Iterable<com.tinkerpop.blueprints.Vertex> vertices()
vertices in interface com.tinkerpop.blueprints.Querypublic VertexList vertexIds()
TitanVertexQueryvertexIds in interface TitanVertexQuery<VertexCentricQueryBuilder>vertexIds in interface com.tinkerpop.blueprints.VertexQuerypublic long count()
TitanVertexQuerycount in interface TitanVertexQuery<VertexCentricQueryBuilder>count in interface com.tinkerpop.blueprints.VertexQuerypublic long propertyCount()
TitanVertexQuerypropertyCount in interface TitanVertexQuery<VertexCentricQueryBuilder>Copyright © 2012–2014. All rights reserved.