1 package org.simantics.db.impl;
3 import org.simantics.db.AsyncReadGraph;
4 import org.simantics.db.RelationInfo;
5 import org.simantics.db.procedure.AsyncContextProcedure;
7 public final class ForPossibleRelatedValueContextProcedure<C, T> implements AsyncContextProcedure<C, T> {
9 public final int predicateKey;
10 public final int[] clusterKey;
11 public final int[] predicateReference;
12 public final RelationInfo info;
13 public final ClusterI.CompleteTypeEnum completeType;
14 private final AsyncContextProcedure<C, T> user;
16 public ForPossibleRelatedValueContextProcedure(int predicateKey, RelationInfo info, AsyncContextProcedure<C, T> user) {
17 this.predicateKey = predicateKey;
18 this.completeType = ClusterTraitsBase.getCompleteTypeFromResourceKey(predicateKey);
21 this.clusterKey = new int[32*8];
22 this.predicateReference = new int[32*8];
26 public void execute(AsyncReadGraph graph, C context, T result) {
27 user.execute(graph, context, result);
31 public void exception(AsyncReadGraph graph, Throwable throwable) {
32 user.exception(graph, throwable);