/** * INTERNAL: * This is different from 'prepareForExecution' in that this is called on the original query, * and the other is called on the copy of the query. * This query is copied for concurrency so this prepare can only setup things that * will apply to any future execution of this query. * * Clear the query cache when a query is prepared. */ protected void prepare() throws QueryException { super.prepare(); if (shouldCacheQueryResults()){ clearQueryResults(getSession()); } }
/** * INTERNAL: * This is different from 'prepareForExecution' in that this is called on the original query, * and the other is called on the copy of the query. * This query is copied for concurrency so this prepare can only setup things that * will apply to any future execution of this query. * * Clear the query cache when a query is prepared. */ protected void prepare() throws QueryException { super.prepare(); if (shouldCacheQueryResults()) { clearQueryResults(getSession()); if (getReferenceClass() != null) { getQueryResultsCachePolicy().getInvalidationClasses().add(getReferenceClass()); } } }
/** * INTERNAL: * This is different from 'prepareForExecution' in that this is called on the original query, * and the other is called on the copy of the query. * This query is copied for concurrency so this prepare can only setup things that * will apply to any future execution of this query. * * Clear the query cache when a query is prepared. */ protected void prepare() throws QueryException { super.prepare(); if (shouldCacheQueryResults()) { clearQueryResults(getSession()); if (getReferenceClass() != null) { getQueryResultsCachePolicy().getInvalidationClasses().add(getReferenceClass()); } } }