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

BooleanLiteralNode

public class BooleanLiteralNode extends LiteralNode implements ExpectedTypeAwareNode
Represents a boolean literal within a query.
author
Steve Ebersole

Fields Summary
private org.hibernate.type.Type
expectedType
Constructors Summary
Methods Summary
public org.hibernate.type.TypegetDataType()

		return expectedType == null ? Hibernate.BOOLEAN : expectedType;
	
public org.hibernate.type.TypegetExpectedType()

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

		try {
			return getTypeInternal().objectToSQLString( getValue(), sessionFactory.getDialect() );
		}
		catch( Throwable t ) {
			throw new QueryException( "Unable to render boolean literal value", t );
		}
	
public org.hibernate.type.BooleanTypegetTypeInternal()

		return ( BooleanType ) getDataType();
	
public java.lang.BooleangetValue()

		return getType() == TRUE ? Boolean.TRUE : Boolean.FALSE;
	
public voidsetExpectedType(org.hibernate.type.Type expectedType)
Expected-types really only pertinent here for boolean literals...

param
expectedType

		this.expectedType = expectedType;