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

public Class InLogicOperatorNode

extends BinaryLogicOperatorNode
implements BinaryOperatorNode
Class Inheritance
All Implemented Interfaces
org.hibernate.hql.internal.ast.tree.BinaryOperatorNode, org.hibernate.hql.internal.ast.tree.OperatorNode
Imports
java.util.ArrayList, .List, org.hibernate.engine.spi.SessionFactoryImplementor, org.hibernate.hql.internal.antlr.HqlSqlTokenTypes, .HqlTokenTypes, org.hibernate.param.ParameterSpecification, org.hibernate.type.Type, antlr.SemanticException, antlr.collections.AST

Author
Steve Ebersole

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Node
public void
initialize()

Overrides org.hibernate.hql.internal.ast.tree.BinaryLogicOperatorNode.initialize.

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

Called by the tree walker during hql-sql semantic analysis after the operator sub-tree is completely built.
private boolean
isNodeAcceptable(Node rhsNode)

this is possible for parameter lists and explicit lists.

private void
mutateRowValueConstructorSyntaxInInListSyntax(int
The number of elements in the row value constructor list.
lhsColumnSpan
,
int rhsColumnSpan)

Mutate the subtree relating to a row-value-constructor in "in" list to instead use a series of ORen and ANDed predicates.

Inherited from org.hibernate.hql.internal.ast.tree.BinaryLogicOperatorNode:
extractDataTypeextractMutationTextsgetDataTypegetLeftHandOperandgetRightHandOperandmutateRowValueConstructorSyntaxesIfNecessarysetScalarColumnTexttranslate

Constructor Detail

InLogicOperatorNodeback to summary
public InLogicOperatorNode()

Method Detail

getInListback to summary
public Node getInList()
initializeback to summary
public void initialize() throws SemanticException

Overrides org.hibernate.hql.internal.ast.tree.BinaryLogicOperatorNode.initialize.

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

Doc from org.hibernate.hql.internal.ast.tree.OperatorNode.initialize.

Called by the tree walker during hql-sql semantic analysis after the operator sub-tree is completely built.

Annotations
@Override
isNodeAcceptableback to summary
private boolean isNodeAcceptable(Node rhsNode)

this is possible for parameter lists and explicit lists. It is completely unreasonable for sub-queries.

mutateRowValueConstructorSyntaxInInListSyntaxback to summary
private void mutateRowValueConstructorSyntaxInInListSyntax(int lhsColumnSpan, int rhsColumnSpan)

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

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

Parameters
lhsColumnSpan:int

The number of elements in the row value constructor list.