private QueryKey buildBasicKey(CacheableResultTransformer resultTransformer) { return new QueryKey( QUERY_STRING, ArrayHelper.EMPTY_TYPE_ARRAY, // positional param types ArrayHelper.EMPTY_OBJECT_ARRAY, // positional param values Collections.EMPTY_MAP, // named params null, // firstRow selection null, // maxRows selection Collections.EMPTY_SET, // filter keys null, // tenantIdentifier resultTransformer // the result transformer ); }
return new QueryKey( queryString, types,
public static QueryKey from( String sqlQueryString, Limit limit, QueryParameterBindings parameterBindings, SharedSessionContractImplementor persistenceContext) { // todo (6.0) : here is where we should centralize cacheable-or-not // if this method returns null, the query should be considered un-cacheable // // todo (6.0) : should limited (first/max) results be cacheable? // todo (6.0) : should filtered results be cacheable? final Limit limitToUse = limit == null ? Limit.NONE : limit; return new QueryKey( sqlQueryString, parameterBindings.generateQueryKeyMemento(), limitToUse.getFirstRow(), limitToUse.getMaxRows(), persistenceContext.getTenantIdentifier(), persistenceContext.getLoadQueryInfluencers().getEnabledFilterNames() ); }
return new QueryKey( queryString, types,
return new QueryKey( queryString, types,