Class SqmCaseSimple<T,R>
java.lang.Object
org.hibernate.query.sqm.tree.AbstractSqmNode
org.hibernate.query.sqm.tree.jpa.AbstractJpaTupleElement<T>
org.hibernate.query.sqm.tree.jpa.AbstractJpaSelection<T>
org.hibernate.query.sqm.tree.expression.AbstractSqmExpression<R>
org.hibernate.query.sqm.tree.expression.SqmCaseSimple<T,R>
- All Implemented Interfaces:
CriteriaBuilder.SimpleCase<T,,R> Expression<R>,Selection<R>,TupleElement<R>,Serializable,JpaCriteriaNode,JpaExpression<R>,JpaSelection<R>,JpaSimpleCase<T,,R> JpaTupleElement<R>,SqmExpression<R>,SqmSelectableNode<R>,SqmExpressibleAccessor<R>,SqmNode,SqmTypedNode<R>,SqmVisitableNode
- Author:
- Steve Ebersole
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionSqmCaseSimple(SqmExpression<T> fixture, int estimatedWhenSize, NodeBuilder nodeBuilder) SqmCaseSimple(SqmExpression<T> fixture, NodeBuilder nodeBuilder) SqmCaseSimple(SqmExpression<T> fixture, SqmExpressible<R> inherentType, NodeBuilder nodeBuilder) -
Method Summary
Modifier and TypeMethodDescription<X> Xaccept(SemanticQueryWalker<X> walker) Accept the walker per visitationvoidcopy(SqmCopyContext context) Return the expression to be tested against the conditions.SqmExpression<? extends R>List<SqmCaseSimple.WhenFragment<? extends T,? extends R>> protected voidinternalApplyInferableType(SqmExpressible<?> newType) otherwise(Expression<? extends R> result) Add an "else" clause to the case expression.voidotherwise(SqmExpression<? extends R> otherwiseExpression) Add an "else" clause to the case expression.when(Expression<? extends T> condition, Expression<? extends R> result) Add a when/then clause to the case expression.when(Expression<? extends T> condition, R result) Add a when/then clause to the case expression.voidwhen(SqmExpression<? extends T> test, SqmExpression<? extends R> result) when(T condition, Expression<? extends R> result) Add a when/then clause to the case expression.Add a when/then clause to the case expression.Methods inherited from class org.hibernate.query.sqm.tree.expression.AbstractSqmExpression
applyInferableType, as, asBigDecimal, asBigInteger, asDouble, asFloat, asInteger, asLong, asString, equalTo, equalTo, getJavaTypeDescriptor, in, in, in, in, isNotNull, isNull, nodeBuilderMethods inherited from class org.hibernate.query.sqm.tree.jpa.AbstractJpaSelection
alias, getSelectionItems, isCompoundSelectionMethods inherited from class org.hibernate.query.sqm.tree.jpa.AbstractJpaTupleElement
copyTo, getAlias, getNodeType, setAlias, setExpressibleTypeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.query.criteria.JpaSelection
alias, getCompoundSelectionItems, getSelectionItemsMethods inherited from interface org.hibernate.query.criteria.JpaTupleElement
getJavaType, getJavaTypeDescriptor, getJavaTypeName, isEnumMethods inherited from interface jakarta.persistence.criteria.Selection
isCompoundSelectionMethods inherited from interface org.hibernate.query.sqm.tree.expression.SqmExpression
cast, castAs, getNodeType, visitSubSelectableNodesMethods inherited from interface org.hibernate.query.sqm.tree.select.SqmSelectableNode
getTupleLengthMethods inherited from interface org.hibernate.query.sqm.tree.SqmTypedNode
getExpressible, getNodeJavaTypeMethods inherited from interface org.hibernate.query.sqm.tree.SqmVisitableNode
toHqlStringMethods inherited from interface jakarta.persistence.TupleElement
getAlias
-
Constructor Details
-
SqmCaseSimple
-
SqmCaseSimple
-
SqmCaseSimple
public SqmCaseSimple(SqmExpression<T> fixture, SqmExpressible<R> inherentType, NodeBuilder nodeBuilder)
-
-
Method Details
-
copy
- Specified by:
copyin interfaceSqmExpression<T>- Specified by:
copyin interfaceSqmNode- Specified by:
copyin interfaceSqmSelectableNode<T>- Specified by:
copyin interfaceSqmTypedNode<T>
-
getFixture
-
getWhenFragments
-
getOtherwise
-
otherwise
-
when
-
internalApplyInferableType
- Overrides:
internalApplyInferableTypein classAbstractSqmExpression<R>
-
accept
Description copied from interface:SqmVisitableNodeAccept the walker per visitation- Specified by:
acceptin interfaceSqmVisitableNode
-
asLoggableText
- Specified by:
asLoggableTextin interfaceSqmNode
-
appendHqlString
- Specified by:
appendHqlStringin interfaceSqmVisitableNode
-
getExpression
Description copied from interface:CriteriaBuilder.SimpleCaseReturn the expression to be tested against the conditions.- Specified by:
getExpressionin interfaceCriteriaBuilder.SimpleCase<T,R> - Specified by:
getExpressionin interfaceJpaSimpleCase<T,R> - Returns:
- expression
-
when
Description copied from interface:CriteriaBuilder.SimpleCaseAdd a when/then clause to the case expression.- Specified by:
whenin interfaceCriteriaBuilder.SimpleCase<T,R> - Specified by:
whenin interfaceJpaSimpleCase<T,R> - Parameters:
condition- "when" conditionresult- "then" result value- Returns:
- simple case expression
-
when
Description copied from interface:CriteriaBuilder.SimpleCaseAdd a when/then clause to the case expression.- Specified by:
whenin interfaceCriteriaBuilder.SimpleCase<T,R> - Specified by:
whenin interfaceJpaSimpleCase<T,R> - Parameters:
condition- "when" conditionresult- "then" result expression- Returns:
- simple case expression
-
when
Description copied from interface:CriteriaBuilder.SimpleCaseAdd a when/then clause to the case expression.- Specified by:
whenin interfaceCriteriaBuilder.SimpleCase<T,R> - Specified by:
whenin interfaceJpaSimpleCase<T,R> - Parameters:
condition- "when" conditionresult- "then" result value- Returns:
- simple case expression
-
when
Description copied from interface:CriteriaBuilder.SimpleCaseAdd a when/then clause to the case expression.- Specified by:
whenin interfaceCriteriaBuilder.SimpleCase<T,R> - Specified by:
whenin interfaceJpaSimpleCase<T,R> - Parameters:
condition- "when" conditionresult- "then" result expression- Returns:
- simple case expression
-
otherwise
Description copied from interface:CriteriaBuilder.SimpleCaseAdd an "else" clause to the case expression.- Specified by:
otherwisein interfaceCriteriaBuilder.SimpleCase<T,R> - Specified by:
otherwisein interfaceJpaSimpleCase<T,R> - Parameters:
result- "else" result- Returns:
- expression
-
otherwise
Description copied from interface:CriteriaBuilder.SimpleCaseAdd an "else" clause to the case expression.- Specified by:
otherwisein interfaceCriteriaBuilder.SimpleCase<T,R> - Specified by:
otherwisein interfaceJpaSimpleCase<T,R> - Parameters:
result- "else" result expression- Returns:
- expression
-