本文整理汇总了Java中com.thinkaurelius.titan.graphdb.query.BackendQueryHolder类的典型用法代码示例。如果您正苦于以下问题:Java BackendQueryHolder类的具体用法?Java BackendQueryHolder怎么用?Java BackendQueryHolder使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BackendQueryHolder类属于com.thinkaurelius.titan.graphdb.query包,在下文中一共展示了BackendQueryHolder类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: execute
import com.thinkaurelius.titan.graphdb.query.BackendQueryHolder; //导入依赖的package包/类
protected<Q> Q execute(RelationCategory returnType, ResultConstructor<Q> resultConstructor) {
BaseVertexCentricQuery bq = super.constructQuery(returnType);
if (bq.isEmpty()) return resultConstructor.emptyResult();
if (returnType==RelationCategory.PROPERTY && hasSingleType() && !hasQueryOnlyLoaded()
&& tx.getConfiguration().hasPropertyPrefetching()) {
//Preload properties
vertex.query().properties().iterator().hasNext();
}
if (isPartitionedVertex(vertex) && !hasQueryOnlyGivenVertex()) { //If it's a preloaded vertex we shouldn't preload data explicitly
List<InternalVertex> vertices = allRequiredRepresentatives(vertex);
profiler.setAnnotation(QueryProfiler.PARTITIONED_VERTEX_ANNOTATION,true);
profiler.setAnnotation(QueryProfiler.NUMVERTICES_ANNOTATION,vertices.size());
if (vertices.size()>1) {
for (BackendQueryHolder<SliceQuery> sq : bq.getQueries()) {
tx.executeMultiQuery(vertices, sq.getBackendQuery(),sq.getProfiler());
}
}
} else profiler.setAnnotation(QueryProfiler.NUMVERTICES_ANNOTATION,1);
return resultConstructor.getResult(vertex,bq);
}
示例2: relations
import com.thinkaurelius.titan.graphdb.query.BackendQueryHolder; //导入依赖的package包/类
private List<SliceQuery> relations(RelationCategory returnType) {
if (name==null) {
if (hasSingleType()) name = getSingleType().getName();
else throw new IllegalStateException("Need to specify an explicit name for this query");
}
try {
BaseVertexCentricQuery vq = super.constructQuery(returnType);
List<SliceQuery> queries = new ArrayList<SliceQuery>(vq.numSubQueries());
for (int i = 0; i < vq.numSubQueries(); i++) {
BackendQueryHolder<SliceQuery> bq = vq.getSubQuery(i);
SliceQuery sq = bq.getBackendQuery();
queries.add(sq.updateLimit(bq.isFitted() ? vq.getLimit() : hardQueryLimit));
}
return queries;
} finally {
tx.rollback();
}
}
示例3: BaseVertexCentricQuery
import com.thinkaurelius.titan.graphdb.query.BackendQueryHolder; //导入依赖的package包/类
public BaseVertexCentricQuery(Condition<TitanRelation> condition, Direction direction,
List<BackendQueryHolder<SliceQuery>> queries, OrderList orders,
int limit) {
super(limit);
Preconditions.checkArgument(condition != null && queries != null && direction != null);
Preconditions.checkArgument(QueryUtil.isQueryNormalForm(condition) && limit>=0);
this.condition = condition;
this.queries = queries;
this.orders = orders;
this.direction=direction;
}
示例4: SimpleVertexQueryProcessor
import com.thinkaurelius.titan.graphdb.query.BackendQueryHolder; //导入依赖的package包/类
public SimpleVertexQueryProcessor(VertexCentricQuery query, StandardTitanTx tx) {
Preconditions.checkArgument(query.isSimple());
this.query=query;
this.tx=tx;
BackendQueryHolder<SliceQuery> bqh = query.getSubQuery(0);
this.sliceQuery=bqh.getBackendQuery();
this.profiler=bqh.getProfiler();
this.vertex=query.getVertex();
this.edgeSerializer=tx.getEdgeSerializer();
}
示例5: VertexCentricQuery
import com.thinkaurelius.titan.graphdb.query.BackendQueryHolder; //导入依赖的package包/类
public VertexCentricQuery(InternalVertex vertex, Condition<TitanRelation> condition,
Direction direction,
List<BackendQueryHolder<SliceQuery>> queries,
OrderList orders,
int limit) {
super(condition, direction, queries, orders, limit);
Preconditions.checkNotNull(vertex);
this.vertex = vertex;
}
示例6: GraphCentricQuery
import com.thinkaurelius.titan.graphdb.query.BackendQueryHolder; //导入依赖的package包/类
public GraphCentricQuery(ElementCategory resultType, Condition<TitanElement> condition, OrderList orders,
BackendQueryHolder<JointIndexQuery> indexQuery, int limit) {
super(limit);
Preconditions.checkNotNull(condition);
Preconditions.checkArgument(orders != null && orders.isImmutable());
Preconditions.checkArgument(QueryUtil.isQueryNormalForm(condition));
Preconditions.checkNotNull(resultType);
Preconditions.checkNotNull(indexQuery);
this.condition = condition;
this.orders = orders;
this.resultType = resultType;
this.indexQuery = indexQuery;
}
示例7: execute
import com.thinkaurelius.titan.graphdb.query.BackendQueryHolder; //导入依赖的package包/类
protected<Q> Q execute(RelationCategory returnType, ResultConstructor<Q> resultConstructor) {
BaseVertexCentricQuery bq = super.constructQuery(returnType);
if (bq.isEmpty()) return resultConstructor.emptyResult();
if (isPartitionedVertex(vertex)) {
List<InternalVertex> vertices = allRepresentatives(vertex);
if (vertices.size()>1) {
for (BackendQueryHolder<SliceQuery> sq : bq.getQueries()) {
tx.executeMultiQuery(vertices, sq.getBackendQuery());
}
}
}
return resultConstructor.getResult(vertex,bq);
}
示例8: getQueries
import com.thinkaurelius.titan.graphdb.query.BackendQueryHolder; //导入依赖的package包/类
protected List<BackendQueryHolder<SliceQuery>> getQueries() {
return queries;
}
示例9: getSubQuery
import com.thinkaurelius.titan.graphdb.query.BackendQueryHolder; //导入依赖的package包/类
public BackendQueryHolder<SliceQuery> getSubQuery(int position) {
return queries.get(position);
}
示例10: emptyQuery
import com.thinkaurelius.titan.graphdb.query.BackendQueryHolder; //导入依赖的package包/类
public static final GraphCentricQuery emptyQuery(ElementCategory resultType) {
Condition<TitanElement> cond = new FixedCondition<TitanElement>(false);
return new GraphCentricQuery(resultType, cond, OrderList.NO_ORDER,
new BackendQueryHolder<JointIndexQuery>(new JointIndexQuery(),
true, false), 0);
}
示例11: getSubQuery
import com.thinkaurelius.titan.graphdb.query.BackendQueryHolder; //导入依赖的package包/类
@Override
public BackendQueryHolder<JointIndexQuery> getSubQuery(int position) {
if (position == 0) return indexQuery;
else throw new IndexOutOfBoundsException();
}
示例12: emptyQuery
import com.thinkaurelius.titan.graphdb.query.BackendQueryHolder; //导入依赖的package包/类
public static final GraphCentricQuery emptyQuery(ElementCategory resultType) {
Condition<TitanElement> cond = new FixedCondition<TitanElement>(false);
return new GraphCentricQuery(resultType, cond, OrderList.NO_ORDER,
new BackendQueryHolder<JointIndexQuery>(new JointIndexQuery(),
true, false, null), 0);
}