if (shouldCacheQueryResults()) { if (this.containerPolicy.overridesRead()) { throw QueryException.cannotCacheCursorResultsOnQuery(this);
if (shouldCacheQueryResults()) { if (this.containerPolicy.overridesRead()) { throw QueryException.cannotCacheCursorResultsOnQuery(this);
/** * INTERNAL: * Execute the query. If there are cached results return those. * This must override the super to support result caching. * * @param aSession - the session in which the receiver will be executed. * @return An object or vector, the result of executing the query. * @exception DatabaseException - an error has occurred on the database */ public Object execute(AbstractSession session, AbstractRecord row) throws DatabaseException { if (shouldCacheQueryResults()) { if (getContainerPolicy().overridesRead()) { throw QueryException.cannotCacheCursorResultsOnQuery(this); } if (isPrepared()) {// only prepared queries can have cached results. Object results = getQueryResults(session, row, true); // Bug6138532 - if results are "cached no results", return null immediately if (results == InvalidObject.instance) { return null; } if (results != null) { return results; } } } return super.execute(session, row); }
if (shouldCacheQueryResults()) { if (getContainerPolicy().overridesRead()) { throw QueryException.cannotCacheCursorResultsOnQuery(this);
if (shouldCacheQueryResults()) { if (getContainerPolicy().overridesRead()) { throw QueryException.cannotCacheCursorResultsOnQuery(this);
if (shouldCacheQueryResults()) { if (getContainerPolicy().overridesRead()) { throw QueryException.cannotCacheCursorResultsOnQuery(this);