Class SqmJsonExistsExpression
java.lang.Object
org.hibernate.query.sqm.tree.AbstractSqmNode
org.hibernate.query.sqm.tree.jpa.AbstractJpaTupleElement<Boolean>
org.hibernate.query.sqm.tree.jpa.AbstractJpaSelection<Boolean>
org.hibernate.query.sqm.tree.expression.AbstractSqmExpression<Boolean>
org.hibernate.query.sqm.tree.expression.SqmFunction<Boolean>
org.hibernate.query.sqm.function.SelfRenderingSqmFunction<Boolean>
org.hibernate.query.sqm.tree.expression.AbstractSqmJsonPathExpression<Boolean>
org.hibernate.query.sqm.tree.expression.SqmJsonExistsExpression
- All Implemented Interfaces:
Expression<Boolean>, Selection<Boolean>, TupleElement<Boolean>, Serializable, JpaCriteriaNode, JpaExpression<Boolean>, JpaFunction<Boolean>, JpaJsonExistsExpression, JpaJsonExistsNode, JpaSelection<Boolean>, JpaTupleElement<Boolean>, SemanticPathPart, SqmExpression<Boolean>, SqmSelectableNode<Boolean>, SqmCacheable, SqmExpressibleAccessor<Boolean>, SqmNode, SqmTypedNode<Boolean>, SqmVisitableNode
@Incubating
public class SqmJsonExistsExpression
extends AbstractSqmJsonPathExpression<Boolean>
implements JpaJsonExistsExpression
Special expression for the json_exists function that also captures special syntax elements like error behavior and passing variables.
- Since:
- 7.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface JpaJsonExistsNode
JpaJsonExistsNode.ErrorBehavior -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionSqmJsonExistsExpression(SqmFunctionDescriptor descriptor, FunctionRenderer renderer, List<? extends SqmTypedNode<?>> arguments, @Nullable ReturnableType<Boolean> impliedResultType, @Nullable ArgumentsValidator argumentsValidator, FunctionReturnTypeResolver returnTypeResolver, NodeBuilder nodeBuilder, String name) -
Method Summary
Modifier and TypeMethodDescriptionvoidappendHqlString(StringBuilder hql, SqmRenderContext context) intconvertToSqlAst(SqmToSqlAstConverter walker) copy(SqmCopyContext context) booleanSets theJpaJsonExistsNode.ErrorBehavior.ERRORfor this json exists expression.Sets theJpaJsonExistsNode.ErrorBehavior.FALSEfor this json exists expression.Get theJpaJsonExistsNode.ErrorBehaviorof this json exists expression.inthashCode()booleanisCompatible(Object other) passing(String parameterName, Expression<?> expression) Passes the givenExpressionas value for the parameter with the given name in the JSON path.Sets theJpaJsonExistsNode.ErrorBehavior.TRUEfor this json exists expression.Sets theJpaJsonExistsNode.ErrorBehavior.UNSPECIFIEDfor this json exists expression.Methods inherited from class AbstractSqmJsonPathExpression
addPassingExpression, appendPassingExpressionHqlString, copyPassingExpressions, createJsonPathPassingClause, getPassingExpressionsMethods inherited from class SelfRenderingSqmFunction
determineResultType, getArgumentsValidator, getFunctionRenderer, getImpliedResultType, getMappingModelExpressible, getNodeType, getReturnTypeResolver, resolveResultType, resolveSqlAstArgumentsMethods inherited from class SqmFunction
accept, getArguments, getFunctionDescriptor, getFunctionName, resolveIndexedAccess, resolvePathPartMethods inherited from class AbstractSqmExpression
applyInferableType, as, cast, equalTo, equalTo, getJavaTypeDescriptor, in, in, in, in, internalApplyInferableType, isNotNull, isNull, nodeBuilder, notEqualTo, notEqualToMethods inherited from class AbstractJpaSelection
alias, getSelectionItems, isCompoundSelectionMethods inherited from class AbstractJpaTupleElement
copyTo, getAlias, setAlias, setExpressibleTypeMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface JpaSelection
alias, getCompoundSelectionItems, getSelectionItemsMethods inherited from interface JpaTupleElement
getJavaType, getJavaTypeDescriptor, getJavaTypeName, isEnumMethods inherited from interface Selection
isCompoundSelectionMethods inherited from interface SqmExpression
asBigDecimal, asBigInteger, asDouble, asFloat, asInteger, asLong, asString, castAs, visitSubSelectableNodesMethods inherited from interface SqmNode
asLoggableTextMethods inherited from interface SqmSelectableNode
getTupleLengthMethods inherited from interface SqmTypedNode
getExpressible, getNodeJavaTypeMethods inherited from interface SqmVisitableNode
toHqlStringMethods inherited from interface TupleElement
getAlias
-
Constructor Details
-
SqmJsonExistsExpression
public SqmJsonExistsExpression(SqmFunctionDescriptor descriptor, FunctionRenderer renderer, List<? extends SqmTypedNode<?>> arguments, @Nullable ReturnableType<Boolean> impliedResultType, @Nullable ArgumentsValidator argumentsValidator, FunctionReturnTypeResolver returnTypeResolver, NodeBuilder nodeBuilder, String name)
-
-
Method Details
-
copy
- Specified by:
copyin interfaceSqmExpression<Boolean>- Specified by:
copyin interfaceSqmNode- Specified by:
copyin interfaceSqmSelectableNode<Boolean>- Specified by:
copyin interfaceSqmTypedNode<Boolean>- Overrides:
copyin classSelfRenderingSqmFunction<Boolean>
-
getErrorBehavior
Description copied from interface:JpaJsonExistsNodeGet theJpaJsonExistsNode.ErrorBehaviorof this json exists expression.- Specified by:
getErrorBehaviorin interfaceJpaJsonExistsNode- Returns:
- the error behavior
-
unspecifiedOnError
Description copied from interface:JpaJsonExistsNodeSets theJpaJsonExistsNode.ErrorBehavior.UNSPECIFIEDfor this json exists expression.- Specified by:
unspecifiedOnErrorin interfaceJpaJsonExistsExpression- Specified by:
unspecifiedOnErrorin interfaceJpaJsonExistsNode- Returns:
thisfor method chaining
-
errorOnError
Description copied from interface:JpaJsonExistsNodeSets theJpaJsonExistsNode.ErrorBehavior.ERRORfor this json exists expression.- Specified by:
errorOnErrorin interfaceJpaJsonExistsExpression- Specified by:
errorOnErrorin interfaceJpaJsonExistsNode- Returns:
thisfor method chaining
-
trueOnError
Description copied from interface:JpaJsonExistsNodeSets theJpaJsonExistsNode.ErrorBehavior.TRUEfor this json exists expression.- Specified by:
trueOnErrorin interfaceJpaJsonExistsExpression- Specified by:
trueOnErrorin interfaceJpaJsonExistsNode- Returns:
thisfor method chaining
-
falseOnError
Description copied from interface:JpaJsonExistsNodeSets theJpaJsonExistsNode.ErrorBehavior.FALSEfor this json exists expression.- Specified by:
falseOnErrorin interfaceJpaJsonExistsExpression- Specified by:
falseOnErrorin interfaceJpaJsonExistsNode- Returns:
thisfor method chaining
-
passing
Description copied from interface:JpaJsonExistsExpressionPasses the givenExpressionas value for the parameter with the given name in the JSON path.- Specified by:
passingin interfaceJpaJsonExistsExpression- Returns:
thisfor method chaining
-
convertToSqlAst
- Overrides:
convertToSqlAstin classSelfRenderingSqmFunction<Boolean>
-
appendHqlString
- Specified by:
appendHqlStringin interfaceSqmVisitableNode- Overrides:
appendHqlStringin classSqmFunction<Boolean>
-
equals
- Overrides:
equalsin classAbstractSqmJsonPathExpression<Boolean>
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractSqmJsonPathExpression<Boolean>
-
isCompatible
- Specified by:
isCompatiblein interfaceSqmCacheable- Overrides:
isCompatiblein classAbstractSqmJsonPathExpression<Boolean>
-
cacheHashCode
public int cacheHashCode()- Specified by:
cacheHashCodein interfaceSqmCacheable- Overrides:
cacheHashCodein classAbstractSqmJsonPathExpression<Boolean>
-