📄 frompathexpressionparser.java
字号:
//$Id: FromPathExpressionParser.java,v 1.1.2.2 2003/08/04 01:42:11 oneovthafew Exp $
package net.sf.hibernate.hql;
import net.sf.hibernate.QueryException;
import net.sf.hibernate.collection.CollectionPropertyMapping;
import net.sf.hibernate.type.Type;
public class FromPathExpressionParser extends PathExpressionParser {
public void end(QueryTranslator q) throws QueryException {
if ( !isCollectionValued() ) {
Type type = getPropertyType();
if ( type.isEntityType() ) {
// "finish off" the join
token(".", q);
token(null, q);
}
else if ( type.isPersistentCollectionType() ) {
// default to element set if no elements() specified
token(".", q);
token(CollectionPropertyMapping.COLLECTION_ELEMENTS, q);
}
}
super.end(q);
}
protected void setExpectingCollectionIndex() throws QueryException {
throw new QueryException("expecting .elements or .indices after collection path expression in from");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -