Class CaseSearchedExpression
- java.lang.Object
-
- org.hibernate.sql.ast.tree.expression.CaseSearchedExpression
-
- All Implemented Interfaces:
DomainResultProducer
,SqlSelectionProducer
,Expression
,SqlAstNode
public class CaseSearchedExpression extends Object implements Expression, DomainResultProducer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CaseSearchedExpression.WhenFragment
-
Constructor Summary
Constructors Constructor Description CaseSearchedExpression(MappingModelExpressible type)
CaseSearchedExpression(MappingModelExpressible type, List<CaseSearchedExpression.WhenFragment> whenFragments, Expression otherwise)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(SqlAstWalker walker)
void
applySqlSelections(DomainResultCreationState creationState)
Used when this producer is a selection in a sub-query.DomainResult
createDomainResult(String resultVariable, DomainResultCreationState creationState)
Produce the domain queryMappingModelExpressible
getExpressionType()
The type for this expressionExpression
getOtherwise()
List<CaseSearchedExpression.WhenFragment>
getWhenFragments()
void
otherwise(Expression otherwiseExpression)
void
when(Predicate predicate, Expression result)
-
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, createDomainResultSqlSelection, createSqlSelection, createSqlSelection, getColumnReference
-
-
-
-
Constructor Detail
-
CaseSearchedExpression
public CaseSearchedExpression(MappingModelExpressible type)
-
CaseSearchedExpression
public CaseSearchedExpression(MappingModelExpressible type, List<CaseSearchedExpression.WhenFragment> whenFragments, Expression otherwise)
-
-
Method Detail
-
getWhenFragments
public List<CaseSearchedExpression.WhenFragment> getWhenFragments()
-
getOtherwise
public Expression getOtherwise()
-
when
public void when(Predicate predicate, Expression result)
-
otherwise
public void otherwise(Expression otherwiseExpression)
-
createDomainResult
public DomainResult createDomainResult(String resultVariable, DomainResultCreationState creationState)
Description copied from interface:DomainResultProducer
Produce the domain query- Specified by:
createDomainResult
in interfaceDomainResultProducer
-
applySqlSelections
public void applySqlSelections(DomainResultCreationState creationState)
Description copied from interface:DomainResultProducer
Used 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:
applySqlSelections
in interfaceDomainResultProducer
-
accept
public void accept(SqlAstWalker walker)
- Specified by:
accept
in interfaceSqlAstNode
-
getExpressionType
public MappingModelExpressible getExpressionType()
Description copied from interface:Expression
The type for this expression- Specified by:
getExpressionType
in interfaceExpression
-
-