1 package org.hibernate.criterion; 3 4 import org.hibernate.Criteria; 5 import org.hibernate.Hibernate; 6 import org.hibernate.HibernateException; 7 import org.hibernate.type.Type; 8 9 12 public class AvgProjection extends AggregateProjection { 13 14 public AvgProjection(String propertyName) { 15 super("avg", propertyName); 16 } 17 18 public Type[] getTypes(Criteria criteria, CriteriaQuery criteriaQuery) 19 throws HibernateException { 20 return new Type[] { Hibernate.DOUBLE }; 21 } 22 } 23 | Popular Tags |