org.hibernate.hql.internal.ast.tree.Node Java Examples

The following examples show how to use org.hibernate.hql.internal.ast.tree.Node. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SqlGenerator.java    From lams with GNU General Public License v2.0 6 votes vote down vote up
@Override
protected void out(AST n) {
	if ( n instanceof Node ) {
		out( ( (Node) n ).getRenderText( sessionFactory ) );
	}
	else {
		super.out( n );
	}

	if ( n instanceof ParameterNode ) {
		collectedParameters.add( ( (ParameterNode) n ).getHqlParameterSpecification() );
	}
	else if ( n instanceof ParameterContainer ) {
		if ( ( (ParameterContainer) n ).hasEmbeddedParameters() ) {
			ParameterSpecification[] specifications = ( (ParameterContainer) n ).getEmbeddedParameters();
			if ( specifications != null ) {
				collectedParameters.addAll( Arrays.asList( specifications ) );
			}
		}
	}
}
 
Example #2
Source File: SyntheticAndFactory.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
private Node create(int tokenType, String text) {
	return (Node) hqlSqlWalker.getASTFactory().create( tokenType, text );
}
 
Example #3
Source File: HqlASTFactory.java    From lams with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns the class for a given token type (a.k.a. AST node type).
 *
 * @param tokenType The token type.
 * @return Class - The AST node class to instantiate.
 */
public Class getASTNodeType(int tokenType) {
	return Node.class;
}