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
public class SqmCaseSimple<T,R> extends AbstractSqmExpression<R> implements JpaSimpleCase<T,R>
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSqmCaseSimple.WhenFragment<T,R>
-
Constructor Summary
Constructors Constructor Description SqmCaseSimple(SqmExpression<T> fixture, NodeBuilder nodeBuilder)SqmCaseSimple(SqmExpression<T> fixture, SqmExpressible<R> inherentType, int estimateWhenSize, NodeBuilder nodeBuilder)SqmCaseSimple(SqmExpression<T> fixture, SqmExpressible<R> inherentType, NodeBuilder nodeBuilder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <X> Xaccept(SemanticQueryWalker<X> walker)Accept the walker per visitationvoidappendHqlString(StringBuilder sb)StringasLoggableText()SqmCaseSimple<T,R>copy(SqmCopyContext context)JpaExpression<T>getExpression()SqmExpression<T>getFixture()SqmExpression<R>getOtherwise()List<SqmCaseSimple.WhenFragment<T,R>>getWhenFragments()protected voidinternalApplyInferableType(SqmExpressible newType)JpaSimpleCase<T,R>otherwise(Expression<? extends R> result)voidotherwise(SqmExpression<R> otherwiseExpression)JpaSimpleCase<T,R>otherwise(R result)JpaSimpleCase<T,R>when(Expression<? extends T> condition, Expression<? extends R> result)JpaSimpleCase<T,R>when(Expression<? extends T> condition, R result)voidwhen(SqmExpression<T> test, SqmExpression<R> result)JpaSimpleCase<T,R>when(T condition, Expression<? extends R> result)JpaSimpleCase<T,R>when(T condition, R result)-
Methods inherited from class org.hibernate.query.sqm.tree.expression.AbstractSqmExpression
alias, applyInferableType, as, asBigDecimal, asBigInteger, asDouble, asFloat, asInteger, asLong, asString, getJavaTypeDescriptor, in, in, in, in, isNotNull, isNull, nodeBuilder
-
Methods inherited from class org.hibernate.query.sqm.tree.jpa.AbstractJpaSelection
getSelectionItems, isCompoundSelection
-
Methods inherited from class org.hibernate.query.sqm.tree.jpa.AbstractJpaTupleElement
copyTo, getAlias, getNodeType, setAlias, setExpressibleType
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.query.criteria.JpaSelection
alias, getCompoundSelectionItems, getSelectionItems
-
Methods inherited from interface org.hibernate.query.criteria.JpaTupleElement
getJavaType, getJavaTypeDescriptor
-
Methods inherited from interface jakarta.persistence.criteria.Selection
isCompoundSelection
-
Methods inherited from interface org.hibernate.query.sqm.tree.expression.SqmExpression
castAs, getNodeType, visitSubSelectableNodes
-
Methods inherited from interface org.hibernate.query.sqm.tree.SqmTypedNode
getExpressible, getNodeJavaType
-
Methods inherited from interface org.hibernate.query.sqm.tree.SqmVisitableNode
toHqlString
-
Methods inherited from interface jakarta.persistence.TupleElement
getAlias
-
-
-
-
Constructor Detail
-
SqmCaseSimple
public SqmCaseSimple(SqmExpression<T> fixture, NodeBuilder nodeBuilder)
-
SqmCaseSimple
public SqmCaseSimple(SqmExpression<T> fixture, SqmExpressible<R> inherentType, NodeBuilder nodeBuilder)
-
SqmCaseSimple
public SqmCaseSimple(SqmExpression<T> fixture, SqmExpressible<R> inherentType, int estimateWhenSize, NodeBuilder nodeBuilder)
-
-
Method Detail
-
copy
public SqmCaseSimple<T,R> copy(SqmCopyContext context)
- Specified by:
copyin interfaceSqmExpression<T>- Specified by:
copyin interfaceSqmNode- Specified by:
copyin interfaceSqmSelectableNode<T>- Specified by:
copyin interfaceSqmTypedNode<T>
-
getFixture
public SqmExpression<T> getFixture()
-
getWhenFragments
public List<SqmCaseSimple.WhenFragment<T,R>> getWhenFragments()
-
getOtherwise
public SqmExpression<R> getOtherwise()
-
otherwise
public void otherwise(SqmExpression<R> otherwiseExpression)
-
when
public void when(SqmExpression<T> test, SqmExpression<R> result)
-
internalApplyInferableType
protected void internalApplyInferableType(SqmExpressible newType)
- Overrides:
internalApplyInferableTypein classAbstractSqmExpression<R>
-
accept
public <X> X accept(SemanticQueryWalker<X> walker)
Description copied from interface:SqmVisitableNodeAccept the walker per visitation- Specified by:
acceptin interfaceSqmVisitableNode
-
asLoggableText
public String asLoggableText()
- Specified by:
asLoggableTextin interfaceSqmNode
-
appendHqlString
public void appendHqlString(StringBuilder sb)
- Specified by:
appendHqlStringin interfaceSqmVisitableNode
-
getExpression
public JpaExpression<T> getExpression()
- Specified by:
getExpressionin interfaceCriteriaBuilder.SimpleCase<T,R>- Specified by:
getExpressionin interfaceJpaSimpleCase<T,R>
-
when
public JpaSimpleCase<T,R> when(T condition, R result)
- Specified by:
whenin interfaceCriteriaBuilder.SimpleCase<T,R>- Specified by:
whenin interfaceJpaSimpleCase<T,R>
-
when
public JpaSimpleCase<T,R> when(T condition, Expression<? extends R> result)
- Specified by:
whenin interfaceCriteriaBuilder.SimpleCase<T,R>- Specified by:
whenin interfaceJpaSimpleCase<T,R>
-
when
public JpaSimpleCase<T,R> when(Expression<? extends T> condition, R result)
- Specified by:
whenin interfaceCriteriaBuilder.SimpleCase<T,R>- Specified by:
whenin interfaceJpaSimpleCase<T,R>
-
when
public JpaSimpleCase<T,R> when(Expression<? extends T> condition, Expression<? extends R> result)
- Specified by:
whenin interfaceCriteriaBuilder.SimpleCase<T,R>- Specified by:
whenin interfaceJpaSimpleCase<T,R>
-
otherwise
public JpaSimpleCase<T,R> otherwise(R result)
- Specified by:
otherwisein interfaceCriteriaBuilder.SimpleCase<T,R>- Specified by:
otherwisein interfaceJpaSimpleCase<T,R>
-
otherwise
public JpaSimpleCase<T,R> otherwise(Expression<? extends R> result)
- Specified by:
otherwisein interfaceCriteriaBuilder.SimpleCase<T,R>- Specified by:
otherwisein interfaceJpaSimpleCase<T,R>
-
-