FileDocCategorySizeDatePackage
ParameterNode.javaAPI DocHibernate 3.2.51616Tue Jun 27 21:53:40 BST 2006org.hibernate.hql.ast.tree

ParameterNode

public class ParameterNode extends HqlSqlWalkerNode implements ExpectedTypeAwareNode, DisplayableNode
Implementation of ParameterNode.
author
Steve Ebersole

Fields Summary
private org.hibernate.param.ParameterSpecification
parameterSpecification
Constructors Summary
Methods Summary
public java.lang.StringgetDisplayText()

		return "{" + ( parameterSpecification == null ? "???" : parameterSpecification.renderDisplayInfo() ) + "}";
	
public org.hibernate.type.TypegetExpectedType()

		return getHqlParameterSpecification() == null ? null : getHqlParameterSpecification().getExpectedType();
	
public org.hibernate.param.ParameterSpecificationgetHqlParameterSpecification()

		return parameterSpecification;
	
public java.lang.StringgetRenderText(org.hibernate.engine.SessionFactoryImplementor sessionFactory)

		int count = 0;
		if ( getExpectedType() != null && ( count = getExpectedType().getColumnSpan( sessionFactory ) ) > 1 ) {
			StringBuffer buffer = new StringBuffer();
			buffer.append( "(?" );
			for ( int i = 1; i < count; i++ ) {
				buffer.append( ", ?" );
			}
			buffer.append( ")" );
			return buffer.toString();
		}
		else {
			return "?";
		}
	
public voidsetExpectedType(org.hibernate.type.Type expectedType)

		getHqlParameterSpecification().setExpectedType( expectedType );
		setDataType( expectedType );
	
public voidsetHqlParameterSpecification(org.hibernate.param.ParameterSpecification parameterSpecification)

		this.parameterSpecification = parameterSpecification;