Class SqmJsonQueryExpression
java.lang.Object
org.hibernate.query.sqm.tree.AbstractSqmNode
org.hibernate.query.sqm.tree.jpa.AbstractJpaTupleElement<String>
org.hibernate.query.sqm.tree.jpa.AbstractJpaSelection<String>
org.hibernate.query.sqm.tree.expression.AbstractSqmExpression<String>
org.hibernate.query.sqm.tree.expression.SqmFunction<String>
org.hibernate.query.sqm.function.SelfRenderingSqmFunction<String>
org.hibernate.query.sqm.tree.expression.AbstractSqmJsonPathExpression<String>
org.hibernate.query.sqm.tree.expression.SqmJsonQueryExpression
- All Implemented Interfaces:
Expression<String>,Selection<String>,TupleElement<String>,Serializable,JpaCriteriaNode,JpaExpression<String>,JpaFunction<String>,JpaJsonQueryExpression,JpaJsonQueryNode,JpaSelection<String>,JpaTupleElement<String>,SemanticPathPart,SqmExpression<String>,SqmSelectableNode<String>,SqmExpressibleAccessor<String>,SqmNode,SqmTypedNode<String>,SqmVisitableNode
@Incubating
public class SqmJsonQueryExpression
extends AbstractSqmJsonPathExpression<String>
implements JpaJsonQueryExpression
Special expression for the json_query function that also captures special syntax elements like error and empty behavior.
- Since:
- 7.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.query.criteria.JpaJsonQueryNode
JpaJsonQueryNode.EmptyBehavior, JpaJsonQueryNode.ErrorBehavior, JpaJsonQueryNode.WrapMode -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionSqmJsonQueryExpression(SqmFunctionDescriptor descriptor, FunctionRenderer renderer, List<? extends SqmTypedNode<?>> arguments, @Nullable ReturnableType<String> 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 theJpaJsonQueryNode.EmptyBehavior.EMPTY_ARRAYfor this json query expression.Sets theJpaJsonQueryNode.ErrorBehavior.EMPTY_ARRAYfor this json query expression.Sets theJpaJsonQueryNode.EmptyBehavior.EMPTY_OBJECTfor this json query expression.Sets theJpaJsonQueryNode.ErrorBehavior.EMPTY_OBJECTfor this json query expression.Sets theJpaJsonQueryNode.EmptyBehavior.ERRORfor this json query expression.Sets theJpaJsonQueryNode.ErrorBehavior.ERRORfor this json query expression.Get theJpaJsonQueryNode.EmptyBehaviorof this json query expression.Get theJpaJsonQueryNode.ErrorBehaviorof this json query expression.Get theJpaJsonQueryNode.WrapModeof this json query expression.Sets theJpaJsonQueryNode.EmptyBehavior.NULLfor this json query expression.Sets theJpaJsonQueryNode.ErrorBehavior.NULLfor this json query expression.passing(String parameterName, Expression<?> expression) Passes the givenExpressionas value for the parameter with the given name in the JSON path.Sets theJpaJsonQueryNode.EmptyBehavior.UNSPECIFIEDfor this json query expression.Sets theJpaJsonQueryNode.ErrorBehavior.UNSPECIFIEDfor this json query expression.Sets theJpaJsonQueryNode.WrapMode.UNSPECIFIEDfor this json query expression.Sets theJpaJsonQueryNode.WrapMode.WITH_CONDITIONAL_WRAPPERfor this json query expression.Sets theJpaJsonQueryNode.WrapMode.WITHOUT_WRAPPERfor this json query expression.Sets theJpaJsonQueryNode.WrapMode.WITH_WRAPPERfor this json query 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
-
SqmJsonQueryExpression
public SqmJsonQueryExpression(SqmFunctionDescriptor descriptor, FunctionRenderer renderer, List<? extends SqmTypedNode<?>> arguments, @Nullable ReturnableType<String> impliedResultType, @Nullable ArgumentsValidator argumentsValidator, FunctionReturnTypeResolver returnTypeResolver, NodeBuilder nodeBuilder, String name)
-
-
Method Details
-
copy
- Specified by:
copyin interfaceSqmExpression<String>- Specified by:
copyin interfaceSqmNode- Specified by:
copyin interfaceSqmSelectableNode<String>- Specified by:
copyin interfaceSqmTypedNode<String>- Overrides:
copyin classSelfRenderingSqmFunction<String>
-
getWrapMode
Description copied from interface:JpaJsonQueryNodeGet theJpaJsonQueryNode.WrapModeof this json query expression.- Specified by:
getWrapModein interfaceJpaJsonQueryNode- Returns:
- the wrap mode
-
getErrorBehavior
Description copied from interface:JpaJsonQueryNodeGet theJpaJsonQueryNode.ErrorBehaviorof this json query expression.- Specified by:
getErrorBehaviorin interfaceJpaJsonQueryNode- Returns:
- the error behavior
-
getEmptyBehavior
Description copied from interface:JpaJsonQueryNodeGet theJpaJsonQueryNode.EmptyBehaviorof this json query expression.- Specified by:
getEmptyBehaviorin interfaceJpaJsonQueryNode- Returns:
- the empty behavior
-
withoutWrapper
Description copied from interface:JpaJsonQueryNodeSets theJpaJsonQueryNode.WrapMode.WITHOUT_WRAPPERfor this json query expression.- Specified by:
withoutWrapperin interfaceJpaJsonQueryExpression- Specified by:
withoutWrapperin interfaceJpaJsonQueryNode- Returns:
thisfor method chaining
-
withWrapper
Description copied from interface:JpaJsonQueryNodeSets theJpaJsonQueryNode.WrapMode.WITH_WRAPPERfor this json query expression.- Specified by:
withWrapperin interfaceJpaJsonQueryExpression- Specified by:
withWrapperin interfaceJpaJsonQueryNode- Returns:
thisfor method chaining
-
withConditionalWrapper
Description copied from interface:JpaJsonQueryNodeSets theJpaJsonQueryNode.WrapMode.WITH_CONDITIONAL_WRAPPERfor this json query expression.- Specified by:
withConditionalWrapperin interfaceJpaJsonQueryExpression- Specified by:
withConditionalWrapperin interfaceJpaJsonQueryNode- Returns:
thisfor method chaining
-
unspecifiedWrapper
Description copied from interface:JpaJsonQueryNodeSets theJpaJsonQueryNode.WrapMode.UNSPECIFIEDfor this json query expression.- Specified by:
unspecifiedWrapperin interfaceJpaJsonQueryExpression- Specified by:
unspecifiedWrapperin interfaceJpaJsonQueryNode- Returns:
thisfor method chaining
-
unspecifiedOnError
Description copied from interface:JpaJsonQueryNodeSets theJpaJsonQueryNode.ErrorBehavior.UNSPECIFIEDfor this json query expression.- Specified by:
unspecifiedOnErrorin interfaceJpaJsonQueryExpression- Specified by:
unspecifiedOnErrorin interfaceJpaJsonQueryNode- Returns:
thisfor method chaining
-
errorOnError
Description copied from interface:JpaJsonQueryNodeSets theJpaJsonQueryNode.ErrorBehavior.ERRORfor this json query expression.- Specified by:
errorOnErrorin interfaceJpaJsonQueryExpression- Specified by:
errorOnErrorin interfaceJpaJsonQueryNode- Returns:
thisfor method chaining
-
nullOnError
Description copied from interface:JpaJsonQueryNodeSets theJpaJsonQueryNode.ErrorBehavior.NULLfor this json query expression.- Specified by:
nullOnErrorin interfaceJpaJsonQueryExpression- Specified by:
nullOnErrorin interfaceJpaJsonQueryNode- Returns:
thisfor method chaining
-
emptyArrayOnError
Description copied from interface:JpaJsonQueryNodeSets theJpaJsonQueryNode.ErrorBehavior.EMPTY_ARRAYfor this json query expression.- Specified by:
emptyArrayOnErrorin interfaceJpaJsonQueryExpression- Specified by:
emptyArrayOnErrorin interfaceJpaJsonQueryNode- Returns:
thisfor method chaining
-
emptyObjectOnError
Description copied from interface:JpaJsonQueryNodeSets theJpaJsonQueryNode.ErrorBehavior.EMPTY_OBJECTfor this json query expression.- Specified by:
emptyObjectOnErrorin interfaceJpaJsonQueryExpression- Specified by:
emptyObjectOnErrorin interfaceJpaJsonQueryNode- Returns:
thisfor method chaining
-
unspecifiedOnEmpty
Description copied from interface:JpaJsonQueryNodeSets theJpaJsonQueryNode.EmptyBehavior.UNSPECIFIEDfor this json query expression.- Specified by:
unspecifiedOnEmptyin interfaceJpaJsonQueryExpression- Specified by:
unspecifiedOnEmptyin interfaceJpaJsonQueryNode- Returns:
thisfor method chaining
-
errorOnEmpty
Description copied from interface:JpaJsonQueryNodeSets theJpaJsonQueryNode.EmptyBehavior.ERRORfor this json query expression.- Specified by:
errorOnEmptyin interfaceJpaJsonQueryExpression- Specified by:
errorOnEmptyin interfaceJpaJsonQueryNode- Returns:
thisfor method chaining
-
nullOnEmpty
Description copied from interface:JpaJsonQueryNodeSets theJpaJsonQueryNode.EmptyBehavior.NULLfor this json query expression.- Specified by:
nullOnEmptyin interfaceJpaJsonQueryExpression- Specified by:
nullOnEmptyin interfaceJpaJsonQueryNode- Returns:
thisfor method chaining
-
emptyArrayOnEmpty
Description copied from interface:JpaJsonQueryNodeSets theJpaJsonQueryNode.EmptyBehavior.EMPTY_ARRAYfor this json query expression.- Specified by:
emptyArrayOnEmptyin interfaceJpaJsonQueryExpression- Specified by:
emptyArrayOnEmptyin interfaceJpaJsonQueryNode- Returns:
thisfor method chaining
-
emptyObjectOnEmpty
Description copied from interface:JpaJsonQueryNodeSets theJpaJsonQueryNode.EmptyBehavior.EMPTY_OBJECTfor this json query expression.- Specified by:
emptyObjectOnEmptyin interfaceJpaJsonQueryExpression- Specified by:
emptyObjectOnEmptyin interfaceJpaJsonQueryNode- Returns:
thisfor method chaining
-
passing
Description copied from interface:JpaJsonQueryExpressionPasses the givenExpressionas value for the parameter with the given name in the JSON path.- Specified by:
passingin interfaceJpaJsonQueryExpression- Returns:
thisfor method chaining
-
convertToSqlAst
- Overrides:
convertToSqlAstin classSelfRenderingSqmFunction<String>
-
appendHqlString
- Specified by:
appendHqlStringin interfaceSqmVisitableNode- Overrides:
appendHqlStringin classSqmFunction<String>
-