public class VertexCentricQueryBuilder extends BasicVertexCentricQueryBuilder<VertexCentricQueryBuilder> implements TitanVertexQuery<VertexCentricQueryBuilder>
TitanVertexQuery
that extends BasicVertexCentricQueryBuilder
for all the query building and optimization and adds only the execution logic in
BasicVertexCentricQueryBuilder.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 BasicVertexCentricQueryBuilder.queryOnlyLoaded()
.
All other methods just prepare or transform that result set to fit the particular method semantics.BasicVertexCentricQueryBuilder.RelationConstructor, BasicVertexCentricQueryBuilder.ResultConstructor<Q>, BasicVertexCentricQueryBuilder.VertexConstructor, BasicVertexCentricQueryBuilder.VertexIdConstructor
profiler, tx
adjacentVertex, constraints, dir, limit, orders, types
Constructor and Description |
---|
VertexCentricQueryBuilder(InternalVertex v) |
Modifier and Type | Method and Description |
---|---|
Iterable<TitanEdge> |
edges()
Returns an iterable over all incident edges that match this query
|
protected <Q> Q |
execute(RelationCategory returnType,
BasicVertexCentricQueryBuilder.ResultConstructor<Q> resultConstructor) |
protected VertexCentricQueryBuilder |
getThis() |
Iterable<TitanVertexProperty> |
properties()
Returns an iterable over all incident properties that match this query
|
Iterable<TitanRelation> |
relations()
Returns an iterable over all incident relations 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<TitanVertex> |
vertices() |
allRequiredRepresentatives, constructQuery, constructQuery, constructQueryWithoutProfile, edges2VertexIds, edges2Vertices, executeImplicitKeyQuery, executeRelations, executeVertexIds, executeVertices, getVertex, hasAllCanonicalTypes, hasQueryOnlyGivenVertex, hasQueryOnlyLoaded, isPartitionedVertex, noPartitionRestriction, profiler, queryOnlyGivenVertex, queryOnlyLoaded, system, useSimpleQueryProcessor
adjacent, direction, getSingleType, has, has, has, hasNot, hasNot, hasSingleType, hasTypes, interval, isImplicitKeyQuery, keys, labels, limit, orderBy, type, types, types
public VertexCentricQueryBuilder(InternalVertex v)
protected VertexCentricQueryBuilder getThis()
getThis
in class BaseVertexCentricQueryBuilder<VertexCentricQueryBuilder>
protected <Q> Q execute(RelationCategory returnType, BasicVertexCentricQueryBuilder.ResultConstructor<Q> resultConstructor)
public Iterable<TitanEdge> edges()
TitanVertexQuery
edges
in interface TitanVertexQuery<VertexCentricQueryBuilder>
public Iterable<TitanVertexProperty> properties()
TitanVertexQuery
properties
in interface TitanVertexQuery<VertexCentricQueryBuilder>
public Iterable<TitanRelation> relations()
TitanVertexQuery
relations
in interface TitanVertexQuery<VertexCentricQueryBuilder>
public Iterable<TitanVertex> vertices()
vertices
in interface TitanVertexQuery<VertexCentricQueryBuilder>
public VertexList vertexIds()
TitanVertexQuery
vertexIds
in interface TitanVertexQuery<VertexCentricQueryBuilder>
Copyright © 2012–2015. All rights reserved.