List of usage examples for org.hibernate.hql.internal.ast.util ASTUtil findTypeInChildren
public static AST findTypeInChildren(AST parent, int type)
From source file:org.babyfish.hibernate.hql.SqlASTHelper.java
License:Open Source License
public static boolean findJoinReferenceInWhereCaluse(QueryNode queryNode, Set<FromElement> joins) { if (joins.isEmpty()) { return false; }/* w w w . ja v a2 s . c o m*/ AST whereAST = ASTUtil.findTypeInChildren(queryNode, WHERE); if (whereAST == null) { return false; } return findJoinReferenceImpl(whereAST, joins); }
From source file:org.babyfish.hibernate.hql.SqlASTHelper.java
License:Open Source License
public static void removeFromElementsExcept(QueryNode queryNode, Set<FromElement> usedFromElements) { AST whereAst = ASTUtil.findTypeInChildren(queryNode, WHERE); if (whereAst != null) { updateUsedFromElements(whereAst, usedFromElements); }/*from ww w . j av a 2 s . c o m*/ removeFromElementsExceptImpl(queryNode.getFromClause(), usedFromElements); }