KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > criterion > AvgProjection


1 //$Id: AvgProjection.java,v 1.4 2005/02/12 04:32:35 oneovthafew Exp $
2
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 /**
10  * @author Gavin King
11  */

12 public class AvgProjection extends AggregateProjection {
13
14     public AvgProjection(String JavaDoc 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