public IQueryExpressionPlan GetHQLQueryPlan(IQueryExpression queryExpression, bool shallow, IDictionary<string, IFilter> enabledFilters) { string expressionStr = queryExpression.Key; var key = new HQLQueryPlanKey(expressionStr, shallow, enabledFilters); var plan = (IQueryExpressionPlan)planCache[key]; if (plan == null) { if (log.IsDebugEnabled) { log.Debug("unable to locate HQL query plan in cache; generating (" + expressionStr + ")"); } plan = new HQLExpressionQueryPlan(expressionStr, queryExpression, shallow, enabledFilters, factory); planCache.Put(key, plan); } else { if (log.IsDebugEnabled) { log.Debug("located HQL query plan in cache (" + expressionStr + ")"); } } return plan; }
public IQueryExpressionPlan GetHQLQueryPlan(IQueryExpression queryExpression, bool shallow, IDictionary <string, IFilter> enabledFilters) { string expressionStr = queryExpression.Key; var key = new HQLQueryPlanKey(expressionStr, shallow, enabledFilters); var plan = (IQueryExpressionPlan)planCache[key]; if (plan == null) { if (log.IsDebugEnabled) { log.Debug("unable to locate HQL query plan in cache; generating (" + expressionStr + ")"); } plan = new HQLExpressionQueryPlan(expressionStr, queryExpression, shallow, enabledFilters, factory); planCache.Put(key, plan); } else { if (log.IsDebugEnabled) { log.Debug("located HQL query plan in cache (" + expressionStr + ")"); } } return(plan); }