Top Description Constructors Methods
org.hibernate.hql.ast.tree

public Class BinaryLogicOperatorNode

extends HqlSqlWalkerNode
implements BinaryOperatorNode
Class Inheritance
All Implemented Interfaces
org.hibernate.hql.ast.tree.BinaryOperatorNode, org.hibernate.hql.ast.tree.OperatorNode
Known Direct Subclasses
org.hibernate.hql.ast.tree.InLogicOperatorNode
Imports
org.hibernate.type.OneToOneType, .Type, org.hibernate.Hibernate, .TypeMismatchException, .HibernateException, org.hibernate.param.ParameterSpecification, org.hibernate.util.StringHelper, org.hibernate.hql.antlr.HqlSqlTokenTypes, org.hibernate.engine.SessionFactoryImplementor, antlr.SemanticException, antlr.collections.AST

Contract for nodes representing binary operators.
Author
Steve Ebersole

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected Type
protected static String[]
extractMutationTexts(Node operand, int count)

private int
public Type
getDataType()

Overrides org.hibernate.hql.ast.tree.SqlNode.getDataType.

Implements org.hibernate.hql.ast.tree.OperatorNode.getDataType.

Retrieves the data type for the overall operator expression.
public Node

Returns:

The left-hand operand
getLeftHandOperand
()

Implements org.hibernate.hql.ast.tree.BinaryOperatorNode.getLeftHandOperand.

Retrieves the left-hand operand of the operator.
public Node

Returns:

The right-hand operand
getRightHandOperand
()

Implements org.hibernate.hql.ast.tree.BinaryOperatorNode.getRightHandOperand.

Retrieves the right-hand operand of the operator.
public void
initialize()

Implements org.hibernate.hql.ast.tree.OperatorNode.initialize.

Performs the operator node initialization by seeking out any parameter nodes and setting their expected type, if possible.
private void
mutateRowValueConstructorSyntax(int
The number of elements in the row value constructor list.
valueElements
)

Mutate the subtree relating to a row-value-constructor to instead use a series of ANDed predicates.

protected final void
protected void
translate(int valueElements, int comparisonType, String comparisonText, String[] lhsElementTexts, String[] rhsElementTexts, ParameterSpecification lhsEmbeddedCompositeParameterSpecification, ParameterSpecification rhsEmbeddedCompositeParameterSpecification, AST container)

Inherited from org.hibernate.hql.ast.tree.HqlSqlWalkerNode:
getAliasGeneratorgetASTFactorygetSessionFactoryHelpergetWalkerinitialize

Constructor Detail

BinaryLogicOperatorNodeback to summary
public BinaryLogicOperatorNode()

Method Detail

extractDataTypeback to summary
protected Type extractDataType(Node operand)
extractMutationTextsback to summary
protected static String[] extractMutationTexts(Node operand, int count)
getColumnSpanback to summary
private int getColumnSpan(Type type, SessionFactoryImplementor sfi)
getDataTypeback to summary
public Type getDataType()

Overrides org.hibernate.hql.ast.tree.SqlNode.getDataType.

Implements org.hibernate.hql.ast.tree.OperatorNode.getDataType.

Doc from org.hibernate.hql.ast.tree.OperatorNode.getDataType.

Retrieves the data type for the overall operator expression.

Returns:Type

The expression's data type.

getLeftHandOperandback to summary
public Node getLeftHandOperand()

Implements org.hibernate.hql.ast.tree.BinaryOperatorNode.getLeftHandOperand.

Retrieves the left-hand operand of the operator.

Returns:Node

The left-hand operand

getRightHandOperandback to summary
public Node getRightHandOperand()

Implements org.hibernate.hql.ast.tree.BinaryOperatorNode.getRightHandOperand.

Retrieves the right-hand operand of the operator.

Returns:Node

The right-hand operand

initializeback to summary
public void initialize() throws SemanticException

Implements org.hibernate.hql.ast.tree.OperatorNode.initialize.

Performs the operator node initialization by seeking out any parameter nodes and setting their expected type, if possible.

mutateRowValueConstructorSyntaxback to summary
private void mutateRowValueConstructorSyntax(int valueElements)

Mutate the subtree relating to a row-value-constructor to instead use a series of ANDed predicates. This allows multi-column type comparisons and explicit row-value-constructor syntax even on databases which do not support row-value-constructor.

For example, here we'd mutate "... where (col1, col2) = ('val1', 'val2) ..." to "... where col1 = 'val1' and col2 = 'val2' ..."

Parameters
valueElements:int

The number of elements in the row value constructor list.

mutateRowValueConstructorSyntaxesIfNecessaryback to summary
protected final void mutateRowValueConstructorSyntaxesIfNecessary(Type lhsType, Type rhsType)
translateback to summary
protected void translate(int valueElements, int comparisonType, String comparisonText, String[] lhsElementTexts, String[] rhsElementTexts, ParameterSpecification lhsEmbeddedCompositeParameterSpecification, ParameterSpecification rhsEmbeddedCompositeParameterSpecification, AST container)