KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > hql > classic > SelectPathExpressionParser


1 //$Id: SelectPathExpressionParser.java,v 1.2 2005/02/22 14:07:36 oneovthafew Exp $
2
package org.hibernate.hql.classic;
3
4 import org.hibernate.QueryException;
5
6 public class SelectPathExpressionParser extends PathExpressionParser {
7
8     public void end(QueryTranslatorImpl q) throws QueryException {
9         if ( getCurrentProperty() != null && !q.isShallowQuery() ) {
10             // "finish off" the join
11
token( ".", q );
12             token( null, q );
13         }
14         super.end( q );
15     }
16
17     protected void setExpectingCollectionIndex() throws QueryException {
18         throw new QueryException( "illegal syntax near collection-valued path expression in select: " + getCollectionName() );
19     }
20
21     public String JavaDoc getSelectName() {
22         return getCurrentName();
23     }
24 }
25
26
27
28
29
30
31
32
Popular Tags