Class SqmJsonTableFunction<T>
java.lang.Object
org.hibernate.query.sqm.tree.AbstractSqmNode
org.hibernate.query.sqm.tree.expression.SqmSetReturningFunction<T>
org.hibernate.query.sqm.function.SelfRenderingSqmSetReturningFunction<T>
org.hibernate.query.sqm.tree.expression.SqmJsonTableFunction<T>
- All Implemented Interfaces:
Serializable,JpaCriteriaNode,JpaJsonTableColumnsNode,JpaJsonTableFunction,JpaSetReturningFunction<T>,SqmNode,SqmVisitableNode
public class SqmJsonTableFunction<T>
extends SelfRenderingSqmSetReturningFunction<T>
implements JpaJsonTableFunction
- Since:
- 7.0
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.hibernate.query.criteria.JpaJsonTableFunction
JpaJsonTableFunction.ErrorBehavior -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionSqmJsonTableFunction(SqmSetReturningFunctionDescriptor descriptor, SetReturningFunctionRenderer renderer, @Nullable ArgumentsValidator argumentsValidator, SetReturningFunctionTypeResolver setReturningTypeResolver, NodeBuilder nodeBuilder, SqmExpression<?> document, @Nullable SqmExpression<String> jsonPath) -
Method Summary
Modifier and TypeMethodDescriptioncopy(SqmCopyContext context) protected @Nullable JsonPathPassingClauseSets theJpaJsonTableFunction.ErrorBehavior.ERRORfor this json table expression.existsColumn(String columnName) LikeJpaJsonTableColumnsNode.existsColumn(String, String), but uses the column name as JSON path expression.existsColumn(String columnName, @Nullable String jsonPath) Defines a boolean column on the result type with the given name for which the value can be obtained by invokingjson_existswith the given JSON path.Get theJpaJsonTableFunction.ErrorBehaviorof this json table expression.Map<String, SqmExpression<?>> Defines nested columns that are accessible by the given JSON path.Sets theJpaJsonTableFunction.ErrorBehavior.NULLfor this json table expression.ordinalityColumn(String columnName) Defines a long typed column on the result type with the given name which is set to the ordinality i.e.passing(String parameterName, Expression<?> expression) Passes the givenExpressionas value for the parameter with the given name in the JSON path.queryColumn(String columnName) LikeJpaJsonTableColumnsNode.queryColumn(String, String), but uses the column name as JSON path expression.queryColumn(String columnName, @Nullable String jsonPath) Defines a string column on the result type with the given name for which the value can be obtained by invokingjson_querywith the given JSON path.protected List<SqlAstNode> resolveSqlAstArguments(List<? extends SqmTypedNode<?>> sqmArguments, SqmToSqlAstConverter walker) Sets theJpaJsonTableFunction.ErrorBehavior.UNSPECIFIEDfor this json table expression.<X> JpaJsonValueNode<X> valueColumn(String columnName, Class<X> type) LikeJpaJsonTableColumnsNode.valueColumn(String, Class, String)but uses the column name as JSON path expression.<X> JpaJsonValueNode<X> valueColumn(String columnName, Class<X> type, String jsonPath) Defines a column on the result type with the given name and type for which the value can be obtained by the given JSON path expression.<X> JpaJsonValueNode<X> valueColumn(String columnName, JpaCastTarget<X> type) LikeJpaJsonTableColumnsNode.valueColumn(String, Class, String)but uses the column name as JSON path expression.<X> JpaJsonValueNode<X> valueColumn(String columnName, JpaCastTarget<X> type, String jsonPath) Defines a column on the result type with the given name and type for which the value can be obtained by the given JSON path expression.Methods inherited from class org.hibernate.query.sqm.function.SelfRenderingSqmSetReturningFunction
convertToSqlAst, getArgumentsValidator, getFunctionRenderer, getSetReturningTypeResolver, getType, isTypeResolvedMethods inherited from class org.hibernate.query.sqm.tree.expression.SqmSetReturningFunction
accept, appendHqlString, equals, getArguments, getFunctionDescriptor, getFunctionName, hashCodeMethods inherited from class org.hibernate.query.sqm.tree.AbstractSqmNode
nodeBuilderMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.query.sqm.tree.SqmNode
asLoggableText, nodeBuilderMethods inherited from interface org.hibernate.query.sqm.tree.SqmVisitableNode
toHqlString
-
Constructor Details
-
SqmJsonTableFunction
public SqmJsonTableFunction(SqmSetReturningFunctionDescriptor descriptor, SetReturningFunctionRenderer renderer, @Nullable ArgumentsValidator argumentsValidator, SetReturningFunctionTypeResolver setReturningTypeResolver, NodeBuilder nodeBuilder, SqmExpression<?> document, @Nullable SqmExpression<String> jsonPath)
-
-
Method Details
-
getPassingExpressions
-
passing
Description copied from interface:JpaJsonTableFunctionPasses the givenExpressionas value for the parameter with the given name in the JSON path.- Specified by:
passingin interfaceJpaJsonTableFunction- Returns:
thisfor method chaining
-
copy
- Specified by:
copyin interfaceSqmNode- Overrides:
copyin classSelfRenderingSqmSetReturningFunction<T>
-
resolveSqlAstArguments
protected List<SqlAstNode> resolveSqlAstArguments(List<? extends SqmTypedNode<?>> sqmArguments, SqmToSqlAstConverter walker) - Overrides:
resolveSqlAstArgumentsin classSelfRenderingSqmSetReturningFunction<T>
-
createJsonPathPassingClause
-
getErrorBehavior
Description copied from interface:JpaJsonTableFunctionGet theJpaJsonTableFunction.ErrorBehaviorof this json table expression.- Specified by:
getErrorBehaviorin interfaceJpaJsonTableFunction- Returns:
- the error behavior
-
unspecifiedOnError
Description copied from interface:JpaJsonTableFunctionSets theJpaJsonTableFunction.ErrorBehavior.UNSPECIFIEDfor this json table expression.- Specified by:
unspecifiedOnErrorin interfaceJpaJsonTableFunction- Returns:
thisfor method chaining
-
nullOnError
Description copied from interface:JpaJsonTableFunctionSets theJpaJsonTableFunction.ErrorBehavior.NULLfor this json table expression.- Specified by:
nullOnErrorin interfaceJpaJsonTableFunction- Returns:
thisfor method chaining
-
errorOnError
Description copied from interface:JpaJsonTableFunctionSets theJpaJsonTableFunction.ErrorBehavior.ERRORfor this json table expression.- Specified by:
errorOnErrorin interfaceJpaJsonTableFunction- Returns:
thisfor method chaining
-
existsColumn
Description copied from interface:JpaJsonTableColumnsNodeLikeJpaJsonTableColumnsNode.existsColumn(String, String), but uses the column name as JSON path expression.- Specified by:
existsColumnin interfaceJpaJsonTableColumnsNode- Returns:
- The
JpaJsonExistsNodefor the column
-
existsColumn
Description copied from interface:JpaJsonTableColumnsNodeDefines a boolean column on the result type with the given name for which the value can be obtained by invokingjson_existswith the given JSON path.- Specified by:
existsColumnin interfaceJpaJsonTableColumnsNode- Returns:
- The
JpaJsonExistsNodefor the column
-
queryColumn
Description copied from interface:JpaJsonTableColumnsNodeLikeJpaJsonTableColumnsNode.queryColumn(String, String), but uses the column name as JSON path expression.- Specified by:
queryColumnin interfaceJpaJsonTableColumnsNode- Returns:
- The
JpaJsonQueryNodefor the column
-
queryColumn
Description copied from interface:JpaJsonTableColumnsNodeDefines a string column on the result type with the given name for which the value can be obtained by invokingjson_querywith the given JSON path.- Specified by:
queryColumnin interfaceJpaJsonTableColumnsNode- Returns:
- The
JpaJsonQueryNodefor the column
-
valueColumn
Description copied from interface:JpaJsonTableColumnsNodeLikeJpaJsonTableColumnsNode.valueColumn(String, Class, String)but uses the column name as JSON path expression.- Specified by:
valueColumnin interfaceJpaJsonTableColumnsNode- Returns:
- The
JpaJsonValueNodefor the column
-
valueColumn
Description copied from interface:JpaJsonTableColumnsNodeDefines a column on the result type with the given name and type for which the value can be obtained by the given JSON path expression.- Specified by:
valueColumnin interfaceJpaJsonTableColumnsNode- Returns:
- The
JpaJsonValueNodefor the column
-
valueColumn
public <X> JpaJsonValueNode<X> valueColumn(String columnName, JpaCastTarget<X> type, String jsonPath) Description copied from interface:JpaJsonTableColumnsNodeDefines a column on the result type with the given name and type for which the value can be obtained by the given JSON path expression.- Specified by:
valueColumnin interfaceJpaJsonTableColumnsNode- Returns:
- The
JpaJsonValueNodefor the column
-
valueColumn
Description copied from interface:JpaJsonTableColumnsNodeLikeJpaJsonTableColumnsNode.valueColumn(String, Class, String)but uses the column name as JSON path expression.- Specified by:
valueColumnin interfaceJpaJsonTableColumnsNode- Returns:
- The
JpaJsonValueNodefor the column
-
nested
Description copied from interface:JpaJsonTableColumnsNodeDefines nested columns that are accessible by the given JSON path.- Specified by:
nestedin interfaceJpaJsonTableColumnsNode- Returns:
- a new columns node for the nested JSON path
-
ordinalityColumn
Description copied from interface:JpaJsonTableColumnsNodeDefines a long typed column on the result type with the given name which is set to the ordinality i.e. the 1-based position of the processed element. Ordinality starts again at 1 within nested paths.- Specified by:
ordinalityColumnin interfaceJpaJsonTableColumnsNode- Specified by:
ordinalityColumnin interfaceJpaJsonTableFunction- Returns:
thisfor method chaining
-