@Override
public void execute(ReadGraphImpl graph, int i) throws DatabaseException {
+ if(done) return;
done = true;
RelationInfo result = new RelationInfo(r, isFunctional, isFinal, true);
if(entry != null) entry.setResult(result);
@Override
public void finished(ReadGraphImpl graph) throws DatabaseException {
- if(!done) {
- done = true;
- RelationInfo result = new RelationInfo(r, isFunctional, isFinal, false);
- if(entry != null) entry.setResult(result);
- proc.execute(graph, result);
- }
+ if(done) return;
+ done = true;
+ RelationInfo result = new RelationInfo(r, isFunctional, isFinal, false);
+ if(entry != null) entry.setResult(result);
+ proc.execute(graph, result);
}
@Override
public void exception(ReadGraphImpl graph, Throwable throwable) throws DatabaseException {
- if(!done) {
- done = true;
- DatabaseException e = new DatabaseException("Internal error in RelationInfoQuery");
- if(entry != null) entry.except(e);
- proc.exception(graph, e);
- }
+ if(done) return;
+ done = true;
+ DatabaseException e = new DatabaseException("Internal error in RelationInfoQuery");
+ if(entry != null) entry.except(e);
+ proc.exception(graph, e);
}
});
final int superRelationOf = provider.getSuperrelationOf();
assert(superRelationOf != 0);
- IntSet direct = QueryCache.resultDirectPredicates(graph, r, entry, null, QueryCache.emptyProcedureDirectPredicates);
- IntSet types = QueryCache.resultTypes(graph, r, entry, null, QueryCache.emptyProcedureTypes);
+ IntSet direct = QueryCache.resultDirectPredicates(graph, r, entry, null);
+ IntSet types = QueryCache.resultTypes(graph, r, entry, null);
computeAssertions(graph, r, !direct.contains(superRelationOf), types.contains(graph.processor.getFunctionalRelation()), entry, procedure);
}
- @Override
+ //@Override
public Object compute(ReadGraphImpl graph, final InternalProcedure<RelationInfo> procedure) throws DatabaseException {
computeForEach(graph, id, this, procedure);
return getResult();