1 24 package org.riotfamily.website.generic.model.hibernate; 25 26 import javax.servlet.http.HttpServletRequest ; 27 28 import org.hibernate.Query; 29 import org.riotfamily.cachius.TaggingContext; 30 31 35 public class HqlListModelBuilder extends AbstractHqlModelBuilder { 36 37 protected Object getResult(Query query) { 38 return query.list(); 39 } 40 41 protected String generateModelKey(Query query) { 42 return super.generateModelKey(query) + "List"; 43 } 44 45 protected void tagResult(Query query, Object result, 46 HttpServletRequest request) { 47 48 TaggingContext.tag(request, getResultClass(query).getName()); 49 } 50 51 } 52 | Popular Tags |