/** * Constructs an ObjectStoreInterMineImpl, with a schema. * * @param db the database in which the model resides * @param schema the schema * @throws NullPointerException if db or model are null * @throws IllegalArgumentException if db or model are invalid */ protected ObjectStoreInterMineImpl(Database db, DatabaseSchema schema) { super(schema.getModel()); this.db = db; this.schema = schema; ShutdownHook.registerObject(new WeakReference<Object>(this)); limitedContext = new QueryOptimiserContext(); limitedContext.setTimeLimit(getMaxTime() / 10); maxQueryParseTime = getMaxQueryParseTime(); if (maxQueryParseTime != null) { limitedContext.setMaxQueryParseTime(maxQueryParseTime); } description = "ObjectStoreInterMineImpl(" + db + ")"; }
/** * Constructs an ObjectStoreInterMineImpl, with a schema. * * @param db the database in which the model resides * @param schema the schema * @throws NullPointerException if db or model are null * @throws IllegalArgumentException if db or model are invalid */ protected ObjectStoreInterMineImpl(Database db, DatabaseSchema schema) { super(schema.getModel()); this.db = db; this.schema = schema; ShutdownHook.registerObject(new WeakReference<Object>(this)); limitedContext = new QueryOptimiserContext(); limitedContext.setTimeLimit(getMaxTime() / 10); maxQueryParseTime = getMaxQueryParseTime(); if (maxQueryParseTime != null) { limitedContext.setMaxQueryParseTime(maxQueryParseTime); } description = "ObjectStoreInterMineImpl(" + db + ")"; }
if (explainResult.getTime() > getMaxTime()) { throw (new ObjectStoreQueryDurationException("Estimated time to run query(" + explainResult.getTime() + ") greater than permitted maximum (" + getMaxTime() + "): IQL query: " + q + ", SQL query: " + sql));
if (explainResult.getTime() > getMaxTime()) { throw (new ObjectStoreQueryDurationException("Estimated time to run query(" + explainResult.getTime() + ") greater than permitted maximum (" + getMaxTime() + "): IQL query: " + q + ", SQL query: " + sql));