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 class
SqmCaseSimple.WhenFragment<T,R>
-
Constructor Summary
Constructors Constructor Description SqmCaseSimple(SqmExpression<T> fixture, int estimatedWhenSize, NodeBuilder nodeBuilder)
SqmCaseSimple(SqmExpression<T> fixture, NodeBuilder nodeBuilder)
SqmCaseSimple(SqmExpression<T> fixture, SqmExpressible<R> inherentType, NodeBuilder nodeBuilder)
-
Method Summary
-
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, nodeBuilder
-
Methods inherited from class org.hibernate.query.sqm.tree.jpa.AbstractJpaSelection
alias, 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, getJavaTypeName, isEnum
-
Methods inherited from interface jakarta.persistence.criteria.Selection
isCompoundSelection
-
Methods inherited from interface org.hibernate.query.sqm.tree.expression.SqmExpression
cast, castAs, getNodeType, visitSubSelectableNodes
-
Methods inherited from interface org.hibernate.query.sqm.tree.select.SqmSelectableNode
getTupleLength
-
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, int estimatedWhenSize, NodeBuilder nodeBuilder)
-
SqmCaseSimple
public SqmCaseSimple(SqmExpression<T> fixture, SqmExpressible<R> inherentType, 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<? extends T,? extends R>> getWhenFragments()
-
getOtherwise
public SqmExpression<? extends R> getOtherwise()
-
otherwise
public void otherwise(SqmExpression<? extends R> otherwiseExpression)
-
when
public void when(SqmExpression<? extends T> test, SqmExpression<? extends 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 interfaceCriteriaBuilder.SimpleCase<T,R>
- Specified by:
getExpression
in interfaceJpaSimpleCase<T,R>
-
when
public JpaSimpleCase<T,R> when(T condition, R result)
- Specified by:
when
in interfaceCriteriaBuilder.SimpleCase<T,R>
- Specified by:
when
in interfaceJpaSimpleCase<T,R>
-
when
public JpaSimpleCase<T,R> when(T condition, Expression<? extends R> result)
- Specified by:
when
in interfaceCriteriaBuilder.SimpleCase<T,R>
- Specified by:
when
in interfaceJpaSimpleCase<T,R>
-
when
public JpaSimpleCase<T,R> when(Expression<? extends T> condition, R result)
- Specified by:
when
in interfaceCriteriaBuilder.SimpleCase<T,R>
- Specified by:
when
in interfaceJpaSimpleCase<T,R>
-
when
public JpaSimpleCase<T,R> when(Expression<? extends T> condition, Expression<? extends R> result)
- Specified by:
when
in interfaceCriteriaBuilder.SimpleCase<T,R>
- Specified by:
when
in interfaceJpaSimpleCase<T,R>
-
otherwise
public JpaSimpleCase<T,R> otherwise(R result)
- Specified by:
otherwise
in interfaceCriteriaBuilder.SimpleCase<T,R>
- Specified by:
otherwise
in interfaceJpaSimpleCase<T,R>
-
otherwise
public JpaSimpleCase<T,R> otherwise(Expression<? extends R> result)
- Specified by:
otherwise
in interfaceCriteriaBuilder.SimpleCase<T,R>
- Specified by:
otherwise
in interfaceJpaSimpleCase<T,R>
-
-