public FilterQueryPlan getFilterQueryPlan(String filterString,
String collectionRole,
boolean shallow,
Map enabledFilters) throws QueryException, MappingException {
FilterQueryPlanKey key = new FilterQueryPlanKey( filterString, collectionRole, shallow, enabledFilters );
FilterQueryPlan plan = ( FilterQueryPlan ) planCache.get ( key );
if ( plan == null ) {
if ( log.isTraceEnabled() ) {
log.trace( "unable to locate collection-filter query plan in cache; generating (" + collectionRole + " : " + filterString + ")" );
}
plan = new FilterQueryPlan( filterString, collectionRole, shallow, enabledFilters, factory );
}
else {
if ( log.isTraceEnabled() ) {
log.trace( "located collection-filter query plan in cache (" + collectionRole + " : " + filterString + ")" );
}
}
planCache.put( key, plan );
return plan;
}
|