int indent = 4;
-
-
String[] signatureR1RelationInfo = { "int r", "r", "keyR", "long", "InternalProcedure<RelationInfo>", "entry.id" };
String[] signatureR1Bytes = { "int r", "r", "keyR", "long", "InternalProcedure<byte[]>", "entry.id" };
String[] signatureR1IntSet = { "int r", "r", "keyR", "long", "InternalProcedure<IntSet>", "entry.id" };
line(content, " return;");
line(content, " }");
}
- line(content, " " + clazz + " entry = (" + clazz + ")cache.getOrCreate" + clazz + "(graph, " + signature[1] + (genAsync ? ", isSync" : "") + ");");
+ line(content, " " + clazz + " entry = (" + clazz + ")cache.getOrCreate" + clazz + "(graph.processor, " + signature[1] + (genAsync ? ", isSync" : "") + ");");
if(genAsync) {
line(content, " if(entry == null) {");
line(content, " graph.processor.schedule(new SessionTask(false) {");
String lower = Character.toLowerCase(clazz.charAt(0)) + clazz.substring(1);
- line(content, "" + clazz + " getOrCreate" + clazz + "(ReadGraphImpl graph, " + signature[0] + (genAsync ? ", boolean isSync" : "") + ") throws DatabaseException {");
+ line(content, "" + clazz + " getOrCreate" + clazz + "(QueryProcessor processor, " + signature[0] + (genAsync ? ", boolean isSync" : "") + ") throws DatabaseException {");
line(content, " " + clazz + " existing = null;");
line(content, " synchronized(" + lower + "Map) {");
line(content, " existing = (" + clazz + ")" + lower + "Map.get(" + signature[1] + ");");
line(content, " }");
if(genAsync) {
line(content, " if(existing.isPending()) {");
- line(content, " if(isSync) waitPending(graph, existing);");
+ line(content, " if(isSync) waitPending(processor, existing);");
line(content, " else return null;");
line(content, " }");
} else {
- line(content, " if(existing.isPending()) waitPending(graph, existing);");
+ line(content, " if(existing.isPending()) waitPending(processor, existing);");
}
line(content, " return existing;");
line(content, "}");
generateQuery(content, "ReadEntry", signatureRead, true, true);
generateQuery(content, "AsyncReadEntry", signatureAsyncRead, true, true);
generateQuery(content, "Types", signatureR1IntSet, true, false);
- //generateQuery(content, "NamespaceIndex", signatureID2, true);
generateQuery(content, "ChildMap", signatureChildMap, true, false);
+ generateQuery(content, "TypeHierarchy", signatureR1IntSet, true, false);
+ generateQuery(content, "SuperTypes", signatureR1IntSet, true, false);
+ generateQuery(content, "SuperRelations", signatureR1IntSet, true, false);
- generateQuery(content, "AssertedStatements", signatureR2TIP, false, false);
generateQuery(content, "AssertedPredicates", signatureR1IP, false, false);
+ generateQuery(content, "AssertedStatements", signatureR2TIP, false, false);
generateQuery(content, "DirectSuperRelations", signatureR1IP, false, false);
- generateQuery(content, "SuperTypes", signatureR1IntSet, false, false);
- generateQuery(content, "TypeHierarchy", signatureR1IntSet, false, false);
- generateQuery(content, "SuperRelations", signatureR1IntSet, false, false);
generateQuery(content, "MultiReadEntry", signatureMultiRead, false, false);
generateQuery(content, "AsyncMultiReadEntry", signatureAsyncMultiRead, false, false);
generateQuery(content, "ExternalReadEntry", signatureExternalRead, false, false);