1 package org.hibernate.hql.classic; 3 4 import org.hibernate.QueryException; 5 import org.hibernate.util.StringHelper; 6 7 10 public class GroupByParser implements Parser { 11 12 14 17 19 22 private final PathExpressionParser pathExpressionParser; 23 24 { 25 pathExpressionParser = new PathExpressionParser(); 26 pathExpressionParser.setUseThetaStyleJoin( true ); } 28 29 public void token(String token, QueryTranslatorImpl q) throws QueryException { 30 31 if ( q.isName( StringHelper.root( token ) ) ) { 32 ParserHelper.parse( pathExpressionParser, q.unalias( token ), ParserHelper.PATH_SEPARATORS, q ); 33 q.appendGroupByToken( pathExpressionParser.getWhereColumn() ); 34 pathExpressionParser.addAssociation( q ); 35 } 36 else { 37 q.appendGroupByToken( token ); 38 } 39 } 40 41 public void start(QueryTranslatorImpl q) throws QueryException { 42 } 43 44 public void end(QueryTranslatorImpl q) throws QueryException { 45 } 46 47 48 } 49 50 51 52 53 54 | Popular Tags |