* in Industry THTH ry.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* in Industry THTH ry.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.impl.DebugPolicy;
import org.simantics.db.impl.graph.ReadGraphImpl;
import org.simantics.db.impl.procedure.InternalProcedure;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.impl.DebugPolicy;
import org.simantics.db.impl.graph.ReadGraphImpl;
import org.simantics.db.impl.procedure.InternalProcedure;
// Default level is something that is not quite a prospect but still allows for ordering within CacheCollectionResult
public static final short UNDEFINED_LEVEL = 5;
// Default level is something that is not quite a prospect but still allows for ordering within CacheCollectionResult
public static final short UNDEFINED_LEVEL = 5;
- static private Object NO_RESULT = new Object();
- static protected Object INVALID_RESULT = new Object();
+ static Object NO_RESULT = new Object() { public String toString() { return "NO_RESULT"; }};
+ static protected Object INVALID_RESULT = new Object() { public String toString() { return "INVALID_RESULT"; }};
// Result is computed - no exception
static protected Object READY = new Object() { public String toString() { return "READY"; }};
// Computation is under way
// Result is computed - no exception
static protected Object READY = new Object() { public String toString() { return "READY"; }};
// Computation is under way
// Entry is discarded and is waiting for garbage collect
static protected Object DISCARDED = new Object() { public String toString() { return "DISCARDED"; }};
// The result has been invalidated
// Entry is discarded and is waiting for garbage collect
static protected Object DISCARDED = new Object() { public String toString() { return "DISCARDED"; }};
// The result has been invalidated
// The computation has excepted - the exception is in the result
static protected Object EXCEPTED = new Object() { public String toString() { return "EXCEPTED"; }};
// This indicates the status of the entry
// The computation has excepted - the exception is in the result
static protected Object EXCEPTED = new Object() { public String toString() { return "EXCEPTED"; }};
// This indicates the status of the entry
@Override
final public void refute() {
if(DebugPolicy.QUERY_STATE) System.out.println("[QUERY STATE]: refuted " + this);
@Override
final public void refute() {
if(DebugPolicy.QUERY_STATE) System.out.println("[QUERY STATE]: refuted " + this);
if(DebugPolicy.QUERY_STATE) System.out.println("[QUERY STATE]: excepted " + this);
if(statusOrException != DISCARDED) {
statusOrException = EXCEPTED;
if(DebugPolicy.QUERY_STATE) System.out.println("[QUERY STATE]: excepted " + this);
if(statusOrException != DISCARDED) {
statusOrException = EXCEPTED;
if(p1 != null) result.add(p1);
if(p2OrParents != null) {
if(p2OrParents instanceof QueryIdentityHashSet) {
if(p1 != null) result.add(p1);
if(p2OrParents != null) {
if(p2OrParents instanceof QueryIdentityHashSet) {