From: Erik B. <ebe...@us...> - 2007-04-29 16:20:46
|
Update of /cvsroot/jpox/JPOX/Core/src/java/org/jpox/store/query In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv9932/src/java/org/jpox/store/query Modified Files: JPQLSingleStringParser.java Log Message: correct having parser for JPQL Index: JPQLSingleStringParser.java =================================================================== RCS file: /cvsroot/jpox/JPOX/Core/src/java/org/jpox/store/query/JPQLSingleStringParser.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** JPQLSingleStringParser.java 4 Apr 2007 07:30:17 -0000 1.4 --- JPQLSingleStringParser.java 29 Apr 2007 16:20:42 -0000 1.5 *************** *** 100,107 **** { Parser tokenizer; ! ! // Temporary variable since grouping clause is made up of GROUP BY ... HAVING ... ! String groupingClause; ! Compiler(Parser tokenizer) { --- 100,104 ---- { Parser tokenizer; ! Compiler(Parser tokenizer) { *************** *** 152,160 **** compileHaving(); } - if (groupingClause != null) - { - query.setGrouping(groupingClause); - } - if (tokenizer.parseKeywordIgnoreCase("ORDER BY")) { --- 149,152 ---- *************** *** 202,206 **** throw new JPOXUserException(LOCALISER.msg("JPQL.SingleString.KeywordWithoutValue", "GROUP BY", "<grouping>")); } ! groupingClause = content; } --- 194,198 ---- throw new JPOXUserException(LOCALISER.msg("JPQL.SingleString.KeywordWithoutValue", "GROUP BY", "<grouping>")); } ! query.setGrouping(content); } *************** *** 213,224 **** throw new JPOXUserException(LOCALISER.msg("JPQL.SingleString.KeywordWithoutValue", "HAVING", "<having>")); } ! if (groupingClause != null) ! { ! groupingClause = groupingClause.trim() + content; ! } ! else ! { ! groupingClause = content; ! } } --- 205,209 ---- throw new JPOXUserException(LOCALISER.msg("JPQL.SingleString.KeywordWithoutValue", "HAVING", "<having>")); } ! query.setHaving(content); } |