Class BinaryArithmeticExpression
- java.lang.Object
-
- org.hibernate.sql.ast.tree.expression.BinaryArithmeticExpression
-
- All Implemented Interfaces:
DomainResultProducer,SqlSelectionProducer,Expression,SqlAstNode
public class BinaryArithmeticExpression extends Object implements Expression, DomainResultProducer
-
-
Constructor Summary
Constructors Constructor Description BinaryArithmeticExpression(Expression lhsOperand, BinaryArithmeticOperator operator, Expression rhsOperand, BasicValuedMapping resultType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(SqlAstWalker walker)voidapplySqlSelections(DomainResultCreationState creationState)Used when this producer is a selection in a sub-query.DomainResultcreateDomainResult(String resultVariable, DomainResultCreationState creationState)Produce the domain queryBasicValuedMappinggetExpressionType()The type for this expressionExpressiongetLeftHandOperand()Get the left-hand operand.BinaryArithmeticOperatorgetOperator()Get the operationExpressiongetRightHandOperand()Get the right-hand operand.SqlSelectionresolveSqlSelection(DomainResultCreationState creationState)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.sql.ast.tree.expression.Expression
createDomainResultSqlSelection, createSqlSelection, getColumnReference
-
-
-
-
Constructor Detail
-
BinaryArithmeticExpression
public BinaryArithmeticExpression(Expression lhsOperand, BinaryArithmeticOperator operator, Expression rhsOperand, BasicValuedMapping resultType)
-
-
Method Detail
-
getExpressionType
public BasicValuedMapping getExpressionType()
Description copied from interface:ExpressionThe type for this expression- Specified by:
getExpressionTypein interfaceExpression
-
accept
public void accept(SqlAstWalker walker)
- Specified by:
acceptin interfaceSqlAstNode
-
createDomainResult
public DomainResult createDomainResult(String resultVariable, DomainResultCreationState creationState)
Description copied from interface:DomainResultProducerProduce the domain query- Specified by:
createDomainResultin interfaceDomainResultProducer
-
applySqlSelections
public void applySqlSelections(DomainResultCreationState creationState)
Description copied from interface:DomainResultProducerUsed when this producer is a selection in a sub-query. The DomainResult is only needed for root query of a SELECT statement. This default impl assumes this producer is a true (Sql)Expression- Specified by:
applySqlSelectionsin interfaceDomainResultProducer
-
resolveSqlSelection
public SqlSelection resolveSqlSelection(DomainResultCreationState creationState)
-
getLeftHandOperand
public Expression getLeftHandOperand()
Get the left-hand operand.- Returns:
- The left-hand operand.
-
getOperator
public BinaryArithmeticOperator getOperator()
Get the operation- Returns:
- The operation
-
getRightHandOperand
public Expression getRightHandOperand()
Get the right-hand operand.- Returns:
- The right-hand operand.
-
-