FileDocCategorySizeDatePackage
GroupByParser.javaAPI DocHibernate 3.2.51452Tue Dec 07 17:24:14 GMT 2004org.hibernate.hql.classic

GroupByParser

public class GroupByParser extends Object implements Parser
Parses the GROUP BY clause of an aggregate query

Fields Summary
private final PathExpressionParser
pathExpressionParser
Constructors Summary
Methods Summary
public voidend(QueryTranslatorImpl q)

	
public voidstart(QueryTranslatorImpl q)

	
public voidtoken(java.lang.String token, QueryTranslatorImpl q)

		pathExpressionParser = new PathExpressionParser();
		pathExpressionParser.setUseThetaStyleJoin( true ); //TODO: would be nice to use false, but issues with MS SQL
	

		if ( q.isName( StringHelper.root( token ) ) ) {
			ParserHelper.parse( pathExpressionParser, q.unalias( token ), ParserHelper.PATH_SEPARATORS, q );
			q.appendGroupByToken( pathExpressionParser.getWhereColumn() );
			pathExpressionParser.addAssociation( q );
		}
		else {
			q.appendGroupByToken( token );
		}