org.hibernate.hql.ast.tree

Class BinaryLogicOperatorNode

Implemented Interfaces:
BinaryOperatorNode, InitializeableNode, OperatorNode
Known Direct Subclasses:
InLogicOperatorNode

public class BinaryLogicOperatorNode
extends HqlSqlWalkerNode
implements BinaryOperatorNode

Contract for nodes representing binary operators.
Author:
Steve Ebersole

Method Summary

protected Type
extractDataType(Node operand)
Type
getDataType()
Retrieves the data type for the overall operator expression.
Node
getLeftHandOperand()
Retrieves the left-hand operand of the operator.
Node
getRightHandOperand()
Retrieves the right-hand operand of the operator.
void
initialize()
Performs the operator node initialization by seeking out any parameter nodes and setting their expected type, if possible.
protected void
mutateRowValueConstructorSyntaxesIfNecessary(Type lhsType, Type rhsType)

Methods inherited from class org.hibernate.hql.ast.tree.HqlSqlWalkerNode

getASTFactory, getAliasGenerator, getSessionFactoryHelper, getWalker, initialize

Methods inherited from class org.hibernate.hql.ast.tree.SqlNode

getDataType, getOriginalText, setDataType, setText

Methods inherited from class org.hibernate.hql.ast.tree.Node

getColumn, getFilename, getLine, getRenderText, getTextLength, initialize, initialize

Method Details

extractDataType

protected Type extractDataType(Node operand)

getDataType

public Type getDataType()
Retrieves the data type for the overall operator expression.
Specified by:
getDataType in interface OperatorNode
Overrides:
getDataType in interface SqlNode
Returns:
The expression's data type.

getLeftHandOperand

public Node getLeftHandOperand()
Retrieves the left-hand operand of the operator.
Specified by:
getLeftHandOperand in interface BinaryOperatorNode
Returns:
The left-hand operand

getRightHandOperand

public Node getRightHandOperand()
Retrieves the right-hand operand of the operator.
Specified by:
getRightHandOperand in interface BinaryOperatorNode
Returns:
The right-hand operand

initialize

public void initialize()
            throws SemanticException
Performs the operator node initialization by seeking out any parameter nodes and setting their expected type, if possible.
Specified by:
initialize in interface OperatorNode

mutateRowValueConstructorSyntaxesIfNecessary

protected final void mutateRowValueConstructorSyntaxesIfNecessary(Type lhsType,
                                                                  Type rhsType)