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:
jakarta.persistence.criteria.CriteriaBuilder.SimpleCase<T,R>
,jakarta.persistence.criteria.Expression<R>
,jakarta.persistence.criteria.Selection<R>
,jakarta.persistence.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 class
SqmCaseSimple.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> X
accept(SemanticQueryWalker<X> walker)
Accept the walker per visitationvoid
appendHqlString(StringBuilder sb)
String
asLoggableText()
SqmCaseSimple<T,R>
copy(SqmCopyContext context)
JpaExpression<T>
getExpression()
SqmExpression<T>
getFixture()
SqmExpression<R>
getOtherwise()
List<SqmCaseSimple.WhenFragment<T,R>>
getWhenFragments()
protected void
internalApplyInferableType(SqmExpressible newType)
JpaSimpleCase<T,R>
otherwise(jakarta.persistence.criteria.Expression<? extends R> result)
void
otherwise(SqmExpression<R> otherwiseExpression)
JpaSimpleCase<T,R>
otherwise(R result)
JpaSimpleCase<T,R>
when(jakarta.persistence.criteria.Expression<? extends T> condition, jakarta.persistence.criteria.Expression<? extends R> result)
JpaSimpleCase<T,R>
when(jakarta.persistence.criteria.Expression<? extends T> condition, R result)
void
when(SqmExpression<T> test, SqmExpression<R> result)
JpaSimpleCase<T,R>
when(T condition, jakarta.persistence.criteria.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 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
-
-
-
-
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:
copy
in interfaceSqmExpression<T>
- Specified by:
copy
in interfaceSqmNode
- Specified by:
copy
in interfaceSqmSelectableNode<T>
- Specified by:
copy
in 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:
internalApplyInferableType
in classAbstractSqmExpression<R>
-
accept
public <X> X accept(SemanticQueryWalker<X> walker)
Description copied from interface:SqmVisitableNode
Accept the walker per visitation- Specified by:
accept
in interfaceSqmVisitableNode
-
asLoggableText
public String asLoggableText()
- Specified by:
asLoggableText
in interfaceSqmNode
-
appendHqlString
public void appendHqlString(StringBuilder sb)
- Specified by:
appendHqlString
in interfaceSqmVisitableNode
-
getExpression
public JpaExpression<T> getExpression()
- Specified by:
getExpression
in interfacejakarta.persistence.criteria.CriteriaBuilder.SimpleCase<T,R>
- Specified by:
getExpression
in interfaceJpaSimpleCase<T,R>
-
when
public JpaSimpleCase<T,R> when(T condition, R result)
-
when
public JpaSimpleCase<T,R> when(T condition, jakarta.persistence.criteria.Expression<? extends R> result)
-
when
public JpaSimpleCase<T,R> when(jakarta.persistence.criteria.Expression<? extends T> condition, R result)
-
when
public JpaSimpleCase<T,R> when(jakarta.persistence.criteria.Expression<? extends T> condition, jakarta.persistence.criteria.Expression<? extends R> result)
-
otherwise
public JpaSimpleCase<T,R> otherwise(R result)
-
otherwise
public JpaSimpleCase<T,R> otherwise(jakarta.persistence.criteria.Expression<? extends R> result)
-
-