~ubuntu-branches/ubuntu/wily/libhibernate3-java/wily-proposed

« back to all changes in this revision

Viewing changes to src/org/hibernate/hql/ast/tree/AggregateNode.java

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2007-10-14 14:43:34 UTC
  • Revision ID: james.westby@ubuntu.com-20071014144334-eamc8i0q10gs1aro
Tags: upstream-3.2.5
ImportĀ upstreamĀ versionĀ 3.2.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// $Id: AggregateNode.java 7460 2005-07-12 20:27:29Z steveebersole $
 
2
package org.hibernate.hql.ast.tree;
 
3
 
 
4
import org.hibernate.hql.ast.util.ColumnHelper;
 
5
import org.hibernate.type.Type;
 
6
 
 
7
import antlr.SemanticException;
 
8
 
 
9
/**
 
10
 * Represents an aggregate function i.e. min, max, sum, avg.
 
11
 *
 
12
 * @author josh Sep 21, 2004 9:22:02 PM
 
13
 */
 
14
public class AggregateNode extends AbstractSelectExpression implements SelectExpression {
 
15
 
 
16
        public AggregateNode() {
 
17
        }
 
18
 
 
19
        public Type getDataType() {
 
20
                // Get the function return value type, based on the type of the first argument.
 
21
                return getSessionFactoryHelper().findFunctionReturnType( getText(), getFirstChild() );
 
22
        }
 
23
 
 
24
        public void setScalarColumnText(int i) throws SemanticException {
 
25
                ColumnHelper.generateSingleScalarColumn( this, i );
 
26
        }
 
27
}