code: protected void prepareCriteria(Criteria criteria) {
  		if (isCacheQueries()) {
  			criteria.setCacheable(true);
  			if (getQueryCacheRegion() != null) {
  				criteria.setCacheRegion(getQueryCacheRegion());
  			}
  		}
  		if (getFetchSize() > 0) {
  			criteria.setFetchSize(getFetchSize());
  		}
  		if (getMaxResults() > 0) {
  			criteria.setMaxResults(getMaxResults());
  		}
  	}
docs: Prepare the given Criteria object, applying cache settings and/or a
  transaction timeout.
  
  @param criteria
  the Criteria object to prepare
  @see #setCacheQueries
  @see #setQueryCacheRegion
  @see SessionProviderHolder#applyTransactionTimeout