Class SqmCaseSimple<T,R>
java.lang.Object
org.hibernate.query.sqm.tree.spi.AbstractSqmNode
org.hibernate.query.sqm.tree.spi.jpa.AbstractJpaTupleElement<R>
org.hibernate.query.sqm.tree.spi.jpa.AbstractJpaSelection<R>
org.hibernate.query.sqm.tree.spi.expression.AbstractSqmExpression<R>
org.hibernate.query.sqm.tree.spi.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>, SqmCacheable, SqmExpressibleAccessor<R>, SqmNode, SqmTypedNode<R>, SqmVisitableNode
- 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, SqmBindableType<R> inherentType, NodeBuilder nodeBuilder) -
Method Summary
Modifier and TypeMethodDescription<X> Xaccept(SemanticQueryWalker<X> walker) Accept the walker per visitationvoidappendHqlString(StringBuilder hql, SqmRenderContext context) intcopy(SqmCopyContext context) booleanReturn the expression tested by this simple case expression.SqmExpression<? extends R> List<SqmCaseSimple.WhenFragment<? extends T, ? extends R>> inthashCode()protected voidinternalApplyInferableType(SqmBindableType<?> newType) booleanisCompatible(Object object) otherwise(Expression<? extends R> result) Set the otherwise result of this simple case expression.voidotherwise(SqmExpression<? extends R> otherwiseExpression) Set the otherwise result of this simple case expression.when(Expression<? extends T> condition, Expression<? extends R> result) Add a when-then clause to this simple case expression.when(Expression<? extends T> condition, R result) Add a when-then clause to this simple case expression.voidwhen(SqmExpression<? extends T> test, SqmExpression<? extends R> result) when(T condition, Expression<? extends R> result) Add a when-then clause to this simple case expression.Add a when-then clause to this simple case expression.Methods inherited from class AbstractSqmExpression
applyInferableType, as, cast, coalesce, coalesce, count, countDistinct, equalTo, equalTo, getJavaTypeDescriptor, in, in, in, in, in, isMember, isNotMember, isNotNull, isNull, nodeBuilder, notEqualTo, notEqualTo, nullif, nullif, selectCase, selectCaseMethods inherited from class AbstractJpaSelection
alias, getSelectionItems, isCompoundSelectionMethods inherited from class AbstractJpaTupleElement
copyTo, getAlias, getNodeType, setAlias, setExpressibleTypeMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface JpaExpression
coalesce, coalesce, count, countDistinct, in, isMember, isNotMember, nullif, nullif, selectCase, selectCaseMethods inherited from interface JpaSelection
alias, getCompoundSelectionItems, getSelectionItemsMethods inherited from interface JpaTupleElement
getJavaType, getJavaTypeDescriptor, getJavaTypeIfKnown, getJavaTypeName, isEnumMethods inherited from interface Selection
isCompoundSelectionMethods inherited from interface SqmExpression
asBigDecimal, asBigInteger, asDouble, asFloat, asInteger, asLong, asString, castAs, getNodeType, visitSubSelectableNodesMethods inherited from interface SqmSelectableNode
getTupleLengthMethods inherited from interface SqmTypedNode
getExpressible, getNodeJavaTypeMethods inherited from interface SqmVisitableNode
toHqlStringMethods inherited from interface TupleElement
getAlias
-
Constructor Details
-
SqmCaseSimple
-
SqmCaseSimple
public SqmCaseSimple(@Nonnull SqmExpression<T> fixture, int estimatedWhenSize, @Nonnull NodeBuilder nodeBuilder) -
SqmCaseSimple
public SqmCaseSimple(@Nonnull SqmExpression<T> fixture, @Nullable SqmBindableType<R> inherentType, @Nonnull 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
public void when(@Nonnull SqmExpression<? extends T> test, @Nonnull SqmExpression<? extends R> result) -
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
-
equals
-
hashCode
-
isCompatible
- Specified by:
isCompatiblein interfaceSqmCacheable
-
cacheHashCode
public int cacheHashCode()- Specified by:
cacheHashCodein interfaceSqmCacheable
-
getExpression
Description copied from interface:JpaSimpleCaseReturn the expression tested by this simple case expression.- Specified by:
getExpressionin interfaceCriteriaBuilder.SimpleCase<T,R> - Specified by:
getExpressionin interfaceJpaSimpleCase<T,R>
-
when
Description copied from interface:JpaSimpleCaseAdd a when-then clause to this simple case expression.- Specified by:
whenin interfaceCriteriaBuilder.SimpleCase<T,R> - Specified by:
whenin interfaceJpaSimpleCase<T,R>
-
when
@Nonnull public JpaSimpleCase<T,R> when(@Nullable T condition, @Nonnull Expression<? extends R> result) Description copied from interface:JpaSimpleCaseAdd a when-then clause to this simple case expression.- Specified by:
whenin interfaceCriteriaBuilder.SimpleCase<T,R> - Specified by:
whenin interfaceJpaSimpleCase<T,R>
-
when
@Nonnull public JpaSimpleCase<T,R> when(@Nonnull Expression<? extends T> condition, @Nullable R result) Description copied from interface:JpaSimpleCaseAdd a when-then clause to this simple case expression.- Specified by:
whenin interfaceCriteriaBuilder.SimpleCase<T,R> - Specified by:
whenin interfaceJpaSimpleCase<T,R>
-
when
@Nonnull public JpaSimpleCase<T,R> when(@Nonnull Expression<? extends T> condition, @Nonnull Expression<? extends R> result) Description copied from interface:JpaSimpleCaseAdd a when-then clause to this simple case expression.- Specified by:
whenin interfaceCriteriaBuilder.SimpleCase<T,R> - Specified by:
whenin interfaceJpaSimpleCase<T,R>
-
otherwise
Description copied from interface:JpaSimpleCaseSet the otherwise result of this simple case expression.- Specified by:
otherwisein interfaceCriteriaBuilder.SimpleCase<T,R> - Specified by:
otherwisein interfaceJpaSimpleCase<T,R>
-
otherwise
Description copied from interface:JpaSimpleCaseSet the otherwise result of this simple case expression.- Specified by:
otherwisein interfaceCriteriaBuilder.SimpleCase<T,R> - Specified by:
otherwisein interfaceJpaSimpleCase<T,R>
-