public class MultiVertexCentricQueryBuilder extends BasicVertexCentricQueryBuilder<MultiVertexCentricQueryBuilder> implements TitanMultiVertexQuery<MultiVertexCentricQueryBuilder>
TitanMultiVertexQuery that extends BasicVertexCentricQueryBuilder
for all the query building and optimization and adds only the execution logic in
execute(com.thinkaurelius.titan.graphdb.internal.RelationCategory, BasicVertexCentricQueryBuilder.ResultConstructor).
All other methods just prepare or transform that result set to fit the particular method semantics.BasicVertexCentricQueryBuilder.RelationConstructor, BasicVertexCentricQueryBuilder.ResultConstructor<Q>, BasicVertexCentricQueryBuilder.VertexConstructor, BasicVertexCentricQueryBuilder.VertexIdConstructorprofiler, txadjacentVertex, constraints, dir, limit, orders, types| Constructor and Description |
|---|
MultiVertexCentricQueryBuilder(StandardTitanTx tx) |
| Modifier and Type | Method and Description |
|---|---|
TitanMultiVertexQuery |
addAllVertices(Collection<? extends org.apache.tinkerpop.gremlin.structure.Vertex> vertices)
Adds the given collection of vertices to the set of vertices against which to execute this query.
|
TitanMultiVertexQuery |
addVertex(org.apache.tinkerpop.gremlin.structure.Vertex vertex)
Adds the given vertex to the set of vertices against which to execute this query.
|
Map<TitanVertex,Iterable<TitanEdge>> |
edges()
Returns an iterable over all incident edges that match this query for each vertex
|
protected <Q> Map<TitanVertex,Q> |
execute(RelationCategory returnType,
BasicVertexCentricQueryBuilder.ResultConstructor<Q> resultConstructor)
Constructs the BaseVertexCentricQuery through
BasicVertexCentricQueryBuilder.constructQuery(com.thinkaurelius.titan.graphdb.internal.RelationCategory). |
Map<TitanVertex,Iterable<? extends TitanRelation>> |
executeImplicitKeyQuery() |
protected MultiVertexCentricQueryBuilder |
getThis() |
Map<TitanVertex,Iterable<TitanVertexProperty>> |
properties()
Returns an iterable over all incident properties that match this query for each vertex
|
Map<TitanVertex,Iterable<TitanRelation>> |
relations()
Returns an iterable over all incident relations that match this query for each vertex
|
Map<TitanVertex,VertexList> |
vertexIds()
Retrieves all vertices connected to each of the query's central vertices by edges
matching the conditions defined in this query.
|
Map<TitanVertex,Iterable<TitanVertex>> |
vertices()
Retrieves all vertices connected to each of the query's base vertices by edges
matching the conditions defined in this query.
|
allRequiredRepresentatives, constructQuery, constructQuery, constructQueryWithoutProfile, edges2VertexIds, edges2Vertices, executeImplicitKeyQuery, executeRelations, executeVertexIds, executeVertices, getVertex, hasAllCanonicalTypes, hasQueryOnlyGivenVertex, hasQueryOnlyLoaded, isPartitionedVertex, noPartitionRestriction, profiler, queryOnlyGivenVertex, queryOnlyLoaded, system, useSimpleQueryProcessoradjacent, direction, getSingleType, has, has, has, hasNot, hasNot, hasSingleType, hasTypes, interval, isImplicitKeyQuery, keys, labels, limit, orderBy, type, types, typespublic MultiVertexCentricQueryBuilder(StandardTitanTx tx)
protected MultiVertexCentricQueryBuilder getThis()
getThis in class BaseVertexCentricQueryBuilder<MultiVertexCentricQueryBuilder>public TitanMultiVertexQuery addVertex(org.apache.tinkerpop.gremlin.structure.Vertex vertex)
TitanMultiVertexQueryaddVertex in interface TitanMultiVertexQuery<MultiVertexCentricQueryBuilder>public TitanMultiVertexQuery addAllVertices(Collection<? extends org.apache.tinkerpop.gremlin.structure.Vertex> vertices)
TitanMultiVertexQueryaddAllVertices in interface TitanMultiVertexQuery<MultiVertexCentricQueryBuilder>protected <Q> Map<TitanVertex,Q> execute(RelationCategory returnType, BasicVertexCentricQueryBuilder.ResultConstructor<Q> resultConstructor)
BasicVertexCentricQueryBuilder.constructQuery(com.thinkaurelius.titan.graphdb.internal.RelationCategory).
If the query asks for an implicit key, the resulting map is computed and returned directly.
If the query is empty, a map that maps each vertex to an empty list is returned.
Otherwise, the query is executed for all vertices through the transaction which will effectively
pre-load the return result sets into the associated CacheVertex or
don't do anything at all if the vertex is new (and hence no edges in the storage backend).
After that, a map is constructed that maps each vertex to the corresponding VertexCentricQuery and wrapped
into a QueryProcessor. Hence, upon iteration the query will be executed like any other VertexCentricQuery
with the performance difference that the SliceQueries will have already been preloaded and not further
calls to the storage backend are needed.returnType - public Map<TitanVertex,Iterable<? extends TitanRelation>> executeImplicitKeyQuery()
public Map<TitanVertex,Iterable<TitanEdge>> edges()
TitanMultiVertexQueryedges in interface TitanMultiVertexQuery<MultiVertexCentricQueryBuilder>public Map<TitanVertex,Iterable<TitanVertexProperty>> properties()
TitanMultiVertexQueryproperties in interface TitanMultiVertexQuery<MultiVertexCentricQueryBuilder>public Map<TitanVertex,Iterable<TitanRelation>> relations()
TitanMultiVertexQueryrelations in interface TitanMultiVertexQuery<MultiVertexCentricQueryBuilder>public Map<TitanVertex,Iterable<TitanVertex>> vertices()
TitanMultiVertexQueryvertices in interface TitanMultiVertexQuery<MultiVertexCentricQueryBuilder>public Map<TitanVertex,VertexList> vertexIds()
TitanMultiVertexQueryvertexIds in interface TitanMultiVertexQuery<MultiVertexCentricQueryBuilder>Copyright © 2012–2015. All rights reserved.