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, "}");