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>,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 org.hibernate.query.criteria.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) convertToSqlAst(SqmToSqlAstConverter walker) copy(SqmCopyContext context) Sets theJpaJsonExistsNode.ErrorBehavior.ERRORfor this json exists expression.Sets theJpaJsonExistsNode.ErrorBehavior.FALSEfor this json exists expression.Get theJpaJsonExistsNode.ErrorBehaviorof this json exists expression.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 org.hibernate.query.sqm.tree.expression.AbstractSqmJsonPathExpression
addPassingExpression, appendPassingExpressionHqlString, copyPassingExpressions, createJsonPathPassingClause, getPassingExpressionsMethods inherited from class org.hibernate.query.sqm.function.SelfRenderingSqmFunction
determineResultType, getArgumentsValidator, getFunctionRenderer, getImpliedResultType, getMappingModelExpressible, getNodeType, getReturnTypeResolver, resolveResultType, resolveSqlAstArgumentsMethods inherited from class org.hibernate.query.sqm.tree.expression.SqmFunction
accept, equals, getArguments, getFunctionDescriptor, getFunctionName, hashCode, resolveIndexedAccess, resolvePathPartMethods inherited from class org.hibernate.query.sqm.tree.expression.AbstractSqmExpression
applyInferableType, as, asBigDecimal, asBigInteger, asDouble, asFloat, asInteger, asLong, asString, cast, equalTo, equalTo, getJavaTypeDescriptor, in, in, in, in, internalApplyInferableType, isNotNull, isNull, nodeBuilder, notEqualTo, notEqualToMethods inherited from class org.hibernate.query.sqm.tree.jpa.AbstractJpaSelection
alias, getSelectionItems, isCompoundSelectionMethods inherited from class org.hibernate.query.sqm.tree.jpa.AbstractJpaTupleElement
copyTo, getAlias, setAlias, setExpressibleTypeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.query.criteria.JpaSelection
alias, getCompoundSelectionItems, getSelectionItemsMethods inherited from interface org.hibernate.query.criteria.JpaTupleElement
getJavaType, getJavaTypeDescriptor, getJavaTypeName, isEnumMethods inherited from interface jakarta.persistence.criteria.Selection
isCompoundSelectionMethods inherited from interface org.hibernate.query.sqm.tree.expression.SqmExpression
castAs, visitSubSelectableNodesMethods inherited from interface org.hibernate.query.sqm.tree.SqmNode
asLoggableTextMethods inherited from interface org.hibernate.query.sqm.tree.select.SqmSelectableNode
getTupleLengthMethods inherited from interface org.hibernate.query.sqm.tree.SqmTypedNode
getExpressible, getNodeJavaTypeMethods inherited from interface org.hibernate.query.sqm.tree.SqmVisitableNode
toHqlStringMethods inherited from interface jakarta.persistence.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>
-